From d27f40fac5e279f65a3002bb55082453454e2ad7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 17 May 2023 19:46:49 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1978) Co-authored-by: Noah Dietz --- admin/directory/v1/admin-api.json | 6 +- admin/directory/v1/admin-gen.go | 10 +- .../v1alpha/analyticsadmin-api.json | 152 +- analyticsadmin/v1alpha/analyticsadmin-gen.go | 716 +- analyticsdata/v1beta/analyticsdata-api.json | 8 +- analyticsdata/v1beta/analyticsdata-gen.go | 14 +- .../v1/androiddeviceprovisioning-api.json | 13 +- .../v1/androiddeviceprovisioning-gen.go | 9 + .../v1/androidenterprise-api.json | 6 +- androidenterprise/v1/androidenterprise-gen.go | 4 + .../v1/androidmanagement-api.json | 43 +- androidmanagement/v1/androidmanagement-gen.go | 72 +- androidpublisher/v3/androidpublisher-api.json | 14 +- androidpublisher/v3/androidpublisher-gen.go | 34 +- api-list.json | 2 +- artifactregistry/v1/artifactregistry-api.json | 88 +- artifactregistry/v1/artifactregistry-gen.go | 143 +- .../v1beta1/artifactregistry-api.json | 4 +- .../v1beta1/artifactregistry-gen.go | 2 +- .../v1beta2/artifactregistry-api.json | 4 +- .../v1beta2/artifactregistry-gen.go | 2 +- chat/v1/chat-api.json | 836 +- chat/v1/chat-gen.go | 4317 +- cloudasset/v1/cloudasset-api.json | 6 +- cloudasset/v1/cloudasset-gen.go | 5 +- cloudbuild/v1/cloudbuild-api.json | 14 +- cloudbuild/v1/cloudbuild-gen.go | 30 + cloudchannel/v1/cloudchannel-api.json | 111 +- cloudchannel/v1/cloudchannel-gen.go | 318 + cloudfunctions/v1/cloudfunctions-api.json | 4 +- cloudfunctions/v1/cloudfunctions-gen.go | 2 +- .../v1beta1/cloudresourcemanager-api.json | 3 +- .../v1beta1/cloudresourcemanager-gen.go | 1 + .../v3/cloudresourcemanager-api.json | 4 +- .../v3/cloudresourcemanager-gen.go | 3 +- cloudtasks/v2/cloudtasks-api.json | 4 +- cloudtasks/v2/cloudtasks-gen.go | 2 +- cloudtasks/v2beta2/cloudtasks-api.json | 4 +- cloudtasks/v2beta2/cloudtasks-gen.go | 2 +- cloudtasks/v2beta3/cloudtasks-api.json | 4 +- cloudtasks/v2beta3/cloudtasks-gen.go | 2 +- composer/v1beta1/composer-api.json | 79 +- composer/v1beta1/composer-gen.go | 136 - compute/v0.alpha/compute-api.json | 243 +- compute/v0.alpha/compute-gen.go | 541 +- compute/v0.beta/compute-api.json | 3727 +- compute/v0.beta/compute-gen.go | 81374 +++++++++------- compute/v1/compute-api.json | 490 +- compute/v1/compute-gen.go | 1603 +- connectors/v1/connectors-api.json | 10 +- connectors/v1/connectors-gen.go | 13 +- container/v1/container-api.json | 6 +- container/v1/container-gen.go | 13 +- container/v1beta1/container-api.json | 6 +- container/v1beta1/container-gen.go | 21 +- content/v2.1/content-api.json | 60 +- content/v2.1/content-gen.go | 226 + contentwarehouse/v1/contentwarehouse-api.json | 378 +- contentwarehouse/v1/contentwarehouse-gen.go | 479 +- dataflow/v1b3/dataflow-api.json | 10 +- dataflow/v1b3/dataflow-gen.go | 2 + datafusion/v1/datafusion-api.json | 9 +- datafusion/v1/datafusion-gen.go | 5 +- datafusion/v1beta1/datafusion-api.json | 9 +- datafusion/v1beta1/datafusion-gen.go | 5 +- datamigration/v1/datamigration-api.json | 8 +- datamigration/v1/datamigration-gen.go | 31 +- dataplex/v1/dataplex-api.json | 10 +- dataplex/v1/dataplex-gen.go | 16 +- dataproc/v1/dataproc-api.json | 4 +- dataproc/v1/dataproc-gen.go | 4 +- datastore/v1/datastore-api.json | 4 +- datastore/v1/datastore-gen.go | 4 +- datastore/v1beta3/datastore-api.json | 4 +- datastore/v1beta3/datastore-gen.go | 4 +- dialogflow/v2/dialogflow-api.json | 278 +- dialogflow/v2/dialogflow-gen.go | 662 +- dialogflow/v2beta1/dialogflow-api.json | 278 +- dialogflow/v2beta1/dialogflow-gen.go | 661 +- dialogflow/v3/dialogflow-api.json | 130 +- dialogflow/v3/dialogflow-gen.go | 145 + dialogflow/v3beta1/dialogflow-api.json | 130 +- dialogflow/v3beta1/dialogflow-gen.go | 145 + domains/v1/domains-api.json | 4 +- domains/v1/domains-gen.go | 2 +- domains/v1alpha2/domains-api.json | 4 +- domains/v1alpha2/domains-gen.go | 2 +- domains/v1beta1/domains-api.json | 4 +- domains/v1beta1/domains-gen.go | 2 +- .../v2/doubleclickbidmanager-api.json | 6 +- .../v2/doubleclickbidmanager-gen.go | 11 +- eventarc/v1/eventarc-api.json | 6 +- eventarc/v1/eventarc-gen.go | 21 +- .../v1beta/firebaseappcheck-api.json | 8 +- .../v1beta/firebaseappcheck-gen.go | 41 +- .../v1beta1/firebasehosting-api.json | 6 +- .../v1beta1/firebasehosting-gen.go | 4 + firestore/v1/firestore-api.json | 508 +- firestore/v1/firestore-gen.go | 5703 +- firestore/v1beta1/firestore-api.json | 44 +- firestore/v1beta1/firestore-gen.go | 107 + gkebackup/v1/gkebackup-api.json | 4 +- gkebackup/v1/gkebackup-gen.go | 2 +- gkeonprem/v1/gkeonprem-api.json | 51 +- gkeonprem/v1/gkeonprem-gen.go | 129 +- healthcare/v1/healthcare-api.json | 6 +- healthcare/v1/healthcare-gen.go | 7 +- healthcare/v1beta1/healthcare-api.json | 6 +- healthcare/v1beta1/healthcare-gen.go | 7 +- identitytoolkit/v1/identitytoolkit-api.json | 42 +- identitytoolkit/v1/identitytoolkit-gen.go | 52 + identitytoolkit/v2/identitytoolkit-api.json | 177 +- identitytoolkit/v2/identitytoolkit-gen.go | 380 + logging/v2/logging-api.json | 4 +- logging/v2/logging-gen.go | 2 +- .../v1/managedidentities-api.json | 95 +- managedidentities/v1/managedidentities-gen.go | 358 +- .../v1alpha1/managedidentities-api.json | 4 +- .../v1alpha1/managedidentities-gen.go | 2 +- .../v1beta1/managedidentities-api.json | 4 +- .../v1beta1/managedidentities-gen.go | 2 +- memcache/v1/memcache-api.json | 4 +- memcache/v1/memcache-gen.go | 3 +- memcache/v1beta2/memcache-api.json | 4 +- memcache/v1beta2/memcache-gen.go | 3 +- .../v1alpha1/migrationcenter-api.json | 78 +- .../v1alpha1/migrationcenter-gen.go | 342 +- monitoring/v3/monitoring-api.json | 4 +- monitoring/v3/monitoring-gen.go | 6 +- .../v1/networkconnectivity-api.json | 1549 +- .../v1/networkconnectivity-gen.go | 5030 +- .../v1alpha1/networkconnectivity-api.json | 4 +- .../v1alpha1/networkconnectivity-gen.go | 2 +- playintegrity/v1/playintegrity-api.json | 36 +- playintegrity/v1/playintegrity-gen.go | 50 + privateca/v1/privateca-api.json | 16 +- privateca/v1/privateca-gen.go | 28 +- script/v1/script-api.json | 16 +- script/v1/script-gen.go | 9 + securitycenter/v1/securitycenter-api.json | 16 +- securitycenter/v1/securitycenter-gen.go | 9 + .../v1beta1/securitycenter-api.json | 16 +- securitycenter/v1beta1/securitycenter-gen.go | 9 + .../v1beta2/securitycenter-api.json | 16 +- securitycenter/v1beta2/securitycenter-gen.go | 9 + spanner/v1/spanner-api.json | 4 +- spanner/v1/spanner-gen.go | 3 +- sqladmin/v1/sqladmin-api.json | 60 +- sqladmin/v1/sqladmin-gen.go | 77 +- sqladmin/v1beta4/sqladmin-api.json | 56 +- sqladmin/v1beta4/sqladmin-gen.go | 73 +- testing/v1/testing-api.json | 27 +- testing/v1/testing-gen.go | 75 +- tpu/v2alpha1/tpu-api.json | 12 +- tpu/v2alpha1/tpu-gen.go | 20 + vmmigration/v1/vmmigration-api.json | 6 +- vmmigration/v1/vmmigration-gen.go | 3 + vmmigration/v1alpha1/vmmigration-api.json | 6 +- vmmigration/v1alpha1/vmmigration-gen.go | 3 + workloadmanager/v1/workloadmanager-api.json | 78 +- workloadmanager/v1/workloadmanager-gen.go | 94 +- 161 files changed, 72133 insertions(+), 42521 deletions(-) diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index f348c5088ec..1ed090cc7ab 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -3901,7 +3901,7 @@ ] }, "insert": { - "description": "Creates a user.", + "description": "Creates a user. Mutate calls immediately following user creation might sometimes fail as the user isn't fully created due to propagation delay in our backends. Check the error details for the \"User creation is not complete\" message to see if this is the case. Retrying the calls after some time can help in this case.", "flatPath": "admin/directory/v1/users", "httpMethod": "POST", "id": "directory.users.insert", @@ -4635,7 +4635,7 @@ } } }, - "revision": "20230425", + "revision": "20230516", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -6442,7 +6442,7 @@ "id": "Member", "properties": { "delivery_settings": { - "description": "Defines mail delivery preferences of member. This is only supported by create/update/get.", + "description": "Defines mail delivery preferences of member. This field is only supported by `insert`, `update`, and `get` methods.", "type": "string" }, "email": { diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 33928c7f0ac..6fcef254ac7 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -3531,7 +3531,7 @@ func (s *ListPrintersResponse) MarshalJSON() ([]byte, error) { // Guide (/admin-sdk/directory/v1/guides/manage-group-members). type Member struct { // DeliverySettings: Defines mail delivery preferences of member. This - // is only supported by create/update/get. + // field is only supported by `insert`, `update`, and `get` methods. DeliverySettings string `json:"delivery_settings,omitempty"` // Email: The member's email address. A member can be a user or another @@ -23094,7 +23094,11 @@ type UsersInsertCall struct { header_ http.Header } -// Insert: Creates a user. +// Insert: Creates a user. Mutate calls immediately following user +// creation might sometimes fail as the user isn't fully created due to +// propagation delay in our backends. Check the error details for the +// "User creation is not complete" message to see if this is the case. +// Retrying the calls after some time can help in this case. func (r *UsersService) Insert(user *User) *UsersInsertCall { c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.user = user @@ -23189,7 +23193,7 @@ func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*User, error) { } return ret, nil // { - // "description": "Creates a user.", + // "description": "Creates a user. Mutate calls immediately following user creation might sometimes fail as the user isn't fully created due to propagation delay in our backends. Check the error details for the \"User creation is not complete\" message to see if this is the case. Retrying the calls after some time can help in this case.", // "flatPath": "admin/directory/v1/users", // "httpMethod": "POST", // "id": "directory.users.insert", diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 238d0a12cd5..aae9019b610 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -1693,6 +1693,112 @@ } } }, + "adSenseLinks": { + "methods": { + "create": { + "description": "Creates an AdSenseLink.", + "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", + "httpMethod": "POST", + "id": "analyticsadmin.properties.adSenseLinks.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The property for which to create an AdSense Link. Format: properties/{propertyId} Example: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/adSenseLinks", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + } + }, + "delete": { + "description": "Deletes an AdSenseLink.", + "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", + "httpMethod": "DELETE", + "id": "analyticsadmin.properties.adSenseLinks.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Unique identifier for the AdSense Link to be deleted. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", + "location": "path", + "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + } + }, + "get": { + "description": "Looks up a single AdSenseLink.", + "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", + "httpMethod": "GET", + "id": "analyticsadmin.properties.adSenseLinks.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Unique identifier for the AdSense Link requested. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", + "location": "path", + "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + } + }, + "list": { + "description": "Lists AdSenseLinks on a property.", + "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", + "httpMethod": "GET", + "id": "analyticsadmin.properties.adSenseLinks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from a previous `ListAdSenseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAdSenseLinks` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the parent property. Format: properties/{propertyId} Example: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/adSenseLinks", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse" + } + } + } + }, "audiences": { "methods": { "archive": { @@ -2873,7 +2979,7 @@ ], "parameters": { "name": { - "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules", + "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}", "location": "path", "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", "required": true, @@ -4216,7 +4322,7 @@ } } }, - "revision": "20230507", + "revision": "20230516", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -4690,6 +4796,22 @@ "properties": {}, "type": "object" }, + "GoogleAnalyticsAdminV1alphaAdSenseLink": { + "description": "A link between a GA4 Property and an AdSense for Content ad client.", + "id": "GoogleAnalyticsAdminV1alphaAdSenseLink", + "properties": { + "adClientCode": { + "description": "Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: \"ca-pub-1234567890\"", + "type": "string" + }, + "name": { + "description": "Output only. The resource name for this AdSense Link resource. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/6789", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest": { "description": "Request message for ApproveDisplayVideo360AdvertiserLinkProposal RPC.", "id": "GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposalRequest", @@ -5538,6 +5660,10 @@ "$ref": "GoogleAnalyticsAdminV1alphaAccount", "description": "A snapshot of an Account resource in change history." }, + "adsenseLink": { + "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink", + "description": "A snapshot of an AdSenseLink resource in change history." + }, "attributionSettings": { "$ref": "GoogleAnalyticsAdminV1alphaAttributionSettings", "description": "A snapshot of AttributionSettings resource in change history." @@ -6389,7 +6515,7 @@ "type": "array" }, "name": { - "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules", + "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}", "readOnly": true, "type": "string" }, @@ -6823,6 +6949,24 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse": { + "description": "Response message for ListAdSenseLinks method.", + "id": "GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse", + "properties": { + "adsenseLinks": { + "description": "List of AdSenseLinks.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaListAudiencesResponse": { "description": "Response message for ListAudiences RPC.", "id": "GoogleAnalyticsAdminV1alphaListAudiencesResponse", @@ -7685,6 +7829,7 @@ "EXPANDED_DATA_SET", "CHANNEL_GROUP", "ENHANCED_MEASUREMENT_SETTINGS", + "ADSENSE_LINK", "AUDIENCE", "EVENT_CREATE_RULE" ], @@ -7708,6 +7853,7 @@ "ExpandedDataSet resource", "ChannelGroup resource", "EnhancedMeasurementSettings resource", + "AdSenseLink resource", "Audience resource", "EventCreateRule resource" ], diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index dd14ecc4a5a..1d78c696556 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -204,6 +204,7 @@ type AccountsUserLinksService struct { func NewPropertiesService(s *Service) *PropertiesService { rs := &PropertiesService{s: s} rs.AccessBindings = NewPropertiesAccessBindingsService(s) + rs.AdSenseLinks = NewPropertiesAdSenseLinksService(s) rs.Audiences = NewPropertiesAudiencesService(s) rs.BigQueryLinks = NewPropertiesBigQueryLinksService(s) rs.ChannelGroups = NewPropertiesChannelGroupsService(s) @@ -226,6 +227,8 @@ type PropertiesService struct { AccessBindings *PropertiesAccessBindingsService + AdSenseLinks *PropertiesAdSenseLinksService + Audiences *PropertiesAudiencesService BigQueryLinks *PropertiesBigQueryLinksService @@ -264,6 +267,15 @@ type PropertiesAccessBindingsService struct { s *Service } +func NewPropertiesAdSenseLinksService(s *Service) *PropertiesAdSenseLinksService { + rs := &PropertiesAdSenseLinksService{s: s} + return rs +} + +type PropertiesAdSenseLinksService struct { + s *Service +} + func NewPropertiesAudiencesService(s *Service) *PropertiesAudiencesService { rs := &PropertiesAudiencesService{s: s} return rs @@ -1324,6 +1336,45 @@ type GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse struct { googleapi.ServerResponse `json:"-"` } +// GoogleAnalyticsAdminV1alphaAdSenseLink: A link between a GA4 Property +// and an AdSense for Content ad client. +type GoogleAnalyticsAdminV1alphaAdSenseLink struct { + // AdClientCode: Immutable. The AdSense ad client code that the GA4 + // property is linked to. Example format: "ca-pub-1234567890" + AdClientCode string `json:"adClientCode,omitempty"` + + // Name: Output only. The resource name for this AdSense Link resource. + // Format: properties/{propertyId}/adSenseLinks/{linkId} Example: + // properties/1234/adSenseLinks/6789 + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdClientCode") 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. "AdClientCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaAdSenseLink) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaAdSenseLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaApproveDisplayVideo360AdvertiserLinkProposa // lRequest: Request message for // ApproveDisplayVideo360AdvertiserLinkProposal RPC. @@ -2826,6 +2877,9 @@ type GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource struct // Account: A snapshot of an Account resource in change history. Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"` + // AdsenseLink: A snapshot of an AdSenseLink resource in change history. + AdsenseLink *GoogleAnalyticsAdminV1alphaAdSenseLink `json:"adsenseLink,omitempty"` + // AttributionSettings: A snapshot of AttributionSettings resource in // change history. AttributionSettings *GoogleAnalyticsAdminV1alphaAttributionSettings `json:"attributionSettings,omitempty"` @@ -4225,7 +4279,8 @@ type GoogleAnalyticsAdminV1alphaEventCreateRule struct { // Name: Output only. Resource name for this EventCreateRule resource. // Format: - // properties/{property}/dataStreams/{data_stream}/eventCreateRules + // properties/{property}/dataStreams/{data_stream}/eventCreateRules/{even + // t_create_rule} Name string `json:"name,omitempty"` // ParameterMutations: Parameter mutations define parameter behavior on @@ -5046,6 +5101,44 @@ func (s *GoogleAnalyticsAdminV1alphaListAccountsResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse: Response message +// for ListAdSenseLinks method. +type GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse struct { + // AdsenseLinks: List of AdSenseLinks. + AdsenseLinks []*GoogleAnalyticsAdminV1alphaAdSenseLink `json:"adsenseLinks,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdsenseLinks") 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. "AdsenseLinks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaListAudiencesResponse: Response message // for ListAudiences RPC. type GoogleAnalyticsAdminV1alphaListAudiencesResponse struct { @@ -6519,6 +6612,7 @@ type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest struct { // "CHANNEL_GROUP" - ChannelGroup resource // "ENHANCED_MEASUREMENT_SETTINGS" - EnhancedMeasurementSettings // resource + // "ADSENSE_LINK" - AdSenseLink resource // "AUDIENCE" - Audience resource // "EVENT_CREATE_RULE" - EventCreateRule resource ResourceType []string `json:"resourceType,omitempty"` @@ -15396,6 +15490,621 @@ func (c *PropertiesAccessBindingsPatchCall) Do(opts ...googleapi.CallOption) (*G } +// method id "analyticsadmin.properties.adSenseLinks.create": + +type PropertiesAdSenseLinksCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaadsenselink *GoogleAnalyticsAdminV1alphaAdSenseLink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an AdSenseLink. +// +// - parent: The property for which to create an AdSense Link. Format: +// properties/{propertyId} Example: properties/1234. +func (r *PropertiesAdSenseLinksService) Create(parent string, googleanalyticsadminv1alphaadsenselink *GoogleAnalyticsAdminV1alphaAdSenseLink) *PropertiesAdSenseLinksCreateCall { + c := &PropertiesAdSenseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphaadsenselink = googleanalyticsadminv1alphaadsenselink + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesAdSenseLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksCreateCall { + 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 *PropertiesAdSenseLinksCreateCall) Context(ctx context.Context) *PropertiesAdSenseLinksCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesAdSenseLinksCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAdSenseLinksCreateCall) doRequest(alt string) (*http.Response, 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.googleanalyticsadminv1alphaadsenselink) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/adSenseLinks") + 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 "analyticsadmin.properties.adSenseLinks.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAdSenseLink or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaAdSenseLink.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PropertiesAdSenseLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAdSenseLink, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaAdSenseLink{ + ServerResponse: googleapi.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 AdSenseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.adSenseLinks.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The property for which to create an AdSense Link. Format: properties/{propertyId} Example: properties/1234", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/adSenseLinks", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + // } + // } + +} + +// method id "analyticsadmin.properties.adSenseLinks.delete": + +type PropertiesAdSenseLinksDeleteCall struct { + s *Service + nameid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an AdSenseLink. +// +// - name: Unique identifier for the AdSense Link to be deleted. Format: +// properties/{propertyId}/adSenseLinks/{linkId} Example: +// properties/1234/adSenseLinks/5678. +func (r *PropertiesAdSenseLinksService) Delete(nameid string) *PropertiesAdSenseLinksDeleteCall { + c := &PropertiesAdSenseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesAdSenseLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksDeleteCall { + 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 *PropertiesAdSenseLinksDeleteCall) Context(ctx context.Context) *PropertiesAdSenseLinksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesAdSenseLinksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAdSenseLinksDeleteCall) doRequest(alt string) (*http.Response, 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, "v1alpha/{+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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.adSenseLinks.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PropertiesAdSenseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an AdSenseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.adSenseLinks.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Unique identifier for the AdSense Link to be deleted. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", + // "location": "path", + // "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // } + // } + +} + +// method id "analyticsadmin.properties.adSenseLinks.get": + +type PropertiesAdSenseLinksGetCall struct { + s *Service + nameid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Looks up a single AdSenseLink. +// +// - name: Unique identifier for the AdSense Link requested. Format: +// properties/{propertyId}/adSenseLinks/{linkId} Example: +// properties/1234/adSenseLinks/5678. +func (r *PropertiesAdSenseLinksService) Get(nameid string) *PropertiesAdSenseLinksGetCall { + c := &PropertiesAdSenseLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesAdSenseLinksGetCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesAdSenseLinksGetCall) IfNoneMatch(entityTag string) *PropertiesAdSenseLinksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesAdSenseLinksGetCall) Context(ctx context.Context) *PropertiesAdSenseLinksGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesAdSenseLinksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAdSenseLinksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.adSenseLinks.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaAdSenseLink or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleAnalyticsAdminV1alphaAdSenseLink.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PropertiesAdSenseLinksGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAdSenseLink, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaAdSenseLink{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Looks up a single AdSenseLink.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks/{adSenseLinksId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.adSenseLinks.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Unique identifier for the AdSense Link requested. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678", + // "location": "path", + // "pattern": "^properties/[^/]+/adSenseLinks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaAdSenseLink" + // } + // } + +} + +// method id "analyticsadmin.properties.adSenseLinks.list": + +type PropertiesAdSenseLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists AdSenseLinks on a property. +// +// - parent: Resource name of the parent property. Format: +// properties/{propertyId} Example: properties/1234. +func (r *PropertiesAdSenseLinksService) List(parent string) *PropertiesAdSenseLinksListCall { + c := &PropertiesAdSenseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of resources to return. If unspecified, at most 50 resources will be +// returned. The maximum value is 200 (higher values will be coerced to +// the maximum). +func (c *PropertiesAdSenseLinksListCall) PageSize(pageSize int64) *PropertiesAdSenseLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from a previous `ListAdSenseLinks` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListAdSenseLinks` must match the call that provided the +// page token. +func (c *PropertiesAdSenseLinksListCall) PageToken(pageToken string) *PropertiesAdSenseLinksListCall { + 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 *PropertiesAdSenseLinksListCall) Fields(s ...googleapi.Field) *PropertiesAdSenseLinksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesAdSenseLinksListCall) IfNoneMatch(entityTag string) *PropertiesAdSenseLinksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesAdSenseLinksListCall) Context(ctx context.Context) *PropertiesAdSenseLinksListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesAdSenseLinksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAdSenseLinksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/adSenseLinks") + 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 "analyticsadmin.properties.adSenseLinks.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse.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 *PropertiesAdSenseLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse{ + ServerResponse: googleapi.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 AdSenseLinks on a property.", + // "flatPath": "v1alpha/properties/{propertiesId}/adSenseLinks", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.adSenseLinks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from a previous `ListAdSenseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAdSenseLinks` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the parent property. Format: properties/{propertyId} Example: properties/1234", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/adSenseLinks", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse" + // } + // } + +} + +// 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 *PropertiesAdSenseLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse) 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 "analyticsadmin.properties.audiences.archive": type PropertiesAudiencesArchiveCall struct { @@ -21461,7 +22170,8 @@ type PropertiesDataStreamsEventCreateRulesPatchCall struct { // // - name: Output only. Resource name for this EventCreateRule resource. // Format: -// properties/{property}/dataStreams/{data_stream}/eventCreateRules. +// properties/{property}/dataStreams/{data_stream}/eventCreateRules/{ev +// ent_create_rule}. func (r *PropertiesDataStreamsEventCreateRulesService) Patch(name string, googleanalyticsadminv1alphaeventcreaterule *GoogleAnalyticsAdminV1alphaEventCreateRule) *PropertiesDataStreamsEventCreateRulesPatchCall { c := &PropertiesDataStreamsEventCreateRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21581,7 +22291,7 @@ func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules", + // "description": "Output only. Resource name for this EventCreateRule resource. Format: properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}", // "location": "path", // "pattern": "^properties/[^/]+/dataStreams/[^/]+/eventCreateRules/[^/]+$", // "required": true, diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index 2c7207dda8b..7cb2c4eb665 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -313,7 +313,7 @@ } } }, - "revision": "20230402", + "revision": "20230515", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -1297,15 +1297,15 @@ }, "tokensPerDay": { "$ref": "QuotaStatus", - "description": "Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens." + "description": "Standard Analytics Properties can use up to 200,000 tokens per day; Analytics 360 Properties can use 2,000,000 tokens per day. Most requests consume fewer than 10 tokens." }, "tokensPerHour": { "$ref": "QuotaStatus", - "description": "Standard Analytics Properties can use up to 5,000 tokens per hour; Analytics 360 Properties can use 50,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas." + "description": "Standard Analytics Properties can use up to 40,000 tokens per hour; Analytics 360 Properties can use 400,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas." }, "tokensPerProjectPerHour": { "$ref": "QuotaStatus", - "description": "Analytics Properties can use up to 25% of their tokens per project per hour. This amounts to standard Analytics Properties can use up to 1,250 tokens per project per hour, and Analytics 360 Properties can use 12,500 tokens per project per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas." + "description": "Analytics Properties can use up to 35% of their tokens per project per hour. This amounts to standard Analytics Properties can use up to 14,000 tokens per project per hour, and Analytics 360 Properties can use 140,000 tokens per project per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas." } }, "type": "object" diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index 8005e679107..112375bfb4b 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -1945,22 +1945,22 @@ type PropertyQuota struct { // server errors per hour. ServerErrorsPerProjectPerHour *QuotaStatus `json:"serverErrorsPerProjectPerHour,omitempty"` - // TokensPerDay: Standard Analytics Properties can use up to 25,000 - // tokens per day; Analytics 360 Properties can use 250,000 tokens per + // TokensPerDay: Standard Analytics Properties can use up to 200,000 + // tokens per day; Analytics 360 Properties can use 2,000,000 tokens per // day. Most requests consume fewer than 10 tokens. TokensPerDay *QuotaStatus `json:"tokensPerDay,omitempty"` - // TokensPerHour: Standard Analytics Properties can use up to 5,000 - // tokens per hour; Analytics 360 Properties can use 50,000 tokens per + // TokensPerHour: Standard Analytics Properties can use up to 40,000 + // tokens per hour; Analytics 360 Properties can use 400,000 tokens per // hour. An API request consumes a single number of tokens, and that // number is deducted from all of the hourly, daily, and per project // hourly quotas. TokensPerHour *QuotaStatus `json:"tokensPerHour,omitempty"` - // TokensPerProjectPerHour: Analytics Properties can use up to 25% of + // TokensPerProjectPerHour: Analytics Properties can use up to 35% of // their tokens per project per hour. This amounts to standard Analytics - // Properties can use up to 1,250 tokens per project per hour, and - // Analytics 360 Properties can use 12,500 tokens per project per hour. + // Properties can use up to 14,000 tokens per project per hour, and + // Analytics 360 Properties can use 140,000 tokens per project per hour. // An API request consumes a single number of tokens, and that number is // deducted from all of the hourly, daily, and per project hourly // quotas. diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index 6e2d2218d90..60573231076 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -825,7 +825,7 @@ } } }, - "revision": "20230304", + "revision": "20230515", "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", "schemas": { "ClaimDeviceRequest": { @@ -1009,6 +1009,11 @@ "description": "Required. The resource name of the selected DPC (device policy controller) in the format `customers/[CUSTOMER_ID]/dpcs/*`. To list the supported DPCs, call `customers.dpcs.list`.", "type": "string" }, + "forcedResetTime": { + "description": "Optional. The timeout before forcing factory reset the device if the device doesn't go through provisioning in the setup wizard, usually due to lack of network connectivity during setup wizard. Ranges from 0-6 hours, with 2 hours being the default if unset.", + "format": "google-duration", + "type": "string" + }, "isDefault": { "description": "Required. Whether this is the default configuration that zero-touch enrollment applies to any new devices the organization purchases in the future. Only one customer configuration can be the default. Setting this value to `true`, changes the previous default configuration's `isDefault` value to `false`.", "type": "boolean" @@ -1757,7 +1762,8 @@ "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE", "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS", "SINGLE_DEVICE_STATUS_INVALID_TOKEN", - "SINGLE_DEVICE_STATUS_REVOKED_TOKEN" + "SINGLE_DEVICE_STATUS_REVOKED_TOKEN", + "SINGLE_DEVICE_STATUS_DEVICE_LIMIT_EXCEEDED" ], "enumDescriptions": [ "Invalid code. Shouldn't be used.", @@ -1769,7 +1775,8 @@ "Invalid section type.", "This section is claimed by another company.", "Invalid pre-provisioning token.", - "Revoked pre-provisioning token." + "Revoked pre-provisioning token.", + "Status used to indicate a failure due to a device limit being exceeded" ], "type": "string" } diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go index de880884978..f16ba632c38 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go @@ -516,6 +516,13 @@ type Configuration struct { // `customers.dpcs.list`. DpcResourcePath string `json:"dpcResourcePath,omitempty"` + // ForcedResetTime: Optional. The timeout before forcing factory reset + // the device if the device doesn't go through provisioning in the setup + // wizard, usually due to lack of network connectivity during setup + // wizard. Ranges from 0-6 hours, with 2 hours being the default if + // unset. + ForcedResetTime string `json:"forcedResetTime,omitempty"` + // IsDefault: Required. Whether this is the default configuration that // zero-touch enrollment applies to any new devices the organization // purchases in the future. Only one customer configuration can be the @@ -1787,6 +1794,8 @@ type PerDeviceStatusInBatch struct { // token. // "SINGLE_DEVICE_STATUS_REVOKED_TOKEN" - Revoked pre-provisioning // token. + // "SINGLE_DEVICE_STATUS_DEVICE_LIMIT_EXCEEDED" - Status used to + // indicate a failure due to a device limit being exceeded Status string `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceId") to diff --git a/androidenterprise/v1/androidenterprise-api.json b/androidenterprise/v1/androidenterprise-api.json index 064bbf1d7c0..436562a4136 100644 --- a/androidenterprise/v1/androidenterprise-api.json +++ b/androidenterprise/v1/androidenterprise-api.json @@ -2649,7 +2649,7 @@ } } }, - "revision": "20230219", + "revision": "20230515", "rootUrl": "https://androidenterprise.googleapis.com/", "schemas": { "Administrator": { @@ -4174,6 +4174,10 @@ }, "type": "array" }, + "fullDescription": { + "description": "The localized full app store description, if available.", + "type": "string" + }, "iconUrl": { "description": "A link to an image that can be used as an icon for the product. This image is suitable for use at up to 512px x 512px.", "type": "string" diff --git a/androidenterprise/v1/androidenterprise-gen.go b/androidenterprise/v1/androidenterprise-gen.go index e84167ad84b..d96fc9eff74 100644 --- a/androidenterprise/v1/androidenterprise-gen.go +++ b/androidenterprise/v1/androidenterprise-gen.go @@ -2899,6 +2899,10 @@ type Product struct { // "vpnApp" - The app is a VPN. Features []string `json:"features,omitempty"` + // FullDescription: The localized full app store description, if + // available. + FullDescription string `json:"fullDescription,omitempty"` + // IconUrl: A link to an image that can be used as an icon for the // product. This image is suitable for use at up to 512px x 512px. IconUrl string `json:"iconUrl,omitempty"` diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index d2a72232782..ceff4cdebb4 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1065,7 +1065,7 @@ } } }, - "revision": "20230418", + "revision": "20230508", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -2472,6 +2472,29 @@ }, "type": "object" }, + "DeviceConnectivityManagement": { + "description": "Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more.", + "id": "DeviceConnectivityManagement", + "properties": { + "usbDataAccess": { + "description": "Controls what can be transferred via USB, files and/or data. This is supported only on company-owned devices.", + "enum": [ + "USB_DATA_ACCESS_UNSPECIFIED", + "ALLOW_USB_DATA_TRANSFER", + "DISALLOW_USB_FILE_TRANSFER", + "DISALLOW_USB_DATA_TRANSFER" + ], + "enumDescriptions": [ + "Unspecified. Defaults to ALLOW_USB_DATA_TRANSFER, unless usbFileTransferDisabled is set to true. If usbFileTransferDisabled is set to true, this is equivalent to DISALLOW_USB_FILE_TRANSFER.", + "All types of USB data transfers are allowed. usbFileTransferDisabled is ignored.", + "Transferring files over USB is disallowed. Other types of USB data connections, such as mouse and keyboard connection, are allowed. usbFileTransferDisabled is ignored.", + "When set, all types of USB data transfers are prohibited. Supported for devices running Android 12 or above with USB HAL 1.3 or above. If the setting is not supported, DISALLOW_USB_FILE_TRANSFER will be set. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 12. A nonComplianceDetail with DEVICE_INCOMPATIBLE is reported if the device does not have USB HAL 1.3 or above. usbFileTransferDisabled is ignored." + ], + "type": "string" + } + }, + "type": "object" + }, "DeviceSettings": { "description": "Information about security related device settings on device.", "id": "DeviceSettings", @@ -3609,7 +3632,8 @@ "APP_INSTALLED", "PENDING", "APP_INCOMPATIBLE", - "APP_NOT_UPDATED" + "APP_NOT_UPDATED", + "DEVICE_INCOMPATIBLE" ], "enumDescriptions": [ "This value is disallowed.", @@ -3622,7 +3646,8 @@ "A blocked app is installed.", "The setting hasn't been applied at the time of the report, but is expected to be applied shortly.", "The setting can't be applied to the app because the app doesn't support it, for example because its target SDK version is not high enough.", - "The app is installed, but it hasn't been updated to the minimum version code specified by policy." + "The app is installed, but it hasn't been updated to the minimum version code specified by policy.", + "The device is incompatible with the policy requirements." ], "type": "string" }, @@ -3678,7 +3703,8 @@ "APP_INSTALLED", "PENDING", "APP_INCOMPATIBLE", - "APP_NOT_UPDATED" + "APP_NOT_UPDATED", + "DEVICE_INCOMPATIBLE" ], "enumDescriptions": [ "This value is disallowed.", @@ -3691,7 +3717,8 @@ "A blocked app is installed.", "The setting hasn't been applied at the time of the report, but is expected to be applied shortly.", "The setting can't be applied to the app because the app doesn't support it, for example because its target SDK version is not high enough.", - "The app is installed, but it hasn't been updated to the minimum version code specified by policy." + "The app is installed, but it hasn't been updated to the minimum version code specified by policy.", + "The device is incompatible with the policy requirements." ], "type": "string" }, @@ -4308,6 +4335,10 @@ ], "type": "string" }, + "deviceConnectivityManagement": { + "$ref": "DeviceConnectivityManagement", + "description": "Covers controls for device connectivity such as Wi-Fi, USB data access, keyboard/mouse connections, and more." + }, "deviceOwnerLockScreenInfo": { "$ref": "UserFacingMessage", "description": "The device owner information to be shown on the lock screen." @@ -4687,7 +4718,7 @@ "type": "boolean" }, "wifiConfigDisabled": { - "description": "Whether configuring Wi-Fi access points is disabled. Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).", + "description": "Whether configuring Wi-Fi networks is disabled. Supported on fully managed devices and work profiles on company-owned devices. For fully managed devices, setting this to true removes all configured networks and retains only the networks configured using openNetworkConfiguration. For work profiles on company-owned devices, existing configured networks are not affected and the user is not allowed to add, remove, or modify Wi-Fi networks. Note: If a network connection can't be made at boot time and configuring Wi-Fi is disabled then network escape hatch will be shown in order to refresh the device policy (see networkEscapeHatchEnabled).", "type": "boolean" }, "wifiConfigsLockdownEnabled": { diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 545e2699a38..fd2526e8a49 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -2188,6 +2188,55 @@ func (s *Device) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeviceConnectivityManagement: Covers controls for device connectivity +// such as Wi-Fi, USB data access, keyboard/mouse connections, and more. +type DeviceConnectivityManagement struct { + // UsbDataAccess: Controls what can be transferred via USB, files and/or + // data. This is supported only on company-owned devices. + // + // Possible values: + // "USB_DATA_ACCESS_UNSPECIFIED" - Unspecified. Defaults to + // ALLOW_USB_DATA_TRANSFER, unless usbFileTransferDisabled is set to + // true. If usbFileTransferDisabled is set to true, this is equivalent + // to DISALLOW_USB_FILE_TRANSFER. + // "ALLOW_USB_DATA_TRANSFER" - All types of USB data transfers are + // allowed. usbFileTransferDisabled is ignored. + // "DISALLOW_USB_FILE_TRANSFER" - Transferring files over USB is + // disallowed. Other types of USB data connections, such as mouse and + // keyboard connection, are allowed. usbFileTransferDisabled is ignored. + // "DISALLOW_USB_DATA_TRANSFER" - When set, all types of USB data + // transfers are prohibited. Supported for devices running Android 12 or + // above with USB HAL 1.3 or above. If the setting is not supported, + // DISALLOW_USB_FILE_TRANSFER will be set. A nonComplianceDetail with + // API_LEVEL is reported if the Android version is less than 12. A + // nonComplianceDetail with DEVICE_INCOMPATIBLE is reported if the + // device does not have USB HAL 1.3 or above. usbFileTransferDisabled is + // ignored. + UsbDataAccess string `json:"usbDataAccess,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UsbDataAccess") 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. "UsbDataAccess") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceConnectivityManagement) MarshalJSON() ([]byte, error) { + type NoMethod DeviceConnectivityManagement + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeviceSettings: Information about security related device settings on // device. type DeviceSettings struct { @@ -4006,6 +4055,8 @@ type NonComplianceDetail struct { // SDK version is not high enough. // "APP_NOT_UPDATED" - The app is installed, but it hasn't been // updated to the minimum version code specified by policy. + // "DEVICE_INCOMPATIBLE" - The device is incompatible with the policy + // requirements. NonComplianceReason string `json:"nonComplianceReason,omitempty"` // PackageName: The package name indicating which app is out of @@ -4100,6 +4151,8 @@ type NonComplianceDetailCondition struct { // SDK version is not high enough. // "APP_NOT_UPDATED" - The app is installed, but it hasn't been // updated to the minimum version code specified by policy. + // "DEVICE_INCOMPATIBLE" - The device is incompatible with the policy + // requirements. NonComplianceReason string `json:"nonComplianceReason,omitempty"` // PackageName: The package name of the app that's out of compliance. If @@ -4970,6 +5023,10 @@ type Policy struct { // "DENY" - Automatically deny a permission. DefaultPermissionPolicy string `json:"defaultPermissionPolicy,omitempty"` + // DeviceConnectivityManagement: Covers controls for device connectivity + // such as Wi-Fi, USB data access, keyboard/mouse connections, and more. + DeviceConnectivityManagement *DeviceConnectivityManagement `json:"deviceConnectivityManagement,omitempty"` + // DeviceOwnerLockScreenInfo: The device owner information to be shown // on the lock screen. DeviceOwnerLockScreenInfo *UserFacingMessage `json:"deviceOwnerLockScreenInfo,omitempty"` @@ -5341,11 +5398,16 @@ type Policy struct { // VpnConfigDisabled: Whether configuring VPN is disabled. VpnConfigDisabled bool `json:"vpnConfigDisabled,omitempty"` - // WifiConfigDisabled: Whether configuring Wi-Fi access points is - // disabled. Note: If a network connection can't be made at boot time - // and configuring Wi-Fi is disabled then network escape hatch will be - // shown in order to refresh the device policy (see - // networkEscapeHatchEnabled). + // WifiConfigDisabled: Whether configuring Wi-Fi networks is disabled. + // Supported on fully managed devices and work profiles on company-owned + // devices. For fully managed devices, setting this to true removes all + // configured networks and retains only the networks configured using + // openNetworkConfiguration. For work profiles on company-owned devices, + // existing configured networks are not affected and the user is not + // allowed to add, remove, or modify Wi-Fi networks. Note: If a network + // connection can't be made at boot time and configuring Wi-Fi is + // disabled then network escape hatch will be shown in order to refresh + // the device policy (see networkEscapeHatchEnabled). WifiConfigDisabled bool `json:"wifiConfigDisabled,omitempty"` // WifiConfigsLockdownEnabled: DEPRECATED - Use wifi_config_disabled. diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index bbaacfd85f5..aba30603183 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -2490,7 +2490,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + "description": "Required. The latest version is 2022/02.", "location": "query", "type": "string" } @@ -2628,7 +2628,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + "description": "Required. The latest version is 2022/02.", "location": "query", "type": "string" }, @@ -2899,7 +2899,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + "description": "Required. The latest version is 2022/02.", "location": "query", "type": "string" } @@ -3136,7 +3136,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + "description": "Required. The latest version is 2022/02.", "location": "query", "type": "string" }, @@ -4045,7 +4045,7 @@ } } }, - "revision": "20230425", + "revision": "20230516", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "AcquisitionTargetingRule": { @@ -6124,11 +6124,11 @@ "type": "object" }, "RegionsVersion": { - "description": "The version of the available regions being used for the specified resource.", + "description": "The version of the available regions being used for the specified resource. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353).", "id": "RegionsVersion", "properties": { "version": { - "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + "description": "Required. The latest version is 2022/02.", "type": "string" } }, diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 8dd96ee7017..3dea2463c3a 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -4248,11 +4248,13 @@ func (s *RegionalTaxRateInfo) MarshalJSON() ([]byte, error) { } // RegionsVersion: The version of the available regions being used for -// the specified resource. +// the specified resource. A string representing the version of +// available regions being used for the specified resource. Regional +// prices for the resource have to be specified according to the +// information published in this article +// (https://support.google.com/googleplay/android-developer/answer/10532353). type RegionsVersion struct { - // Version: Required. A string representing version of the available - // regions being used for the specified resource. The current version is - // 2022/02. + // Version: Required. The latest version is 2022/02. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Version") to @@ -16036,9 +16038,7 @@ func (c *MonetizationSubscriptionsCreateCall) ProductId(productId string) *Monet } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. A string representing version of -// the available regions being used for the specified resource. The -// current version is 2022/02. +// "regionsVersion.version": Required. The latest version is 2022/02. func (c *MonetizationSubscriptionsCreateCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsCreateCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -16155,7 +16155,7 @@ func (c *MonetizationSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + // "description": "Required. The latest version is 2022/02.", // "location": "query", // "type": "string" // } @@ -16686,9 +16686,7 @@ func (r *MonetizationSubscriptionsService) Patch(packageName string, productId s } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. A string representing version of -// the available regions being used for the specified resource. The -// current version is 2022/02. +// "regionsVersion.version": Required. The latest version is 2022/02. func (c *MonetizationSubscriptionsPatchCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsPatchCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -16815,7 +16813,7 @@ func (c *MonetizationSubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + // "description": "Required. The latest version is 2022/02.", // "location": "query", // "type": "string" // }, @@ -17692,9 +17690,7 @@ func (c *MonetizationSubscriptionsBasePlansOffersCreateCall) OfferId(offerId str } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. A string representing version of -// the available regions being used for the specified resource. The -// current version is 2022/02. +// "regionsVersion.version": Required. The latest version is 2022/02. func (c *MonetizationSubscriptionsBasePlansOffersCreateCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsBasePlansOffersCreateCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -17827,7 +17823,7 @@ func (c *MonetizationSubscriptionsBasePlansOffersCreateCall) Do(opts ...googleap // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + // "description": "Required. The latest version is 2022/02.", // "location": "query", // "type": "string" // } @@ -18595,9 +18591,7 @@ func (r *MonetizationSubscriptionsBasePlansOffersService) Patch(packageName stri } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. A string representing version of -// the available regions being used for the specified resource. The -// current version is 2022/02. +// "regionsVersion.version": Required. The latest version is 2022/02. func (c *MonetizationSubscriptionsBasePlansOffersPatchCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsBasePlansOffersPatchCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -18740,7 +18734,7 @@ func (c *MonetizationSubscriptionsBasePlansOffersPatchCall) Do(opts ...googleapi // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. A string representing version of the available regions being used for the specified resource. The current version is 2022/02.", + // "description": "Required. The latest version is 2022/02.", // "location": "query", // "type": "string" // }, diff --git a/api-list.json b/api-list.json index ffaea337524..8e07ec3de5c 100644 --- a/api-list.json +++ b/api-list.json @@ -6133,7 +6133,7 @@ "name": "workstations", "version": "v1beta", "title": "Cloud Workstations API", - "description": "", + "description": "Allows administrators to create managed developer environments in the cloud.", "discoveryRestUrl": "https://workstations.googleapis.com/$discovery/rest?version=v1beta", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 3dfc4e15175..218eeb6cada 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -1589,7 +1589,7 @@ } } }, - "revision": "20230502", + "revision": "20230508", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1782,6 +1782,28 @@ }, "type": "object" }, + "GoogetArtifact": { + "description": "A detailed representation of a GooGet artifact.", + "id": "GoogetArtifact", + "properties": { + "architecture": { + "description": "Output only. Operating system architecture of the artifact.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The Artifact Registry resource name of the artifact.", + "readOnly": true, + "type": "string" + }, + "packageName": { + "description": "Output only. The GooGet package name of the artifact.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleDevtoolsArtifactregistryV1File": { "description": "Files store content that is potentially associated with Packages or Versions.", "id": "GoogleDevtoolsArtifactregistryV1File", @@ -1924,6 +1946,21 @@ }, "type": "object" }, + "ImportGoogetArtifactsErrorInfo": { + "description": "Error information explaining why a package was not imported.", + "id": "ImportGoogetArtifactsErrorInfo", + "properties": { + "error": { + "$ref": "Status", + "description": "The detailed error status." + }, + "gcsSource": { + "$ref": "ImportGoogetArtifactsGcsSource", + "description": "Google Cloud Storage location requested." + } + }, + "type": "object" + }, "ImportGoogetArtifactsGcsSource": { "description": "Google Cloud Storage location where the artifacts currently reside.", "id": "ImportGoogetArtifactsGcsSource", @@ -1942,6 +1979,12 @@ }, "type": "object" }, + "ImportGoogetArtifactsMetadata": { + "description": "The operation metadata for importing artifacts.", + "id": "ImportGoogetArtifactsMetadata", + "properties": {}, + "type": "object" + }, "ImportGoogetArtifactsRequest": { "description": "The request to import new googet artifacts.", "id": "ImportGoogetArtifactsRequest", @@ -1953,6 +1996,27 @@ }, "type": "object" }, + "ImportGoogetArtifactsResponse": { + "description": "The response message from importing artifacts.", + "id": "ImportGoogetArtifactsResponse", + "properties": { + "errors": { + "description": "Detailed error info for packages that were not imported.", + "items": { + "$ref": "ImportGoogetArtifactsErrorInfo" + }, + "type": "array" + }, + "googetArtifacts": { + "description": "The GooGet artifacts updated.", + "items": { + "$ref": "GoogetArtifact" + }, + "type": "array" + } + }, + "type": "object" + }, "ImportYumArtifactsErrorInfo": { "description": "Error information explaining why a package was not imported.", "id": "ImportYumArtifactsErrorInfo", @@ -2221,7 +2285,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { @@ -2828,12 +2892,32 @@ }, "type": "object" }, + "UploadGoogetArtifactMetadata": { + "description": "The operation metadata for uploading artifacts.", + "id": "UploadGoogetArtifactMetadata", + "properties": {}, + "type": "object" + }, "UploadGoogetArtifactRequest": { "description": "The request to upload an artifact.", "id": "UploadGoogetArtifactRequest", "properties": {}, "type": "object" }, + "UploadGoogetArtifactResponse": { + "description": "The response of the completed artifact upload operation. This response is contained in the Operation and available to users.", + "id": "UploadGoogetArtifactResponse", + "properties": { + "googetArtifacts": { + "description": "The Apt artifacts updated.", + "items": { + "$ref": "GoogetArtifact" + }, + "type": "array" + } + }, + "type": "object" + }, "UploadKfpArtifactMediaResponse": { "description": "The response to upload an artifact.", "id": "UploadKfpArtifactMediaResponse", diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index bdd942e2396..a48b42ab09f 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -708,6 +708,42 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogetArtifact: A detailed representation of a GooGet artifact. +type GoogetArtifact struct { + // Architecture: Output only. Operating system architecture of the + // artifact. + Architecture string `json:"architecture,omitempty"` + + // Name: Output only. The Artifact Registry resource name of the + // artifact. + Name string `json:"name,omitempty"` + + // PackageName: Output only. The GooGet package name of the artifact. + PackageName string `json:"packageName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Architecture") 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. "Architecture") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogetArtifact) MarshalJSON() ([]byte, error) { + type NoMethod GoogetArtifact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleDevtoolsArtifactregistryV1File: Files store content that is // potentially associated with Packages or Versions. type GoogleDevtoolsArtifactregistryV1File struct { @@ -930,6 +966,38 @@ func (s *ImportAptArtifactsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportGoogetArtifactsErrorInfo: Error information explaining why a +// package was not imported. +type ImportGoogetArtifactsErrorInfo struct { + // Error: The detailed error status. + Error *Status `json:"error,omitempty"` + + // GcsSource: Google Cloud Storage location requested. + GcsSource *ImportGoogetArtifactsGcsSource `json:"gcsSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportGoogetArtifactsErrorInfo) MarshalJSON() ([]byte, error) { + type NoMethod ImportGoogetArtifactsErrorInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ImportGoogetArtifactsGcsSource: Google Cloud Storage location where // the artifacts currently reside. type ImportGoogetArtifactsGcsSource struct { @@ -963,6 +1031,11 @@ func (s *ImportGoogetArtifactsGcsSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportGoogetArtifactsMetadata: The operation metadata for importing +// artifacts. +type ImportGoogetArtifactsMetadata struct { +} + // ImportGoogetArtifactsRequest: The request to import new googet // artifacts. type ImportGoogetArtifactsRequest struct { @@ -993,6 +1066,38 @@ func (s *ImportGoogetArtifactsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImportGoogetArtifactsResponse: The response message from importing +// artifacts. +type ImportGoogetArtifactsResponse struct { + // Errors: Detailed error info for packages that were not imported. + Errors []*ImportGoogetArtifactsErrorInfo `json:"errors,omitempty"` + + // GoogetArtifacts: The GooGet artifacts updated. + GoogetArtifacts []*GoogetArtifact `json:"googetArtifacts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImportGoogetArtifactsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ImportGoogetArtifactsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ImportYumArtifactsErrorInfo: Error information explaining why a // package was not imported. type ImportYumArtifactsErrorInfo struct { @@ -1524,7 +1629,7 @@ func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". @@ -2590,10 +2695,46 @@ func (s *UploadGoogetArtifactMediaResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UploadGoogetArtifactMetadata: The operation metadata for uploading +// artifacts. +type UploadGoogetArtifactMetadata struct { +} + // UploadGoogetArtifactRequest: The request to upload an artifact. type UploadGoogetArtifactRequest struct { } +// UploadGoogetArtifactResponse: The response of the completed artifact +// upload operation. This response is contained in the Operation and +// available to users. +type UploadGoogetArtifactResponse struct { + // GoogetArtifacts: The Apt artifacts updated. + GoogetArtifacts []*GoogetArtifact `json:"googetArtifacts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GoogetArtifacts") 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. "GoogetArtifacts") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UploadGoogetArtifactResponse) MarshalJSON() ([]byte, error) { + type NoMethod UploadGoogetArtifactResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UploadKfpArtifactMediaResponse: The response to upload an artifact. type UploadKfpArtifactMediaResponse struct { // Operation: Operation that will be returned to the user. diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index d03b484e817..2c5bbe09698 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20230502", + "revision": "20230508", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { @@ -1157,7 +1157,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index 8c7a1e9ef26..b6405656b44 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -693,7 +693,7 @@ func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 06832c43919..9a4aa0fa504 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -1135,7 +1135,7 @@ } } }, - "revision": "20230502", + "revision": "20230508", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1553,7 +1553,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index 5c9c3793cfb..d410a28e71d 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -1032,7 +1032,7 @@ func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 89ea972ba35..10907505e00 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -5,9 +5,15 @@ "https://www.googleapis.com/auth/chat.bot": { "description": "Private Service: https://www.googleapis.com/auth/chat.bot" }, + "https://www.googleapis.com/auth/chat.delete": { + "description": "Delete conversations and spaces \u0026 remove access to associated files in Google Chat" + }, "https://www.googleapis.com/auth/chat.memberships": { "description": "View, add, and remove members from conversations in Google Chat" }, + "https://www.googleapis.com/auth/chat.memberships.app": { + "description": "Add and remove itself from conversations in Google Chat" + }, "https://www.googleapis.com/auth/chat.memberships.readonly": { "description": "View members in Google Chat conversations." }, @@ -17,12 +23,24 @@ "https://www.googleapis.com/auth/chat.messages.create": { "description": "Compose and send messages in Google Chat" }, + "https://www.googleapis.com/auth/chat.messages.reactions": { + "description": "View, add, and delete reactions to messages in Google Chat" + }, + "https://www.googleapis.com/auth/chat.messages.reactions.create": { + "description": "Add reactions to messages in Google Chat" + }, + "https://www.googleapis.com/auth/chat.messages.reactions.readonly": { + "description": "View reactions to messages in Google Chat" + }, "https://www.googleapis.com/auth/chat.messages.readonly": { "description": "View messages and reactions in Google Chat" }, "https://www.googleapis.com/auth/chat.spaces": { "description": "Create conversations and spaces and view or update metadata (including history settings) in Google Chat" }, + "https://www.googleapis.com/auth/chat.spaces.create": { + "description": "Create new conversations in Google Chat" + }, "https://www.googleapis.com/auth/chat.spaces.readonly": { "description": "View chat and spaces in Google Chat" } @@ -155,11 +173,130 @@ "https://www.googleapis.com/auth/chat.messages.readonly" ], "supportsMediaDownload": true + }, + "upload": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Uploads an attachment. Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?\u0026co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).", + "flatPath": "v1/spaces/{spacesId}/attachments:upload", + "httpMethod": "POST", + "id": "chat.media.upload", + "mediaUpload": { + "accept": [ + "*/*" + ], + "maxSize": "209715200", + "protocols": { + "resumable": { + "multipart": true, + "path": "/resumable/upload/v1/{+parent}/attachments:upload" + }, + "simple": { + "multipart": true, + "path": "/upload/v1/{+parent}/attachments:upload" + } + } + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the Chat space in which the attachment is uploaded. Format \"spaces/{space}\".", + "location": "path", + "pattern": "^spaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/attachments:upload", + "request": { + "$ref": "UploadAttachmentRequest" + }, + "response": { + "$ref": "UploadAttachmentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.create" + ], + "supportsMediaUpload": true } } }, "spaces": { "methods": { + "create": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a named space. Spaces grouped by topics or that have guest access are not supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + "flatPath": "v1/spaces", + "httpMethod": "POST", + "id": "chat.spaces.create", + "parameterOrder": [], + "parameters": { + "requestId": { + "description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.", + "location": "query", + "type": "string" + } + }, + "path": "v1/spaces", + "request": { + "$ref": "Space" + }, + "response": { + "$ref": "Space" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.create" + ] + }, + "delete": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a named space. Always performs a cascading delete, which means that the space's child resources - like messages posted in the space and memberships in the space - are also deleted. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) from a user who has permission to delete the space, and the `chat.delete` scope.", + "flatPath": "v1/spaces/{spacesId}", + "httpMethod": "DELETE", + "id": "chat.spaces.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the space to delete. Format: spaces/{space}", + "location": "path", + "pattern": "^spaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.delete" + ] + }, + "findDirectMessage": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Returns the existing direct message with the specified user. With [user authentication](https://developers.google.com/chat/api/guides/auth/users), returns the direct message space between the specified user and the authenticated user. With [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts), returns the direct message space between the specified user and the calling Chat app. If no direct message space is found, returns a `404 NOT_FOUND` error. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) or [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", + "flatPath": "v1/spaces:findDirectMessage", + "httpMethod": "GET", + "id": "chat.spaces.findDirectMessage", + "parameterOrder": [], + "parameters": { + "name": { + "description": "Required. Resource name of the user to find direct message with. Format: users/{user}, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person.resourceName` is `people/123456789`, you can find a direct message with that person by using `users/123456789` as the `name`.", + "location": "query", + "type": "string" + } + }, + "path": "v1/spaces:findDirectMessage", + "response": { + "$ref": "Space" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.readonly" + ] + }, "get": { "description": "Returns a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope.", "flatPath": "v1/spaces/{spacesId}", @@ -194,6 +331,11 @@ "id": "chat.spaces.list", "parameterOrder": [], "parameters": { + "filter": { + "description": "Optional. A query filter. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). You can filter spaces by the space type ([`space_type`](https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid `enum` value, such as `SPACE` or `GROUP_CHAT` (the `space_type` cannot be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ``` space_type = \"SPACE\" spaceType = \"GROUP_CHAT\" OR spaceType = \"DIRECT_MESSAGE\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error. With [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts), this field is ignored and the query always returns all spaces. But Chat API still validates the query syntax with service accounts, so invalid queries are still rejected. [Developer Preview](https://developers.google.com/workspace/preview).", + "location": "query", + "type": "string" + }, "pageSize": { "description": "Optional. The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an `INVALID_ARGUMENT` error.", "format": "int32", @@ -215,11 +357,119 @@ "https://www.googleapis.com/auth/chat.spaces", "https://www.googleapis.com/auth/chat.spaces.readonly" ] + }, + "patch": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Updates a space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces` scope.", + "flatPath": "v1/spaces/{spacesId}", + "httpMethod": "PATCH", + "id": "chat.spaces.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name of the space. Format: spaces/{space}", + "location": "path", + "pattern": "^spaces/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The field paths to be updated, comma separated if there are multiple. Currently supported field paths: - display_name (Only supports changing the display name of a space with the SPACE type, or when also including the `space_type` mask to change a GROUP_CHAT space type to SPACE. Trying to update the display name of a GROUP_CHAT or a DIRECT_MESSAGE space results in an invalid argument error.) - space_type (Only supports changing a GROUP_CHAT space type to SPACE. Include `display_name` together with `space_type` in the update mask and ensure that the specified space has a non-empty display name and the SPACE space type. Including the `space_type` mask and the SPACE type in the specified space when updating the display name is optional if the existing space already has the SPACE type. Trying to update the space type in other ways results in an invalid argument error). - space_details - space_history_state (Supports [turning history on or off for the space](https://support.google.com/chat/answer/7664687) if [the organization allows users to change their history setting](https://support.google.com/a/answer/7664184). Warning: mutually exclusive with all other field paths.)", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Space" + }, + "response": { + "$ref": "Space" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.spaces" + ] + }, + "setup": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person` `resourceName` is `people/123456789`, you can add the user to the space by including a membership with `users/123456789` as the `member.name`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to true and don't specify any memberships. You can only use this method to add app memberships to DMs. To add the calling app as a member of other space types, use [create membership](https://developers.google.com/chat/api/reference/rest/v1/spaces.members/create) If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access are not supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + "flatPath": "v1/spaces:setup", + "httpMethod": "POST", + "id": "chat.spaces.setup", + "parameterOrder": [], + "parameters": {}, + "path": "v1/spaces:setup", + "request": { + "$ref": "SetUpSpaceRequest" + }, + "response": { + "$ref": "Space" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.create" + ] } }, "resources": { "members": { "methods": { + "create": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a human membership or app membership for the calling app. Creating memberships for other apps is not supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` (for human membership) or `chat.memberships.app` (for app membership) scope. To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to the space, use `users/app`. - To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person` `resourceName` is `people/123456789`, the user can be added to the space by setting the `membership.member.name` to `users/123456789`.", + "flatPath": "v1/spaces/{spacesId}/members", + "httpMethod": "POST", + "id": "chat.spaces.members.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the space for which to create the membership. Format: spaces/{space}", + "location": "path", + "pattern": "^spaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/members", + "request": { + "$ref": "Membership" + }, + "response": { + "$ref": "Membership" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.app" + ] + }, + "delete": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a membership. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` or `chat.memberships.app` authorization scope.", + "flatPath": "v1/spaces/{spacesId}/members/{membersId}", + "httpMethod": "DELETE", + "id": "chat.spaces.members.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. When deleting an app membership, requires the `chat.memberships.app` scope and `spaces/{space}/members/app` format. Format: spaces/{space}/members/{member} or spaces/{space}/members/app", + "location": "path", + "pattern": "^spaces/[^/]+/members/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Membership" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.app" + ] + }, "get": { "description": "Returns a membership. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", "flatPath": "v1/spaces/{spacesId}/members/{membersId}", @@ -256,6 +506,11 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of memberships to return. The service may return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an INVALID_ARGUMENT error.", "format": "int32", @@ -273,6 +528,11 @@ "pattern": "^spaces/[^/]+$", "required": true, "type": "string" + }, + "showInvited": { + "description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", + "location": "query", + "type": "boolean" } }, "path": "v1/{+parent}/members", @@ -358,6 +618,11 @@ "name" ], "parameters": { + "force": { + "description": "When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when [authenticating as a user](https://developers.google.com/chat/api/guides/auth/users). Has no effect when [authenticating with a service account] (https://developers.google.com/chat/api/guides/auth/service-accounts).", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Resource name of the message to be deleted, in the form \"spaces/*/messages/*\" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB", "location": "path", @@ -402,6 +667,58 @@ "https://www.googleapis.com/auth/chat.messages.readonly" ] }, + "list": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope. This method is only supported in spaces that don't allow users from outside the Workspace organization to join.", + "flatPath": "v1/spaces/{spacesId}/messages", + "httpMethod": "GET", + "id": "chat.spaces.messages.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify the `create_time` with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and double quotation marks. For example, `\"2023-04-21T11:30:00-04:00\"`. You can use the greater than operator `\u003e` to list messages that were created after a timestamp, or the less than operator `\u003c` to list messages that were created before a timestamp. To filter messages within a time interval, use the `AND` operator between two timestamps. To filter by thread, specify the `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only specify one `thread.name` per query. To filter by both thread and date, use the `AND` operator in your query. For example, the following queries are valid: ``` create_time \u003e \"2012-04-21T11:30:00-04:00\" create_time \u003e \"2012-04-21T11:30:00-04:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time \u003e \"2012-04-21T11:30:00+00:00\" AND create_time \u003c \"2013-01-01T00:00:00+00:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional, if resuming from a previous query. How the list of messages is ordered. Specify a value to order by and an ordering operation. Valid ordering operation values are: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of messages returned. The service may return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an `INVALID_ARGUMENT` error.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional, if resuming from a previous query. A page token received from a previous list messages call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters may lead to unexpected results.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the space to list messages from. Format: spaces/{space}", + "location": "path", + "pattern": "^spaces/[^/]+$", + "required": true, + "type": "string" + }, + "showDeleted": { + "description": "Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/messages", + "response": { + "$ref": "ListMessagesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.readonly" + ] + }, "patch": { "description": "Updates a message. There's a difference between `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", @@ -512,13 +829,117 @@ ] } } + }, + "reactions": { + "methods": { + "create": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a reaction and adds it to a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages`, `chat.messages.reactions`, or `chat.messages.reactions.create` scope. Only unicode emoji are supported.", + "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", + "httpMethod": "POST", + "id": "chat.spaces.messages.reactions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The message where the reaction is created. Format: spaces/{space}/messages/{message}", + "location": "path", + "pattern": "^spaces/[^/]+/messages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/reactions", + "request": { + "$ref": "Reaction" + }, + "response": { + "$ref": "Reaction" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.create" + ] + }, + "delete": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a reaction to a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.reactions` scope.", + "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions/{reactionsId}", + "httpMethod": "DELETE", + "id": "chat.spaces.messages.reactions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the reaction to delete. Format: spaces/{space}/messages/{message}/reactions/{reaction}", + "location": "path", + "pattern": "^spaces/[^/]+/messages/[^/]+/reactions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions" + ] + }, + "list": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists reactions to a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and `chat.messages`, `chat.messages.readonly`, `chat.messages.reactions`, or `chat.messages.reactions.readonly` scope.", + "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", + "httpMethod": "GET", + "id": "chat.spaces.messages.reactions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A query filter. You can filter reactions by [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji) (either `emoji.unicode` or `emoji.custom_emoji.uid`) and [user](https://developers.google.com/chat/api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple emojis or users, join similar fields with the `OR` operator, such as `emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\"` and `user.name = \"users/AAAAAA\" OR user.name = \"users/BBBBBB\"`. To filter reactions by emoji and user, use the `AND` operator, such as `emoji.unicode = \"🙂\" AND user.name = \"users/AAAAAA\"`. If your query uses both `AND` and `OR`, group them with parentheses. For example, the following queries are valid: ``` user.name = \"users/{user}\" emoji.unicode = \"🙂\" emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" AND user.name = \"users/{user}\" (emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\") AND user.name = \"users/{user}\" ``` The following queries are invalid: ``` emoji.unicode = \"🙂\" AND emoji.unicode = \"👍\" emoji.unicode = \"🙂\" AND emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" AND user.name = \"users/{user}\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of reactions returned. The service may return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The message users reacted to. Format: spaces/{space}/messages/{message}", + "location": "path", + "pattern": "^spaces/[^/]+/messages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/reactions", + "response": { + "$ref": "ListReactionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.messages", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + "https://www.googleapis.com/auth/chat.messages.readonly" + ] + } + } } } } } } }, - "revision": "20230423", + "revision": "20230514", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -717,6 +1138,10 @@ "AttachmentDataRef": { "id": "AttachmentDataRef", "properties": { + "attachmentUploadToken": { + "description": "Opaque token containing a reference to an uploaded attachment. Treated by clients as an opaque string and used to create or update Chat messages with attachments. [Developer Preview](https://developers.google.com/workspace/preview).", + "type": "string" + }, "resourceName": { "description": "The resource name of the attachment data. This is used with the media API to download the attachment data.", "type": "string" @@ -955,6 +1380,17 @@ }, "type": "object" }, + "CustomEmoji": { + "description": "Represents a custom emoji. [Developer Preview](https://developers.google.com/workspace/preview).", + "id": "CustomEmoji", + "properties": { + "uid": { + "description": "Unique key for the custom emoji resource.", + "type": "string" + } + }, + "type": "object" + }, "DateInput": { "description": "Date input values.", "id": "DateInput", @@ -987,6 +1423,35 @@ }, "type": "object" }, + "DeletionMetadata": { + "description": "Information about a deleted message. A message is deleted when `delete_time` is set. [Developer Preview](https://developers.google.com/workspace/preview).", + "id": "DeletionMetadata", + "properties": { + "deletionType": { + "description": "Indicates who deleted the message.", + "enum": [ + "DELETION_TYPE_UNSPECIFIED", + "CREATOR", + "SPACE_OWNER", + "ADMIN", + "APP_MESSAGE_EXPIRY", + "CREATOR_VIA_APP", + "SPACE_OWNER_VIA_APP" + ], + "enumDescriptions": [ + "This value is unused.", + "User deleted their own message.", + "The space owner deleted the message.", + "A Google Workspace admin deleted the message.", + "A Chat app deleted its own message when it expired.", + "A Chat app deleted the message on behalf of the user.", + "A Chat app deleted the message on behalf of the space owner." + ], + "type": "string" + } + }, + "type": "object" + }, "DeprecatedEvent": { "description": "Google Chat events.", "id": "DeprecatedEvent", @@ -1106,6 +1571,38 @@ }, "type": "object" }, + "Emoji": { + "description": "An emoji that is used as a reaction to a message. [Developer Preview](https://developers.google.com/workspace/preview).", + "id": "Emoji", + "properties": { + "customEmoji": { + "$ref": "CustomEmoji", + "description": "Output only. A custom emoji.", + "readOnly": true + }, + "unicode": { + "description": "A basic emoji represented by a unicode string.", + "type": "string" + } + }, + "type": "object" + }, + "EmojiReactionSummary": { + "description": "The number of people who reacted to a message with a specific emoji. [Developer Preview](https://developers.google.com/workspace/preview).", + "id": "EmojiReactionSummary", + "properties": { + "emoji": { + "$ref": "Emoji", + "description": "Emoji associated with the reactions." + }, + "reactionCount": { + "description": "The total number of reactions using the associated emoji.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1343,6 +1840,13 @@ "secondaryButton": { "$ref": "GoogleAppsCardV1Button", "description": "The secondary button of the fixed footer. The button must be a text button with text and color set. `primaryButton` must be set if `secondaryButton` is set." + }, + "widgets": { + "description": "A list of widgets included in the card footer. Primary button and secondary button are rendered below these widgets.", + "items": { + "$ref": "GoogleAppsCardV1FooterWidget" + }, + "type": "array" } }, "type": "object" @@ -1382,43 +1886,117 @@ }, "type": "object" }, + "GoogleAppsCardV1Column": { + "description": "A column.", + "id": "GoogleAppsCardV1Column", + "properties": { + "horizontalAlignment": { + "description": "Specifies whether widgets align to the left, right, or center of a column.", + "enum": [ + "HORIZONTAL_ALIGNMENT_UNSPECIFIED", + "START", + "CENTER", + "END" + ], + "enumDescriptions": [ + "Unspecified. Do not use.", + "Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right.", + "Aligns widgets to the center of the column.", + "Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left." + ], + "type": "string" + }, + "horizontalSizeStyle": { + "description": "Specifies how a column fills the width of the card.", + "enum": [ + "HORIZONTAL_SIZE_STYLE_UNSPECIFIED", + "FILL_AVAILABLE_SPACE", + "FILL_MINIMUM_SPACE" + ], + "enumDescriptions": [ + "Unspecified. Do not use.", + "Default value. Column fills the available space, up to 70% of the card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each column fills 50% of the space.", + "Column fills the least amount of space possible and no more than 30% of the card's width." + ], + "type": "string" + }, + "verticalAlignment": { + "description": "Specifies whether widgets align to the top, bottom, or center of a column.", + "enum": [ + "VERTICAL_ALIGNMENT_UNSPECIFIED", + "CENTER", + "TOP", + "BOTTOM" + ], + "enumDescriptions": [ + "Unspecified. Do not use.", + "Default value. Aligns widgets to the center of a column.", + "Aligns widgets to the top of a column.", + "Aligns widgets to the bottom of a column." + ], + "type": "string" + }, + "widgets": { + "description": "An array of widgets included in a column. Widgets appear in the order that they are specified.", + "items": { + "$ref": "GoogleAppsCardV1Widgets" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleAppsCardV1Columns": { + "description": "The `Columns` widget displays up to 2 columns in a card message or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget. Supported by Chat apps, but not Google Workspace Add-ons.", + "id": "GoogleAppsCardV1Columns", + "properties": { + "columnItems": { + "description": "An array of columns. You can include up to 2 columns in a card or dialog.", + "items": { + "$ref": "GoogleAppsCardV1Column" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleAppsCardV1DateTimePicker": { - "description": "Lets users specify a date, a time, or both a date and a time. Accepts text input from users, but features an interactive date and time selector that helps users enter correctly-formatted dates and times. If users enter a date or time incorrectly, the widget shows an error that prompts users to enter the correct format. Not supported by Chat apps. Support by Chat apps coming soon.", + "description": "Lets users input a date, a time, or both a date and a time. Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly.", "id": "GoogleAppsCardV1DateTimePicker", "properties": { "label": { - "description": "The text that prompts users to enter a date, time, or datetime. Specify text that helps the user enter the information your app needs. For example, if users are setting an appointment, then a label like \"Appointment date\" or \"Appointment date and time\" might work well.", + "description": "The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.", "type": "string" }, "name": { - "description": "The name by which the datetime picker is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).", + "description": "The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).", "type": "string" }, "onChangeAction": { "$ref": "GoogleAppsCardV1Action", - "description": "Triggered when the user clicks **Save** or **Clear** from the datetime picker interface." + "description": "Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface." }, "timezoneOffsetDate": { - "description": "The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If not set, it uses the user's time zone setting on the client side.", + "description": "The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting.", "format": "int32", "type": "integer" }, "type": { - "description": "What kind of date and time input the datetime picker supports.", + "description": "Whether the widget supports inputting a date, a time, or the date and time.", "enum": [ "DATE_AND_TIME", "DATE_ONLY", "TIME_ONLY" ], "enumDescriptions": [ - "The user can select a date and time.", - "The user can only select a date.", - "The user can only select a time." + "Users input a date and time.", + "Users input a date.", + "Users input a time." ], "type": "string" }, "valueMsEpoch": { - "description": "The value displayed as the default value before user input or previous user input, represented in milliseconds ([Epoch time](https://en.wikipedia.org/wiki/Unix_time)). For `DATE_AND_TIME` type, the full epoch value is used. For `DATE_ONLY` type, only date of the epoch time is used. For `TIME_ONLY` type, only time of the epoch time is used. For example, to represent 3:00 AM, set epoch time to `3 * 60 * 60 * 1000`.", + "description": "The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).", "format": "int64", "type": "string" } @@ -1478,8 +2056,35 @@ "properties": {}, "type": "object" }, + "GoogleAppsCardV1FooterWidget": { + "description": "The CardFixedFooter can contain a list of these widgets.", + "id": "GoogleAppsCardV1FooterWidget", + "properties": { + "buttonList": { + "$ref": "GoogleAppsCardV1ButtonList", + "description": "ButtonList widget." + }, + "dateTimePicker": { + "$ref": "GoogleAppsCardV1DateTimePicker", + "description": "DateTimePicker widget." + }, + "decoratedText": { + "$ref": "GoogleAppsCardV1DecoratedText", + "description": "DecoratedText widget." + }, + "textInput": { + "$ref": "GoogleAppsCardV1TextInput", + "description": "TextInput widget." + }, + "textParagraph": { + "$ref": "GoogleAppsCardV1TextParagraph", + "description": "TextParagraph widget." + } + }, + "type": "object" + }, "GoogleAppsCardV1Grid": { - "description": "Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```", + "description": "Displays a grid with a collection of items. Items can only include text or images. A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. For responsive columns, or to include more than text or images, use `Columns`. For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```", "id": "GoogleAppsCardV1Grid", "properties": { "borderStyle": { @@ -1510,7 +2115,7 @@ "type": "object" }, "GoogleAppsCardV1GridItem": { - "description": "Represents a single item in the grid layout.", + "description": "Represents an item in a grid layout. Items can contain text, an image, or both text and an image.", "id": "GoogleAppsCardV1GridItem", "properties": { "id": { @@ -1923,9 +2528,13 @@ "$ref": "GoogleAppsCardV1ButtonList", "description": "A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` \"buttonList\": { \"buttons\": [ { \"text\": \"Edit\", \"color\": { \"red\": 0, \"green\": 0, \"blue\": 1, \"alpha\": 1 }, \"disabled\": true, }, { \"icon\": { \"knownIcon\": \"INVITE\", \"altText\": \"check calendar\" }, \"onClick\": { \"openLink\": { \"url\": \"https://example.com/calendar\" } } } ] } ```" }, + "columns": { + "$ref": "GoogleAppsCardV1Columns", + "description": "Displays up to 2 columns. To include more than 2 columns, or to use rows, use the `Grid` widget. For example, the following JSON creates 2 columns that each contain text paragraphs: ``` \"columns\": { \"columnItems\": [ { \"horizontalSizeStyle\": \"FILL_AVAILABLE_SPACE\", \"horizontalAlignment\": \"CENTER\", \"verticalAlignment\": \"CENTER\", \"widgets\": [ { \"textParagraph\": { \"text\": \"First column text paragraph\" } } ] }, { \"horizontalSizeStyle\": \"FILL_AVAILABLE_SPACE\", \"horizontalAlignment\": \"CENTER\", \"verticalAlignment\": \"CENTER\", \"widgets\": [ { \"textParagraph\": { \"text\": \"Second column text paragraph\" } } ] } ] } ```" + }, "dateTimePicker": { "$ref": "GoogleAppsCardV1DateTimePicker", - "description": "Displays a selection/input widget for date, time, or date and time. Not supported by Chat apps. Support by Chat apps is coming soon. For example, the following JSON creates a datetime picker to schedule an appointment: ``` \"dateTimePicker\": { \"name\": \"appointment_time\", \"label\": \"Book your appointment at:\", \"type\": \"DATE_AND_TIME\", \"valueMsEpoch\": \"796435200000\" } ```" + "description": "Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` \"dateTimePicker\": { \"name\": \"appointment_time\", \"label\": \"Book your appointment at:\", \"type\": \"DATE_AND_TIME\", \"valueMsEpoch\": \"796435200000\" } ```" }, "decoratedText": { "$ref": "GoogleAppsCardV1DecoratedText", @@ -1939,6 +2548,22 @@ "$ref": "GoogleAppsCardV1Grid", "description": "Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```" }, + "horizontalAlignment": { + "description": "Specifies whether widgets align to the left, right, or center of a column.", + "enum": [ + "HORIZONTAL_ALIGNMENT_UNSPECIFIED", + "START", + "CENTER", + "END" + ], + "enumDescriptions": [ + "Unspecified. Do not use.", + "Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right.", + "Aligns widgets to the center of the column.", + "Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left." + ], + "type": "string" + }, "image": { "$ref": "GoogleAppsCardV1Image", "description": "Displays an image. For example, the following JSON creates an image with alternative text: ``` \"image\": { \"imageUrl\": \"https://developers.google.com/chat/images/quickstart-app-avatar.png\", \"altText\": \"Chat app avatar\" } ```" @@ -1958,6 +2583,41 @@ }, "type": "object" }, + "GoogleAppsCardV1Widgets": { + "description": "The supported widgets that you can include in a column.", + "id": "GoogleAppsCardV1Widgets", + "properties": { + "buttonList": { + "$ref": "GoogleAppsCardV1ButtonList", + "description": "ButtonList widget." + }, + "dateTimePicker": { + "$ref": "GoogleAppsCardV1DateTimePicker", + "description": "DateTimePicker widget." + }, + "decoratedText": { + "$ref": "GoogleAppsCardV1DecoratedText", + "description": "DecoratedText widget." + }, + "image": { + "$ref": "GoogleAppsCardV1Image", + "description": "Image widget." + }, + "selectionInput": { + "$ref": "GoogleAppsCardV1SelectionInput", + "description": "SelectionInput widget." + }, + "textInput": { + "$ref": "GoogleAppsCardV1TextInput", + "description": "TextInput widget." + }, + "textParagraph": { + "$ref": "GoogleAppsCardV1TextParagraph", + "description": "TextParagraph widget." + } + }, + "type": "object" + }, "Image": { "description": "An image that is specified by a URL and can have an onclick action.", "id": "Image", @@ -2212,6 +2872,40 @@ }, "type": "object" }, + "ListMessagesResponse": { + "id": "ListMessagesResponse", + "properties": { + "messages": { + "description": "List of messages.", + "items": { + "$ref": "Message" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "ListReactionsResponse": { + "id": "ListReactionsResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token to retrieve the next page of results. It will be empty for the last page of results.", + "type": "string" + }, + "reactions": { + "description": "List of reactions in the requested (or first) page.", + "items": { + "$ref": "Reaction" + }, + "type": "array" + } + }, + "type": "object" + }, "ListSpacesResponse": { "id": "ListSpacesResponse", "properties": { @@ -2314,7 +3008,7 @@ "description": "Input only. Parameters that a Chat app can use to configure how its response is posted." }, "annotations": { - "description": "Output only. Annotations associated with the text in this message.", + "description": "Output only. Annotations associated with the `text` in this message.", "items": { "$ref": "Annotation" }, @@ -2357,6 +3051,25 @@ "readOnly": true, "type": "string" }, + "deleteTime": { + "description": "Output only. The time at which the message was deleted in Google Chat server. If the message is never deleted, this field is empty. [Developer Preview](https://developers.google.com/workspace/preview).", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deletionMetadata": { + "$ref": "DeletionMetadata", + "description": "Output only. Information about a deleted message. A message is deleted when `delete_time` is set. [Developer Preview](https://developers.google.com/workspace/preview).", + "readOnly": true + }, + "emojiReactionSummaries": { + "description": "Output only. The list of emoji reaction summaries on the message. [Developer Preview](https://developers.google.com/workspace/preview).", + "items": { + "$ref": "EmojiReactionSummary" + }, + "readOnly": true, + "type": "array" + }, "fallbackText": { "description": "A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications).", "type": "string" @@ -2432,6 +3145,26 @@ }, "type": "object" }, + "Reaction": { + "description": "A reaction to a message. [Developer Preview](https://developers.google.com/workspace/preview).", + "id": "Reaction", + "properties": { + "emoji": { + "$ref": "Emoji", + "description": "The emoji used in the reaction." + }, + "name": { + "description": "The resource name of the reaction. Format: spaces/{space}/messages/{message}/reactions/{reaction}", + "type": "string" + }, + "user": { + "$ref": "User", + "description": "Output only. The user who created the reaction.", + "readOnly": true + } + }, + "type": "object" + }, "Section": { "description": "A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float).", "id": "Section", @@ -2450,6 +3183,28 @@ }, "type": "object" }, + "SetUpSpaceRequest": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview).", + "id": "SetUpSpaceRequest", + "properties": { + "memberships": { + "description": "Optional. The initial set of in-domain users invited to join the space. The calling user is automatically added to the space, and shouldn't be specified as a membership. The set currently allows up to 20 memberships (in addition to the caller). The `Membership.member` field must contain a user with `name` populated and `User.Type.HUMAN`. All other fields are ignored. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). Not supported: Inviting guest users, or adding other Chat apps.", + "items": { + "$ref": "Membership" + }, + "type": "array" + }, + "requestId": { + "description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.", + "type": "string" + }, + "space": { + "$ref": "Space", + "description": "Required. The `Space.spaceType` field is required. To create a space, set `Space.spaceType` to `SPACE` and set `Space.displayName`. To create a group chat, set `Space.spaceType` to `GROUP_CHAT`. Don't set `Space.displayName`. To create a 1:1 conversation between humans, set `Space.spaceType` to `DIRECT_MESSAGE` and set `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or `Space.spaceDetails`. To create an 1:1 conversation between a human and the calling Chat app, set `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or `Space.spaceDetails`. If a `DIRECT_MESSAGE` space already exists, that space is returned instead of creating a new space." + } + }, + "type": "object" + }, "SlashCommand": { "description": "A [slash command](https://developers.google.com/chat/how-tos/slash-commands) in Google Chat.", "id": "SlashCommand", @@ -2525,6 +3280,20 @@ "$ref": "SpaceDetails", "description": "Details about the space including description and rules." }, + "spaceHistoryState": { + "description": "The message history state for messages and threads in this space. [Developer Preview](https://developers.google.com/workspace/preview).", + "enum": [ + "HISTORY_STATE_UNSPECIFIED", + "HISTORY_OFF", + "HISTORY_ON" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "History off. [Messages and threads are kept for 24 hours](https://support.google.com/chat/answer/7664687).", + "History on. The organization's [Vault retention rules](https://support.google.com/vault/answer/7657597) specify for how long messages and threads are kept." + ], + "type": "string" + }, "spaceThreadingState": { "description": "Output only. The threading state in the Chat space.", "enum": [ @@ -2542,6 +3311,22 @@ "readOnly": true, "type": "string" }, + "spaceType": { + "description": "The type of space. Required when creating or updating a space. Output only for other usage. [Developer Preview](https://developers.google.com/workspace/preview).", + "enum": [ + "SPACE_TYPE_UNSPECIFIED", + "SPACE", + "GROUP_CHAT", + "DIRECT_MESSAGE" + ], + "enumDescriptions": [ + "Reserved.", + "A place where people send messages, share files, and collaborate. A `SPACE` can include Chat apps.", + "Group conversations between 3 or more people. A `GROUP_CHAT` can include Chat apps.", + "1:1 messages between two humans or a human and a Chat app." + ], + "type": "string" + }, "threaded": { "description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space.", "readOnly": true, @@ -2694,6 +3479,27 @@ }, "type": "object" }, + "UploadAttachmentRequest": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview).", + "id": "UploadAttachmentRequest", + "properties": { + "filename": { + "description": "Required. The filename of the attachment, including the file extension.", + "type": "string" + } + }, + "type": "object" + }, + "UploadAttachmentResponse": { + "id": "UploadAttachmentResponse", + "properties": { + "attachmentDataRef": { + "$ref": "AttachmentDataRef", + "description": "Reference to the uploaded attachment." + } + }, + "type": "object" + }, "User": { "description": "A user in Google Chat.", "id": "User", diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index f8bbb4497b2..be102525233 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -88,9 +88,16 @@ const ( // Private Service: https://www.googleapis.com/auth/chat.bot ChatBotScope = "https://www.googleapis.com/auth/chat.bot" + // Delete conversations and spaces & remove access to associated files + // in Google Chat + ChatDeleteScope = "https://www.googleapis.com/auth/chat.delete" + // View, add, and remove members from conversations in Google Chat ChatMembershipsScope = "https://www.googleapis.com/auth/chat.memberships" + // Add and remove itself from conversations in Google Chat + ChatMembershipsAppScope = "https://www.googleapis.com/auth/chat.memberships.app" + // View members in Google Chat conversations. ChatMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.memberships.readonly" @@ -101,6 +108,15 @@ const ( // Compose and send messages in Google Chat ChatMessagesCreateScope = "https://www.googleapis.com/auth/chat.messages.create" + // View, add, and delete reactions to messages in Google Chat + ChatMessagesReactionsScope = "https://www.googleapis.com/auth/chat.messages.reactions" + + // Add reactions to messages in Google Chat + ChatMessagesReactionsCreateScope = "https://www.googleapis.com/auth/chat.messages.reactions.create" + + // View reactions to messages in Google Chat + ChatMessagesReactionsReadonlyScope = "https://www.googleapis.com/auth/chat.messages.reactions.readonly" + // View messages and reactions in Google Chat ChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly" @@ -108,6 +124,9 @@ const ( // (including history settings) in Google Chat ChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces" + // Create new conversations in Google Chat + ChatSpacesCreateScope = "https://www.googleapis.com/auth/chat.spaces.create" + // View chat and spaces in Google Chat ChatSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.spaces.readonly" ) @@ -116,12 +135,18 @@ const ( func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/chat.bot", + "https://www.googleapis.com/auth/chat.delete", "https://www.googleapis.com/auth/chat.memberships", + "https://www.googleapis.com/auth/chat.memberships.app", "https://www.googleapis.com/auth/chat.memberships.readonly", "https://www.googleapis.com/auth/chat.messages", "https://www.googleapis.com/auth/chat.messages.create", + "https://www.googleapis.com/auth/chat.messages.reactions", + "https://www.googleapis.com/auth/chat.messages.reactions.create", + "https://www.googleapis.com/auth/chat.messages.reactions.readonly", "https://www.googleapis.com/auth/chat.messages.readonly", "https://www.googleapis.com/auth/chat.spaces", + "https://www.googleapis.com/auth/chat.spaces.create", "https://www.googleapis.com/auth/chat.spaces.readonly", ) // NOTE: prepend, so we don't override user-specified scopes. @@ -210,6 +235,7 @@ type SpacesMembersService struct { func NewSpacesMessagesService(s *Service) *SpacesMessagesService { rs := &SpacesMessagesService{s: s} rs.Attachments = NewSpacesMessagesAttachmentsService(s) + rs.Reactions = NewSpacesMessagesReactionsService(s) return rs } @@ -217,6 +243,8 @@ type SpacesMessagesService struct { s *Service Attachments *SpacesMessagesAttachmentsService + + Reactions *SpacesMessagesReactionsService } func NewSpacesMessagesAttachmentsService(s *Service) *SpacesMessagesAttachmentsService { @@ -228,6 +256,15 @@ type SpacesMessagesAttachmentsService struct { s *Service } +func NewSpacesMessagesReactionsService(s *Service) *SpacesMessagesReactionsService { + rs := &SpacesMessagesReactionsService{s: s} + return rs +} + +type SpacesMessagesReactionsService struct { + s *Service +} + // ActionParameter: List of string parameters to supply when the action // method is invoked. For example, consider three snooze buttons: snooze // now, snooze 1 day, snooze next week. You might use action method = @@ -561,24 +598,32 @@ func (s *Attachment) MarshalJSON() ([]byte, error) { } type AttachmentDataRef struct { + // AttachmentUploadToken: Opaque token containing a reference to an + // uploaded attachment. Treated by clients as an opaque string and used + // to create or update Chat messages with attachments. Developer Preview + // (https://developers.google.com/workspace/preview). + AttachmentUploadToken string `json:"attachmentUploadToken,omitempty"` + // ResourceName: The resource name of the attachment data. This is used // with the media API to download the attachment data. ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AttachmentUploadToken") 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. "ResourceName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AttachmentUploadToken") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1017,6 +1062,35 @@ func (s *CommonEventObject) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CustomEmoji: Represents a custom emoji. Developer Preview +// (https://developers.google.com/workspace/preview). +type CustomEmoji struct { + // Uid: Unique key for the custom emoji resource. + Uid string `json:"uid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uid") 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. "Uid") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomEmoji) MarshalJSON() ([]byte, error) { + type NoMethod CustomEmoji + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DateInput: Date input values. type DateInput struct { // MsSinceEpoch: Time since epoch time, in milliseconds. @@ -1079,6 +1153,48 @@ func (s *DateTimeInput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeletionMetadata: Information about a deleted message. A message is +// deleted when `delete_time` is set. Developer Preview +// (https://developers.google.com/workspace/preview). +type DeletionMetadata struct { + // DeletionType: Indicates who deleted the message. + // + // Possible values: + // "DELETION_TYPE_UNSPECIFIED" - This value is unused. + // "CREATOR" - User deleted their own message. + // "SPACE_OWNER" - The space owner deleted the message. + // "ADMIN" - A Google Workspace admin deleted the message. + // "APP_MESSAGE_EXPIRY" - A Chat app deleted its own message when it + // expired. + // "CREATOR_VIA_APP" - A Chat app deleted the message on behalf of the + // user. + // "SPACE_OWNER_VIA_APP" - A Chat app deleted the message on behalf of + // the space owner. + DeletionType string `json:"deletionType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeletionType") 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. "DeletionType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeletionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod DeletionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeprecatedEvent: Google Chat events. type DeprecatedEvent struct { // Action: The form action data associated with an interactive card that @@ -1278,6 +1394,72 @@ func (s *DriveDataRef) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Emoji: An emoji that is used as a reaction to a message. Developer +// Preview (https://developers.google.com/workspace/preview). +type Emoji struct { + // CustomEmoji: Output only. A custom emoji. + CustomEmoji *CustomEmoji `json:"customEmoji,omitempty"` + + // Unicode: A basic emoji represented by a unicode string. + Unicode string `json:"unicode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomEmoji") 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. "CustomEmoji") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Emoji) MarshalJSON() ([]byte, error) { + type NoMethod Emoji + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EmojiReactionSummary: The number of people who reacted to a message +// with a specific emoji. Developer Preview +// (https://developers.google.com/workspace/preview). +type EmojiReactionSummary struct { + // Emoji: Emoji associated with the reactions. + Emoji *Emoji `json:"emoji,omitempty"` + + // ReactionCount: The total number of reactions using the associated + // emoji. + ReactionCount int64 `json:"reactionCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Emoji") 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. "Emoji") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EmojiReactionSummary) MarshalJSON() ([]byte, error) { + type NoMethod EmojiReactionSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1745,6 +1927,10 @@ type GoogleAppsCardV1CardFixedFooter struct { // be set if `secondaryButton` is set. SecondaryButton *GoogleAppsCardV1Button `json:"secondaryButton,omitempty"` + // Widgets: A list of widgets included in the card footer. Primary + // button and secondary button are rendered below these widgets. + Widgets []*GoogleAppsCardV1FooterWidget `json:"widgets,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrimaryButton") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1818,52 +2004,162 @@ func (s *GoogleAppsCardV1CardHeader) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsCardV1DateTimePicker: Lets users specify a date, a time, or -// both a date and a time. Accepts text input from users, but features -// an interactive date and time selector that helps users enter -// correctly-formatted dates and times. If users enter a date or time -// incorrectly, the widget shows an error that prompts users to enter -// the correct format. Not supported by Chat apps. Support by Chat apps -// coming soon. +// GoogleAppsCardV1Column: A column. +type GoogleAppsCardV1Column struct { + // HorizontalAlignment: Specifies whether widgets align to the left, + // right, or center of a column. + // + // Possible values: + // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Unspecified. Do not use. + // "START" - Default value. Aligns widgets to the start position of + // the column. For left-to-right layouts, aligns to the left. For + // right-to-left layouts, aligns to the right. + // "CENTER" - Aligns widgets to the center of the column. + // "END" - Aligns widgets to the end position of the column. For + // left-to-right layouts, aligns widgets to the right. For right-to-left + // layouts, aligns widgets to the left. + HorizontalAlignment string `json:"horizontalAlignment,omitempty"` + + // HorizontalSizeStyle: Specifies how a column fills the width of the + // card. + // + // Possible values: + // "HORIZONTAL_SIZE_STYLE_UNSPECIFIED" - Unspecified. Do not use. + // "FILL_AVAILABLE_SPACE" - Default value. Column fills the available + // space, up to 70% of the card's width. If both columns are set to + // `FILL_AVAILABLE_SPACE`, each column fills 50% of the space. + // "FILL_MINIMUM_SPACE" - Column fills the least amount of space + // possible and no more than 30% of the card's width. + HorizontalSizeStyle string `json:"horizontalSizeStyle,omitempty"` + + // VerticalAlignment: Specifies whether widgets align to the top, + // bottom, or center of a column. + // + // Possible values: + // "VERTICAL_ALIGNMENT_UNSPECIFIED" - Unspecified. Do not use. + // "CENTER" - Default value. Aligns widgets to the center of a column. + // "TOP" - Aligns widgets to the top of a column. + // "BOTTOM" - Aligns widgets to the bottom of a column. + VerticalAlignment string `json:"verticalAlignment,omitempty"` + + // Widgets: An array of widgets included in a column. Widgets appear in + // the order that they are specified. + Widgets []*GoogleAppsCardV1Widgets `json:"widgets,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HorizontalAlignment") + // 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. "HorizontalAlignment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAppsCardV1Column) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsCardV1Column + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsCardV1Columns: The `Columns` widget displays up to 2 +// columns in a card message or dialog. You can add widgets to each +// column; the widgets appear in the order that they are specified. The +// height of each column is determined by the taller column. For +// example, if the first column is taller than the second column, both +// columns have the height of the first column. Because each column can +// contain a different number of widgets, you can't define rows or align +// widgets between the columns. Columns are displayed side-by-side. You +// can customize the width of each column using the +// `HorizontalSizeStyle` field. If the user's screen width is too +// narrow, the second column wraps below the first: * On web, the second +// column wraps if the screen width is less than or equal to 480 pixels. +// * On iOS devices, the second column wraps if the screen width is less +// than or equal to 300 pt. * On Android devices, the second column +// wraps if the screen width is less than or equal to 320 dp. To include +// more than 2 columns, or to use rows, use the `Grid` widget. Supported +// by Chat apps, but not Google Workspace Add-ons. +type GoogleAppsCardV1Columns struct { + // ColumnItems: An array of columns. You can include up to 2 columns in + // a card or dialog. + ColumnItems []*GoogleAppsCardV1Column `json:"columnItems,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ColumnItems") 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. "ColumnItems") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAppsCardV1Columns) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsCardV1Columns + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsCardV1DateTimePicker: Lets users input a date, a time, or +// both a date and a time. Users can input text or use the picker to +// select dates and times. If users input an invalid date or time, the +// picker shows an error that prompts users to input the information +// correctly. type GoogleAppsCardV1DateTimePicker struct { - // Label: The text that prompts users to enter a date, time, or - // datetime. Specify text that helps the user enter the information your - // app needs. For example, if users are setting an appointment, then a - // label like "Appointment date" or "Appointment date and time" might - // work well. + // Label: The text that prompts users to input a date, a time, or a date + // and time. For example, if users are scheduling an appointment, use a + // label such as `Appointment date` or `Appointment date and time`. Label string `json:"label,omitempty"` - // Name: The name by which the datetime picker is identified in a form + // Name: The name by which the `DateTimePicker` is identified in a form // input event. For details about working with form inputs, see Receive // form data // (https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs). Name string `json:"name,omitempty"` // OnChangeAction: Triggered when the user clicks **Save** or **Clear** - // from the datetime picker interface. + // from the `DateTimePicker` interface. OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"` // TimezoneOffsetDate: The number representing the time zone offset from // UTC, in minutes. If set, the `value_ms_epoch` is displayed in the - // specified time zone. If not set, it uses the user's time zone setting - // on the client side. + // specified time zone. If unset, the value defaults to the user's time + // zone setting. TimezoneOffsetDate int64 `json:"timezoneOffsetDate,omitempty"` - // Type: What kind of date and time input the datetime picker supports. + // Type: Whether the widget supports inputting a date, a time, or the + // date and time. // // Possible values: - // "DATE_AND_TIME" - The user can select a date and time. - // "DATE_ONLY" - The user can only select a date. - // "TIME_ONLY" - The user can only select a time. + // "DATE_AND_TIME" - Users input a date and time. + // "DATE_ONLY" - Users input a date. + // "TIME_ONLY" - Users input a time. Type string `json:"type,omitempty"` - // ValueMsEpoch: The value displayed as the default value before user - // input or previous user input, represented in milliseconds (Epoch time - // (https://en.wikipedia.org/wiki/Unix_time)). For `DATE_AND_TIME` type, - // the full epoch value is used. For `DATE_ONLY` type, only date of the - // epoch time is used. For `TIME_ONLY` type, only time of the epoch time - // is used. For example, to represent 3:00 AM, set epoch time to `3 * 60 - // * 60 * 1000`. + // ValueMsEpoch: The default value displayed in the widget, in + // milliseconds since Unix epoch time + // (https://en.wikipedia.org/wiki/Unix_time). Specify the value based on + // the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a + // calendar date and time in UTC. For example, to represent January 1, + // 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar + // date at 00:00:00 UTC. For example, to represent January 1, 2023, use + // `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to + // represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`). ValueMsEpoch int64 `json:"valueMsEpoch,omitempty,string"` // ForceSendFields is a list of field names (e.g. "Label") to @@ -1962,18 +2258,60 @@ func (s *GoogleAppsCardV1DecoratedText) MarshalJSON() ([]byte, error) { type GoogleAppsCardV1Divider struct { } -// GoogleAppsCardV1Grid: Displays a grid with a collection of items. A -// grid supports any number of columns and items. The number of rows is -// determined by items divided by columns. A grid with 10 items and 2 -// columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. -// For example, the following JSON creates a 2 column grid with a single -// item: ``` "grid": { "title": "A fine collection of items", -// "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": -// 4 }, "items": [ { "image": { "imageUri": -// "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" -// }, "borderStyle": { "type": "STROKE" } }, "title": "An item", -// "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": -// "https://www.example.com" } } } ``` +// GoogleAppsCardV1FooterWidget: The CardFixedFooter can contain a list +// of these widgets. +type GoogleAppsCardV1FooterWidget struct { + // ButtonList: ButtonList widget. + ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"` + + // DateTimePicker: DateTimePicker widget. + DateTimePicker *GoogleAppsCardV1DateTimePicker `json:"dateTimePicker,omitempty"` + + // DecoratedText: DecoratedText widget. + DecoratedText *GoogleAppsCardV1DecoratedText `json:"decoratedText,omitempty"` + + // TextInput: TextInput widget. + TextInput *GoogleAppsCardV1TextInput `json:"textInput,omitempty"` + + // TextParagraph: TextParagraph widget. + TextParagraph *GoogleAppsCardV1TextParagraph `json:"textParagraph,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ButtonList") 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. "ButtonList") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAppsCardV1FooterWidget) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsCardV1FooterWidget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAppsCardV1Grid: Displays a grid with a collection of items. +// Items can only include text or images. A grid supports any number of +// columns and items. The number of rows is determined by items divided +// by columns. A grid with 10 items and 2 columns has 5 rows. A grid +// with 11 items and 2 columns has 6 rows. For responsive columns, or to +// include more than text or images, use `Columns`. For example, the +// following JSON creates a 2 column grid with a single item: ``` +// "grid": { "title": "A fine collection of items", "columnCount": 2, +// "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { +// "image": { "imageUri": "https://www.example.com/image.png", +// "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" +// } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { +// "openLink": { "url": "https://www.example.com" } } } ``` type GoogleAppsCardV1Grid struct { // BorderStyle: The border style to apply to each grid item. BorderStyle *GoogleAppsCardV1BorderStyle `json:"borderStyle,omitempty"` @@ -2018,8 +2356,8 @@ func (s *GoogleAppsCardV1Grid) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsCardV1GridItem: Represents a single item in the grid -// layout. +// GoogleAppsCardV1GridItem: Represents an item in a grid layout. Items +// can contain text, an image, or both text and an image. type GoogleAppsCardV1GridItem struct { // Id: A user-specified identifier for this grid item. This identifier // is returned in the parent Grid's onClick callback parameters. @@ -2791,9 +3129,20 @@ type GoogleAppsCardV1Widget struct { // "https://example.com/calendar" } } } ] } ``` ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"` - // DateTimePicker: Displays a selection/input widget for date, time, or - // date and time. Not supported by Chat apps. Support by Chat apps is - // coming soon. For example, the following JSON creates a datetime + // Columns: Displays up to 2 columns. To include more than 2 columns, or + // to use rows, use the `Grid` widget. For example, the following JSON + // creates 2 columns that each contain text paragraphs: ``` "columns": { + // "columnItems": [ { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + // "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", + // "widgets": [ { "textParagraph": { "text": "First column text + // paragraph" } } ] }, { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + // "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER", + // "widgets": [ { "textParagraph": { "text": "Second column text + // paragraph" } } ] } ] } ``` + Columns *GoogleAppsCardV1Columns `json:"columns,omitempty"` + + // DateTimePicker: Displays a widget that lets users input a date, time, + // or date and time. For example, the following JSON creates a date time // picker to schedule an appointment: ``` "dateTimePicker": { "name": // "appointment_time", "label": "Book your appointment at:", "type": // "DATE_AND_TIME", "valueMsEpoch": "796435200000" } ``` @@ -2826,6 +3175,20 @@ type GoogleAppsCardV1Widget struct { // "https://www.example.com" } } } ``` Grid *GoogleAppsCardV1Grid `json:"grid,omitempty"` + // HorizontalAlignment: Specifies whether widgets align to the left, + // right, or center of a column. + // + // Possible values: + // "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Unspecified. Do not use. + // "START" - Default value. Aligns widgets to the start position of + // the column. For left-to-right layouts, aligns to the left. For + // right-to-left layouts, aligns to the right. + // "CENTER" - Aligns widgets to the center of the column. + // "END" - Aligns widgets to the end position of the column. For + // left-to-right layouts, aligns widgets to the right. For right-to-left + // layouts, aligns widgets to the left. + HorizontalAlignment string `json:"horizontalAlignment,omitempty"` + // Image: Displays an image. For example, the following JSON creates an // image with alternative text: ``` "image": { "imageUrl": // "https://developers.google.com/chat/images/quickstart-app-avatar.png", @@ -2884,6 +3247,53 @@ func (s *GoogleAppsCardV1Widget) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAppsCardV1Widgets: The supported widgets that you can include +// in a column. +type GoogleAppsCardV1Widgets struct { + // ButtonList: ButtonList widget. + ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"` + + // DateTimePicker: DateTimePicker widget. + DateTimePicker *GoogleAppsCardV1DateTimePicker `json:"dateTimePicker,omitempty"` + + // DecoratedText: DecoratedText widget. + DecoratedText *GoogleAppsCardV1DecoratedText `json:"decoratedText,omitempty"` + + // Image: Image widget. + Image *GoogleAppsCardV1Image `json:"image,omitempty"` + + // SelectionInput: SelectionInput widget. + SelectionInput *GoogleAppsCardV1SelectionInput `json:"selectionInput,omitempty"` + + // TextInput: TextInput widget. + TextInput *GoogleAppsCardV1TextInput `json:"textInput,omitempty"` + + // TextParagraph: TextParagraph widget. + TextParagraph *GoogleAppsCardV1TextParagraph `json:"textParagraph,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ButtonList") 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. "ButtonList") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAppsCardV1Widgets) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAppsCardV1Widgets + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Image: An image that is specified by a URL and can have an onclick // action. type Image struct { @@ -3178,19 +3588,19 @@ func (s *ListMembershipsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ListSpacesResponse struct { +type ListMessagesResponse struct { + // Messages: List of messages. + Messages []*Message `json:"messages,omitempty"` + // NextPageToken: A token that can be sent as `pageToken` to retrieve // the next page of results. If empty, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` - // Spaces: List of spaces in the requested (or first) page. - Spaces []*Space `json:"spaces,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Messages") 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 @@ -3198,30 +3608,100 @@ type ListSpacesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Messages") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ListSpacesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListSpacesResponse +func (s *ListMessagesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMessagesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MatchedUrl: A matched url in a Chat message. Chat apps can preview -// matched URLs. For more information, refer to Preview links -// (https://developers.google.com/chat/how-tos/preview-links). -type MatchedUrl struct { - // Url: Output only. The url that was matched. - Url string `json:"url,omitempty"` +type ListReactionsResponse struct { + // NextPageToken: Continuation token to retrieve the next page of + // results. It will be empty for the last page of results. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "Url") to - // unconditionally include in API requests. By default, fields with + // Reactions: List of reactions in the requested (or first) page. + Reactions []*Reaction `json:"reactions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListReactionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListReactionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ListSpacesResponse struct { + // NextPageToken: A token that can be sent as `pageToken` to retrieve + // the next page of results. If empty, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Spaces: List of spaces in the requested (or first) page. + Spaces []*Space `json:"spaces,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListSpacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSpacesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MatchedUrl: A matched url in a Chat message. Chat apps can preview +// matched URLs. For more information, refer to Preview links +// (https://developers.google.com/chat/how-tos/preview-links). +type MatchedUrl struct { + // Url: Output only. The url that was matched. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Url") to + // unconditionally include in API requests. By default, fields with // empty 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. @@ -3354,7 +3834,7 @@ type Message struct { // configure how its response is posted. ActionResponse *ActionResponse `json:"actionResponse,omitempty"` - // Annotations: Output only. Annotations associated with the text in + // Annotations: Output only. Annotations associated with the `text` in // this message. Annotations []*Annotation `json:"annotations,omitempty"` @@ -3397,6 +3877,22 @@ type Message struct { // Google Chat server. CreateTime string `json:"createTime,omitempty"` + // DeleteTime: Output only. The time at which the message was deleted in + // Google Chat server. If the message is never deleted, this field is + // empty. Developer Preview + // (https://developers.google.com/workspace/preview). + DeleteTime string `json:"deleteTime,omitempty"` + + // DeletionMetadata: Output only. Information about a deleted message. A + // message is deleted when `delete_time` is set. Developer Preview + // (https://developers.google.com/workspace/preview). + DeletionMetadata *DeletionMetadata `json:"deletionMetadata,omitempty"` + + // EmojiReactionSummaries: Output only. The list of emoji reaction + // summaries on the message. Developer Preview + // (https://developers.google.com/workspace/preview). + EmojiReactionSummaries []*EmojiReactionSummary `json:"emojiReactionSummaries,omitempty"` + // FallbackText: A plain-text description of the message's cards, used // when the actual cards cannot be displayed (e.g. mobile // notifications). @@ -3537,6 +4033,46 @@ func (s *OpenLink) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Reaction: A reaction to a message. Developer Preview +// (https://developers.google.com/workspace/preview). +type Reaction struct { + // Emoji: The emoji used in the reaction. + Emoji *Emoji `json:"emoji,omitempty"` + + // Name: The resource name of the reaction. Format: + // spaces/{space}/messages/{message}/reactions/{reaction} + Name string `json:"name,omitempty"` + + // User: Output only. The user who created the reaction. + User *User `json:"user,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Emoji") 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. "Emoji") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Reaction) MarshalJSON() ([]byte, error) { + type NoMethod Reaction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Section: A section contains a collection of widgets that are rendered // (vertically) in the order that they are specified. Across all // platforms, cards have a narrow fixed width, so there is currently no @@ -3573,6 +4109,68 @@ func (s *Section) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SetUpSpaceRequest: Developer Preview +// (https://developers.google.com/workspace/preview). +type SetUpSpaceRequest struct { + // Memberships: Optional. The initial set of in-domain users invited to + // join the space. The calling user is automatically added to the space, + // and shouldn't be specified as a membership. The set currently allows + // up to 20 memberships (in addition to the caller). The + // `Membership.member` field must contain a user with `name` populated + // and `User.Type.HUMAN`. All other fields are ignored. Optional when + // setting `Space.spaceType` to `SPACE`. Required when setting + // `Space.spaceType` to `GROUP_CHAT`, along with at least two + // memberships. Required when setting `Space.spaceType` to + // `DIRECT_MESSAGE` with a human user, along with exactly one + // membership. Must be empty when creating a 1:1 conversation between a + // human and the calling Chat app (when setting `Space.spaceType` to + // `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). Not + // supported: Inviting guest users, or adding other Chat apps. + Memberships []*Membership `json:"memberships,omitempty"` + + // RequestId: Optional. A unique identifier for this request. A random + // UUID is recommended. Specifying an existing request ID returns the + // space created with that ID instead of creating a new space. + // Specifying an existing request ID from the same Chat app with a + // different authenticated user returns an error. + RequestId string `json:"requestId,omitempty"` + + // Space: Required. The `Space.spaceType` field is required. To create a + // space, set `Space.spaceType` to `SPACE` and set `Space.displayName`. + // To create a group chat, set `Space.spaceType` to `GROUP_CHAT`. Don't + // set `Space.displayName`. To create a 1:1 conversation between humans, + // set `Space.spaceType` to `DIRECT_MESSAGE` and set + // `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + // `Space.spaceDetails`. To create an 1:1 conversation between a human + // and the calling Chat app, set `Space.spaceType` to `DIRECT_MESSAGE` + // and `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` + // or `Space.spaceDetails`. If a `DIRECT_MESSAGE` space already exists, + // that space is returned instead of creating a new space. + Space *Space `json:"space,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Memberships") 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. "Memberships") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetUpSpaceRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetUpSpaceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SlashCommand: A slash command // (https://developers.google.com/chat/how-tos/slash-commands) in Google // Chat. @@ -3676,6 +4274,19 @@ type Space struct { // rules. SpaceDetails *SpaceDetails `json:"spaceDetails,omitempty"` + // SpaceHistoryState: The message history state for messages and threads + // in this space. Developer Preview + // (https://developers.google.com/workspace/preview). + // + // Possible values: + // "HISTORY_STATE_UNSPECIFIED" - Default value. Do not use. + // "HISTORY_OFF" - History off. [Messages and threads are kept for 24 + // hours](https://support.google.com/chat/answer/7664687). + // "HISTORY_ON" - History on. The organization's [Vault retention + // rules](https://support.google.com/vault/answer/7657597) specify for + // how long messages and threads are kept. + SpaceHistoryState string `json:"spaceHistoryState,omitempty"` + // SpaceThreadingState: Output only. The threading state in the Chat // space. // @@ -3690,6 +4301,20 @@ type Space struct { // and group conversations between 3 or more people. SpaceThreadingState string `json:"spaceThreadingState,omitempty"` + // SpaceType: The type of space. Required when creating or updating a + // space. Output only for other usage. Developer Preview + // (https://developers.google.com/workspace/preview). + // + // Possible values: + // "SPACE_TYPE_UNSPECIFIED" - Reserved. + // "SPACE" - A place where people send messages, share files, and + // collaborate. A `SPACE` can include Chat apps. + // "GROUP_CHAT" - Group conversations between 3 or more people. A + // `GROUP_CHAT` can include Chat apps. + // "DIRECT_MESSAGE" - 1:1 messages between two humans or a human and a + // Chat app. + SpaceType string `json:"spaceType,omitempty"` + // Threaded: Output only. Deprecated: Use `spaceThreadingState` instead. // Whether messages are threaded in this space. Threaded bool `json:"threaded,omitempty"` @@ -4008,6 +4633,68 @@ func (s *TimeZone) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UploadAttachmentRequest: Developer Preview +// (https://developers.google.com/workspace/preview). +type UploadAttachmentRequest struct { + // Filename: Required. The filename of the attachment, including the + // file extension. + Filename string `json:"filename,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filename") 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. "Filename") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UploadAttachmentRequest) MarshalJSON() ([]byte, error) { + type NoMethod UploadAttachmentRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UploadAttachmentResponse struct { + // AttachmentDataRef: Reference to the uploaded attachment. + AttachmentDataRef *AttachmentDataRef `json:"attachmentDataRef,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttachmentDataRef") + // 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. "AttachmentDataRef") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UploadAttachmentResponse) MarshalJSON() ([]byte, error) { + type NoMethod UploadAttachmentResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // User: A user in Google Chat. type User struct { // DisplayName: Output only. The user's display name. @@ -4305,106 +4992,331 @@ func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error) { } -// method id "chat.spaces.get": +// method id "chat.media.upload": -type SpacesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type MediaUploadCall struct { + s *Service + parent string + uploadattachmentrequest *UploadAttachmentRequest + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header } -// Get: Returns a space. Requires authentication -// (https://developers.google.com/chat/api/guides/auth). Fully supports -// service account authentication -// (https://developers.google.com/chat/api/guides/auth/service-accounts). -// Supports user authentication -// (https://developers.google.com/chat/api/guides/auth/users) as part of -// the Google Workspace Developer Preview Program -// (https://developers.google.com/workspace/preview), which grants early -// access to certain features. User authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.spaces` or `chat.spaces.readonly` authorization scope. +// Upload: Developer Preview +// (https://developers.google.com/workspace/preview): Uploads an +// attachment. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users). You can +// upload attachments up to 200 MB. Certain file types aren't supported. +// For details, see File types blocked by Google Chat +// (https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat). // -// - name: Resource name of the space, in the form "spaces/*". Format: -// spaces/{space}. -func (r *SpacesService) Get(name string) *SpacesGetCall { - c := &SpacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource name of the Chat space in which the attachment is +// uploaded. Format "spaces/{space}". +func (r *MediaService) Upload(parent string, uploadattachmentrequest *UploadAttachmentRequest) *MediaUploadCall { + c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.uploadattachmentrequest = uploadattachmentrequest + return c +} + +// Media specifies the media to upload in one or more chunks. The chunk +// size may be controlled by supplying a MediaOption generated by +// googleapi.ChunkSize. The chunk size defaults to +// googleapi.DefaultUploadChunkSize.The Content-Type header used in the +// upload request will be determined by sniffing the contents of r, +// unless a MediaOption generated by googleapi.ContentType is +// supplied. +// At most one of Media and ResumableMedia may be set. +func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) + return c +} + +// ResumableMedia specifies the media to upload in chunks and can be +// canceled with ctx. +// +// Deprecated: use Media instead. +// +// At most one of Media and ResumableMedia may be set. mediaType +// identifies the MIME media type of the upload, such as "image/png". If +// mediaType is "", it will be auto-detected. The provided ctx will +// supersede any context previously provided to the Context method. +func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { + c.ctx_ = ctx + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) + return c +} + +// ProgressUpdater provides a callback function that will be called +// after every chunk. It should be a low-latency function in order to +// not slow down the upload operation. This should only be called when +// using ResumableMedia (as opposed to Media). +func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { + c.mediaInfo_.SetProgressUpdater(pu) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *SpacesGetCall) Fields(s ...googleapi.Field) *SpacesGetCall { +func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SpacesGetCall) IfNoneMatch(entityTag string) *SpacesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesGetCall) Context(ctx context.Context) *SpacesGetCall { +// This context will supersede any context previously provided to the +// ResumableMedia method. +func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesGetCall) Header() http.Header { +func (c *MediaUploadCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *MediaUploadCall) doRequest(alt string) (*http.Response, 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.uploadattachmentrequest) + 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}/attachments:upload") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/attachments:upload") + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) + } + if body == nil { + body = new(bytes.Buffer) + reqHeaders.Set("Content-Type", "application/json") + } + body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() 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 + req.GetBody = getBody 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 "chat.spaces.get" call. -// Exactly one of *Space or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Space.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { +// Do executes the "chat.media.upload" call. +// Exactly one of *UploadAttachmentResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *UploadAttachmentResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*UploadAttachmentResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() + ctx := c.ctx_ + if ctx == nil { + ctx = context.TODO() + } + res, err = rx.Upload(ctx) + if err != nil { + return nil, err + } + defer res.Body.Close() + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + } + ret := &UploadAttachmentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Uploads an attachment. Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?\u0026co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).", + // "flatPath": "v1/spaces/{spacesId}/attachments:upload", + // "httpMethod": "POST", + // "id": "chat.media.upload", + // "mediaUpload": { + // "accept": [ + // "*/*" + // ], + // "maxSize": "209715200", + // "protocols": { + // "resumable": { + // "multipart": true, + // "path": "/resumable/upload/v1/{+parent}/attachments:upload" + // }, + // "simple": { + // "multipart": true, + // "path": "/upload/v1/{+parent}/attachments:upload" + // } + // } + // }, + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Resource name of the Chat space in which the attachment is uploaded. Format \"spaces/{space}\".", + // "location": "path", + // "pattern": "^spaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/attachments:upload", + // "request": { + // "$ref": "UploadAttachmentRequest" + // }, + // "response": { + // "$ref": "UploadAttachmentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.create" + // ], + // "supportsMediaUpload": true + // } + +} + +// method id "chat.spaces.create": + +type SpacesCreateCall struct { + s *Service + space *Space + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Developer Preview +// (https://developers.google.com/workspace/preview): Creates a named +// space. Spaces grouped by topics or that have guest access are not +// supported. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.spaces.create` or `chat.spaces` scope. +func (r *SpacesService) Create(space *Space) *SpacesCreateCall { + c := &SpacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.space = space + return c +} + +// RequestId sets the optional parameter "requestId": A unique +// identifier for this request. A random UUID is recommended. Specifying +// an existing request ID returns the space created with that ID instead +// of creating a new space. Specifying an existing request ID from the +// same Chat app with a different authenticated user returns an error. +func (c *SpacesCreateCall) RequestId(requestId string) *SpacesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SpacesCreateCall) Fields(s ...googleapi.Field) *SpacesCreateCall { + 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 *SpacesCreateCall) Context(ctx context.Context) *SpacesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesCreateCall) doRequest(alt string) (*http.Response, 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.space) + 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/spaces") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chat.spaces.create" call. +// Exactly one of *Space or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Space.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesCreateCall) Do(opts ...googleapi.CallOption) (*Space, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4435,46 +5347,2026 @@ func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Returns a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope.", - // "flatPath": "v1/spaces/{spacesId}", - // "httpMethod": "GET", - // "id": "chat.spaces.get", + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a named space. Spaces grouped by topics or that have guest access are not supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + // "flatPath": "v1/spaces", + // "httpMethod": "POST", + // "id": "chat.spaces.create", + // "parameterOrder": [], + // "parameters": { + // "requestId": { + // "description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/spaces", + // "request": { + // "$ref": "Space" + // }, + // "response": { + // "$ref": "Space" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.create" + // ] + // } + +} + +// method id "chat.spaces.delete": + +type SpacesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Developer Preview +// (https://developers.google.com/workspace/preview): Deletes a named +// space. Always performs a cascading delete, which means that the +// space's child resources - like messages posted in the space and +// memberships in the space - are also deleted. Requires user +// authentication +// (https://developers.google.com/chat/api/guides/auth/users) from a +// user who has permission to delete the space, and the `chat.delete` +// scope. +// +// - name: Resource name of the space to delete. Format: spaces/{space}. +func (r *SpacesService) Delete(name string) *SpacesDeleteCall { + c := &SpacesDeleteCall{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 *SpacesDeleteCall) Fields(s ...googleapi.Field) *SpacesDeleteCall { + 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 *SpacesDeleteCall) Context(ctx context.Context) *SpacesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesDeleteCall) doRequest(alt string) (*http.Response, 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 "chat.spaces.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a named space. Always performs a cascading delete, which means that the space's child resources - like messages posted in the space and memberships in the space - are also deleted. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) from a user who has permission to delete the space, and the `chat.delete` scope.", + // "flatPath": "v1/spaces/{spacesId}", + // "httpMethod": "DELETE", + // "id": "chat.spaces.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the space to delete. Format: spaces/{space}", + // "location": "path", + // "pattern": "^spaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.delete" + // ] + // } + +} + +// method id "chat.spaces.findDirectMessage": + +type SpacesFindDirectMessageCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FindDirectMessage: Developer Preview +// (https://developers.google.com/workspace/preview): Returns the +// existing direct message with the specified user. With user +// authentication +// (https://developers.google.com/chat/api/guides/auth/users), returns +// the direct message space between the specified user and the +// authenticated user. With service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts), +// returns the direct message space between the specified user and the +// calling Chat app. If no direct message space is found, returns a `404 +// NOT_FOUND` error. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) or service +// account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). +func (r *SpacesService) FindDirectMessage() *SpacesFindDirectMessageCall { + c := &SpacesFindDirectMessageCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Name sets the optional parameter "name": Required. Resource name of +// the user to find direct message with. Format: users/{user}, where +// `{user}` is either the `{person_id}` for the person +// (https://developers.google.com/people/api/rest/v1/people) from the +// People API, or the `id` for the user +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) +// in the Admin SDK Directory API. For example, if the People API +// `Person.resourceName` is `people/123456789`, you can find a direct +// message with that person by using `users/123456789` as the `name`. +func (c *SpacesFindDirectMessageCall) Name(name string) *SpacesFindDirectMessageCall { + 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 *SpacesFindDirectMessageCall) Fields(s ...googleapi.Field) *SpacesFindDirectMessageCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SpacesFindDirectMessageCall) IfNoneMatch(entityTag string) *SpacesFindDirectMessageCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SpacesFindDirectMessageCall) Context(ctx context.Context) *SpacesFindDirectMessageCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesFindDirectMessageCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesFindDirectMessageCall) doRequest(alt string) (*http.Response, 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/spaces:findDirectMessage") + 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 "chat.spaces.findDirectMessage" call. +// Exactly one of *Space or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Space.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesFindDirectMessageCall) Do(opts ...googleapi.CallOption) (*Space, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Space{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Returns the existing direct message with the specified user. With [user authentication](https://developers.google.com/chat/api/guides/auth/users), returns the direct message space between the specified user and the authenticated user. With [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts), returns the direct message space between the specified user and the calling Chat app. If no direct message space is found, returns a `404 NOT_FOUND` error. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) or [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", + // "flatPath": "v1/spaces:findDirectMessage", + // "httpMethod": "GET", + // "id": "chat.spaces.findDirectMessage", + // "parameterOrder": [], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the user to find direct message with. Format: users/{user}, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person.resourceName` is `people/123456789`, you can find a direct message with that person by using `users/123456789` as the `name`.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/spaces:findDirectMessage", + // "response": { + // "$ref": "Space" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "chat.spaces.get": + +type SpacesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns a space. Requires authentication +// (https://developers.google.com/chat/api/guides/auth). Fully supports +// service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). +// Supports user authentication +// (https://developers.google.com/chat/api/guides/auth/users) as part of +// the Google Workspace Developer Preview Program +// (https://developers.google.com/workspace/preview), which grants early +// access to certain features. User authentication +// (https://developers.google.com/chat/api/guides/auth/users) requires +// the `chat.spaces` or `chat.spaces.readonly` authorization scope. +// +// - name: Resource name of the space, in the form "spaces/*". Format: +// spaces/{space}. +func (r *SpacesService) Get(name string) *SpacesGetCall { + c := &SpacesGetCall{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 *SpacesGetCall) Fields(s ...googleapi.Field) *SpacesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SpacesGetCall) IfNoneMatch(entityTag string) *SpacesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SpacesGetCall) Context(ctx context.Context) *SpacesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesGetCall) doRequest(alt string) (*http.Response, 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 "chat.spaces.get" call. +// Exactly one of *Space or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Space.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Space{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope.", + // "flatPath": "v1/spaces/{spacesId}", + // "httpMethod": "GET", + // "id": "chat.spaces.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the space, in the form \"spaces/*\". Format: spaces/{space}", + // "location": "path", + // "pattern": "^spaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Space" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// method id "chat.spaces.list": + +type SpacesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists spaces the caller is a member of. Requires authentication +// (https://developers.google.com/chat/api/guides/auth). Fully supports +// service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). +// Supports user authentication +// (https://developers.google.com/chat/api/guides/auth/users) as part of +// the Google Workspace Developer Preview Program +// (https://developers.google.com/workspace/preview), which grants early +// access to certain features. User authentication +// (https://developers.google.com/chat/api/guides/auth/users) requires +// the `chat.spaces` or `chat.spaces.readonly` authorization scope. +// Lists spaces visible to the caller or authenticated user. Group chats +// and DMs aren't listed until the first message is sent. +func (r *SpacesService) List() *SpacesListCall { + c := &SpacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": A query filter. Requires +// user authentication +// (https://developers.google.com/chat/api/guides/auth/users). You can +// filter spaces by the space type (`space_type` +// (https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)). +// To filter by space type, you must specify valid `enum` value, such as +// `SPACE` or `GROUP_CHAT` (the `space_type` cannot be +// `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the +// `OR` operator. For example, the following queries are valid: ``` +// space_type = "SPACE" spaceType = "GROUP_CHAT" OR spaceType = +// "DIRECT_MESSAGE" ``` Invalid queries are rejected by the server with +// an `INVALID_ARGUMENT` error. With service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts), +// this field is ignored and the query always returns all spaces. But +// Chat API still validates the query syntax with service accounts, so +// invalid queries are still rejected. Developer Preview +// (https://developers.google.com/workspace/preview). +func (c *SpacesListCall) Filter(filter string) *SpacesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of spaces to return. The service may return fewer than this value. If +// unspecified, at most 100 spaces are returned. The maximum value is +// 1000; values above 1000 are coerced to 1000. Negative values return +// an `INVALID_ARGUMENT` error. +func (c *SpacesListCall) PageSize(pageSize int64) *SpacesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous list spaces call. Provide this to retrieve +// the subsequent page. When paginating, the filter value should match +// the call that provided the page token. Passing a different value may +// lead to unexpected results. +func (c *SpacesListCall) PageToken(pageToken string) *SpacesListCall { + 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 *SpacesListCall) Fields(s ...googleapi.Field) *SpacesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SpacesListCall) IfNoneMatch(entityTag string) *SpacesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SpacesListCall) Context(ctx context.Context) *SpacesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesListCall) doRequest(alt string) (*http.Response, 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/spaces") + 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 "chat.spaces.list" call. +// Exactly one of *ListSpacesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSpacesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSpacesResponse{ + ServerResponse: googleapi.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 spaces the caller is a member of. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", + // "flatPath": "v1/spaces", + // "httpMethod": "GET", + // "id": "chat.spaces.list", + // "parameterOrder": [], + // "parameters": { + // "filter": { + // "description": "Optional. A query filter. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). You can filter spaces by the space type ([`space_type`](https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid `enum` value, such as `SPACE` or `GROUP_CHAT` (the `space_type` cannot be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ``` space_type = \"SPACE\" spaceType = \"GROUP_CHAT\" OR spaceType = \"DIRECT_MESSAGE\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error. With [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts), this field is ignored and the query always returns all spaces. But Chat API still validates the query syntax with service accounts, so invalid queries are still rejected. [Developer Preview](https://developers.google.com/workspace/preview).", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an `INVALID_ARGUMENT` error.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous list spaces call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/spaces", + // "response": { + // "$ref": "ListSpacesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *SpacesListCall) Pages(ctx context.Context, f func(*ListSpacesResponse) 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 "chat.spaces.patch": + +type SpacesPatchCall struct { + s *Service + name string + space *Space + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Developer Preview +// (https://developers.google.com/workspace/preview): Updates a space. +// Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.spaces` scope. +// +// - name: Resource name of the space. Format: spaces/{space}. +func (r *SpacesService) Patch(name string, space *Space) *SpacesPatchCall { + c := &SpacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.space = space + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// field paths to be updated, comma separated if there are multiple. +// Currently supported field paths: - display_name (Only supports +// changing the display name of a space with the SPACE type, or when +// also including the `space_type` mask to change a GROUP_CHAT space +// type to SPACE. Trying to update the display name of a GROUP_CHAT or a +// DIRECT_MESSAGE space results in an invalid argument error.) - +// space_type (Only supports changing a GROUP_CHAT space type to SPACE. +// Include `display_name` together with `space_type` in the update mask +// and ensure that the specified space has a non-empty display name and +// the SPACE space type. Including the `space_type` mask and the SPACE +// type in the specified space when updating the display name is +// optional if the existing space already has the SPACE type. Trying to +// update the space type in other ways results in an invalid argument +// error). - space_details - space_history_state (Supports turning +// history on or off for the space +// (https://support.google.com/chat/answer/7664687) if the organization +// allows users to change their history setting +// (https://support.google.com/a/answer/7664184). Warning: mutually +// exclusive with all other field paths.) +func (c *SpacesPatchCall) UpdateMask(updateMask string) *SpacesPatchCall { + 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 *SpacesPatchCall) Fields(s ...googleapi.Field) *SpacesPatchCall { + 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 *SpacesPatchCall) Context(ctx context.Context) *SpacesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesPatchCall) doRequest(alt string) (*http.Response, 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.space) + 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 "chat.spaces.patch" call. +// Exactly one of *Space or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Space.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesPatchCall) Do(opts ...googleapi.CallOption) (*Space, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Space{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Updates a space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces` scope.", + // "flatPath": "v1/spaces/{spacesId}", + // "httpMethod": "PATCH", + // "id": "chat.spaces.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name of the space. Format: spaces/{space}", + // "location": "path", + // "pattern": "^spaces/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The field paths to be updated, comma separated if there are multiple. Currently supported field paths: - display_name (Only supports changing the display name of a space with the SPACE type, or when also including the `space_type` mask to change a GROUP_CHAT space type to SPACE. Trying to update the display name of a GROUP_CHAT or a DIRECT_MESSAGE space results in an invalid argument error.) - space_type (Only supports changing a GROUP_CHAT space type to SPACE. Include `display_name` together with `space_type` in the update mask and ensure that the specified space has a non-empty display name and the SPACE space type. Including the `space_type` mask and the SPACE type in the specified space when updating the display name is optional if the existing space already has the SPACE type. Trying to update the space type in other ways results in an invalid argument error). - space_details - space_history_state (Supports [turning history on or off for the space](https://support.google.com/chat/answer/7664687) if [the organization allows users to change their history setting](https://support.google.com/a/answer/7664184). Warning: mutually exclusive with all other field paths.)", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Space" + // }, + // "response": { + // "$ref": "Space" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.spaces" + // ] + // } + +} + +// method id "chat.spaces.setup": + +type SpacesSetupCall struct { + s *Service + setupspacerequest *SetUpSpaceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Setup: Developer Preview +// (https://developers.google.com/workspace/preview): Creates a space +// and adds specified users to it. The calling user is automatically +// added to the space, and shouldn't be specified as a membership in the +// request. To specify the human members to add, add memberships with +// the appropriate `member.name` in the `SetUpSpaceRequest`. To add a +// human user, use `users/{user}`, where `{user}` is either the +// `{person_id}` for the person +// (https://developers.google.com/people/api/rest/v1/people) from the +// People API, or the `id` for the user +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) +// in the Admin SDK Directory API. For example, if the People API +// `Person` `resourceName` is `people/123456789`, you can add the user +// to the space by including a membership with `users/123456789` as the +// `member.name`. For a space or group chat, if the caller blocks or is +// blocked by some members, then those members aren't added to the +// created space. To create a direct message (DM) between the calling +// user and another human user, specify exactly one membership to +// represent the human user. If one user blocks the other, the request +// fails and the DM isn't created. To create a DM between the calling +// user and the calling app, set `Space.singleUserBotDm` to true and +// don't specify any memberships. You can only use this method to add +// app memberships to DMs. To add the calling app as a member of other +// space types, use create membership +// (https://developers.google.com/chat/api/reference/rest/v1/spaces.members/create) +// If a DM already exists between two users, even when one user blocks +// the other at the time a request is made, then the existing DM is +// returned. Spaces with threaded replies or guest access are not +// supported. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.spaces.create` or `chat.spaces` scope. +func (r *SpacesService) Setup(setupspacerequest *SetUpSpaceRequest) *SpacesSetupCall { + c := &SpacesSetupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.setupspacerequest = setupspacerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SpacesSetupCall) Fields(s ...googleapi.Field) *SpacesSetupCall { + 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 *SpacesSetupCall) Context(ctx context.Context) *SpacesSetupCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesSetupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesSetupCall) doRequest(alt string) (*http.Response, 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.setupspacerequest) + 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/spaces:setup") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chat.spaces.setup" call. +// Exactly one of *Space or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Space.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesSetupCall) Do(opts ...googleapi.CallOption) (*Space, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Space{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person` `resourceName` is `people/123456789`, you can add the user to the space by including a membership with `users/123456789` as the `member.name`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to true and don't specify any memberships. You can only use this method to add app memberships to DMs. To add the calling app as a member of other space types, use [create membership](https://developers.google.com/chat/api/reference/rest/v1/spaces.members/create) If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access are not supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + // "flatPath": "v1/spaces:setup", + // "httpMethod": "POST", + // "id": "chat.spaces.setup", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/spaces:setup", + // "request": { + // "$ref": "SetUpSpaceRequest" + // }, + // "response": { + // "$ref": "Space" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.spaces", + // "https://www.googleapis.com/auth/chat.spaces.create" + // ] + // } + +} + +// method id "chat.spaces.members.create": + +type SpacesMembersCreateCall struct { + s *Service + parent string + membership *Membership + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Developer Preview +// (https://developers.google.com/workspace/preview): Creates a human +// membership or app membership for the calling app. Creating +// memberships for other apps is not supported. Requires user +// authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.memberships` (for human membership) or `chat.memberships.app` +// (for app membership) scope. To specify the member to add, set the +// `membership.member.name` in the `CreateMembershipRequest`: - To add +// the calling app to the space, use `users/app`. - To add a human user, +// use `users/{user}`, where `{user}` is either the `{person_id}` for +// the person (https://developers.google.com/people/api/rest/v1/people) +// from the People API, or the `id` for the user +// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) +// in the Admin SDK Directory API. For example, if the People API +// `Person` `resourceName` is `people/123456789`, the user can be added +// to the space by setting the `membership.member.name` to +// `users/123456789`. +// +// - parent: The resource name of the space for which to create the +// membership. Format: spaces/{space}. +func (r *SpacesMembersService) Create(parent string, membership *Membership) *SpacesMembersCreateCall { + c := &SpacesMembersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.membership = membership + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SpacesMembersCreateCall) Fields(s ...googleapi.Field) *SpacesMembersCreateCall { + 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 *SpacesMembersCreateCall) Context(ctx context.Context) *SpacesMembersCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesMembersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesMembersCreateCall) doRequest(alt string) (*http.Response, 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.membership) + 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}/members") + 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 "chat.spaces.members.create" call. +// Exactly one of *Membership or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Membership.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SpacesMembersCreateCall) Do(opts ...googleapi.CallOption) (*Membership, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Membership{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a human membership or app membership for the calling app. Creating memberships for other apps is not supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` (for human membership) or `chat.memberships.app` (for app membership) scope. To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to the space, use `users/app`. - To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person` `resourceName` is `people/123456789`, the user can be added to the space by setting the `membership.member.name` to `users/123456789`.", + // "flatPath": "v1/spaces/{spacesId}/members", + // "httpMethod": "POST", + // "id": "chat.spaces.members.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the space for which to create the membership. Format: spaces/{space}", + // "location": "path", + // "pattern": "^spaces/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/members", + // "request": { + // "$ref": "Membership" + // }, + // "response": { + // "$ref": "Membership" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.app" + // ] + // } + +} + +// method id "chat.spaces.members.delete": + +type SpacesMembersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Developer Preview +// (https://developers.google.com/workspace/preview): Deletes a +// membership. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.memberships` or `chat.memberships.app` authorization scope. +// +// - name: Resource name of the membership to delete. Chat apps can +// delete human users' or their own memberships. Chat apps can't +// delete other apps' memberships. When deleting a human membership, +// requires the `chat.memberships` scope and +// `spaces/{space}/members/{member}` format. When deleting an app +// membership, requires the `chat.memberships.app` scope and +// `spaces/{space}/members/app` format. Format: +// spaces/{space}/members/{member} or spaces/{space}/members/app. +func (r *SpacesMembersService) Delete(name string) *SpacesMembersDeleteCall { + c := &SpacesMembersDeleteCall{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 *SpacesMembersDeleteCall) Fields(s ...googleapi.Field) *SpacesMembersDeleteCall { + 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 *SpacesMembersDeleteCall) Context(ctx context.Context) *SpacesMembersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesMembersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesMembersDeleteCall) doRequest(alt string) (*http.Response, 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 "chat.spaces.members.delete" call. +// Exactly one of *Membership or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Membership.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SpacesMembersDeleteCall) Do(opts ...googleapi.CallOption) (*Membership, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Membership{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a membership. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` or `chat.memberships.app` authorization scope.", + // "flatPath": "v1/spaces/{spacesId}/members/{membersId}", + // "httpMethod": "DELETE", + // "id": "chat.spaces.members.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. When deleting an app membership, requires the `chat.memberships.app` scope and `spaces/{space}/members/app` format. Format: spaces/{space}/members/{member} or spaces/{space}/members/app", + // "location": "path", + // "pattern": "^spaces/[^/]+/members/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Membership" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.app" + // ] + // } + +} + +// method id "chat.spaces.members.get": + +type SpacesMembersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns a membership. Requires authentication +// (https://developers.google.com/chat/api/guides/auth/). Fully supports +// service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). +// Supports user authentication +// (https://developers.google.com/chat/api/guides/auth/users) as part of +// the Google Workspace Developer Preview Program +// (https://developers.google.com/workspace/preview), which grants early +// access to certain features. User authentication +// (https://developers.google.com/chat/api/guides/auth/users) requires +// the `chat.memberships` or `chat.memberships.readonly` authorization +// scope. +// +// - name: Resource name of the membership to retrieve. Format: +// spaces/{space}/members/{member}. +func (r *SpacesMembersService) Get(name string) *SpacesMembersGetCall { + c := &SpacesMembersGetCall{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 *SpacesMembersGetCall) Fields(s ...googleapi.Field) *SpacesMembersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SpacesMembersGetCall) IfNoneMatch(entityTag string) *SpacesMembersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SpacesMembersGetCall) Context(ctx context.Context) *SpacesMembersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesMembersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesMembersGetCall) doRequest(alt string) (*http.Response, 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 "chat.spaces.members.get" call. +// Exactly one of *Membership or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Membership.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SpacesMembersGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Membership{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a membership. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", + // "flatPath": "v1/spaces/{spacesId}/members/{membersId}", + // "httpMethod": "GET", + // "id": "chat.spaces.members.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the membership to retrieve. Format: spaces/{space}/members/{member}", + // "location": "path", + // "pattern": "^spaces/[^/]+/members/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Membership" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly" + // ] + // } + +} + +// method id "chat.spaces.members.list": + +type SpacesMembersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists memberships in a space. Requires authentication +// (https://developers.google.com/chat/api/guides/auth/). Fully supports +// service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). +// Supports user authentication +// (https://developers.google.com/chat/api/guides/auth/users) as part of +// the Google Workspace Developer Preview Program +// (https://developers.google.com/workspace/preview), which grants early +// access to certain features. User authentication +// (https://developers.google.com/chat/api/guides/auth/users) requires +// the `chat.memberships` or `chat.memberships.readonly` authorization +// scope. +// +// - parent: The resource name of the space for which to fetch a +// membership list. Format: spaces/{space}. +func (r *SpacesMembersService) List(parent string) *SpacesMembersListCall { + c := &SpacesMembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A query filter. You can +// filter memberships by a member's role (`role` +// (https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole)) +// and type (`member.type` +// (https://developers.google.com/chat/api/reference/rest/v1/User#type)). +// To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To +// filter by type, set `member.type` to `HUMAN` or `BOT`. To filter by +// both role and type, use the `AND` operator. To filter by either role +// or type, use the `OR` operator. For example, the following queries +// are valid: ``` role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" +// member.type = "HUMAN" AND role = "ROLE_MANAGER" ``` The following +// queries are invalid: ``` member.type = "HUMAN" AND member.type = +// "BOT" role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" ``` Invalid +// queries are rejected by the server with an `INVALID_ARGUMENT` error. +func (c *SpacesMembersListCall) Filter(filter string) *SpacesMembersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of memberships to return. The service may return fewer than this +// value. If unspecified, at most 100 memberships are returned. The +// maximum value is 1000; values above 1000 are coerced to 1000. +// Negative values return an INVALID_ARGUMENT error. +func (c *SpacesMembersListCall) PageSize(pageSize int64) *SpacesMembersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call to list memberships. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided should match the call that provided the page token. Passing +// different values to the other parameters may lead to unexpected +// results. +func (c *SpacesMembersListCall) PageToken(pageToken string) *SpacesMembersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ShowInvited sets the optional parameter "showInvited": When `true`, +// also returns memberships associated with invited members, in addition +// to other types of memberships. If a filter is set, invited +// memberships that don't match the filter criteria aren't returned. +// Currently requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users). +func (c *SpacesMembersListCall) ShowInvited(showInvited bool) *SpacesMembersListCall { + c.urlParams_.Set("showInvited", fmt.Sprint(showInvited)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SpacesMembersListCall) Fields(s ...googleapi.Field) *SpacesMembersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SpacesMembersListCall) IfNoneMatch(entityTag string) *SpacesMembersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SpacesMembersListCall) Context(ctx context.Context) *SpacesMembersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesMembersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesMembersListCall) doRequest(alt string) (*http.Response, 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}/members") + 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 "chat.spaces.members.list" call. +// Exactly one of *ListMembershipsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListMembershipsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListMembershipsResponse{ + ServerResponse: googleapi.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 memberships in a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", + // "flatPath": "v1/spaces/{spacesId}/members", + // "httpMethod": "GET", + // "id": "chat.spaces.members.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of memberships to return. The service may return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an INVALID_ARGUMENT error.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call to list memberships. Provide this to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters may lead to unexpected results.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}", + // "location": "path", + // "pattern": "^spaces/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "showInvited": { + // "description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/members", + // "response": { + // "$ref": "ListMembershipsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chat.bot", + // "https://www.googleapis.com/auth/chat.memberships", + // "https://www.googleapis.com/auth/chat.memberships.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *SpacesMembersListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) 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 "chat.spaces.messages.create": + +type SpacesMessagesCreateCall struct { + s *Service + parent string + message *Message + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a message. For example usage, see Create a message +// (https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). +// Requires authentication +// (https://developers.google.com/chat/api/guides/auth). Fully supports +// service account authentication +// (https://developers.google.com/chat/api/guides/auth/service-accounts). +// Supports user authentication +// (https://developers.google.com/chat/api/guides/auth/users) as part of +// the Google Workspace Developer Preview Program +// (https://developers.google.com/workspace/preview), which grants early +// access to certain features. User authentication +// (https://developers.google.com/chat/api/guides/auth/users) requires +// the `chat.messages` or `chat.messages.create` authorization scope. +// Because Chat provides authentication for webhooks +// (https://developers.google.com/chat/how-tos/webhooks) as part of the +// URL that's generated when a webhook is registered, webhooks can +// create messages without a service account or user authentication. +// +// - parent: The resource name of the space in which to create a +// message. Format: spaces/{space}. +func (r *SpacesMessagesService) Create(parent string, message *Message) *SpacesMessagesCreateCall { + c := &SpacesMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.message = message + return c +} + +// MessageId sets the optional parameter "messageId": A custom name for +// a Chat message assigned at creation. Must start with `client-` and +// contain only lowercase letters, numbers, and hyphens up to 63 +// characters in length. Specify this field to get, update, or delete +// the message with the specified value. For example usage, see Name a +// created message +// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message). +func (c *SpacesMessagesCreateCall) MessageId(messageId string) *SpacesMessagesCreateCall { + c.urlParams_.Set("messageId", messageId) + return c +} + +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *SpacesMessagesCreateCall) MessageReplyOption(messageReplyOption string) *SpacesMessagesCreateCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + +// RequestId sets the optional parameter "requestId": A unique request +// ID for this message. Specifying an existing request ID returns the +// message created with that ID instead of creating a new message. +func (c *SpacesMessagesCreateCall) RequestId(requestId string) *SpacesMessagesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread.thread_key instead. Opaque thread identifier. To start or add +// to a thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). +func (c *SpacesMessagesCreateCall) ThreadKey(threadKey string) *SpacesMessagesCreateCall { + c.urlParams_.Set("threadKey", threadKey) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SpacesMessagesCreateCall) Fields(s ...googleapi.Field) *SpacesMessagesCreateCall { + 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 *SpacesMessagesCreateCall) Context(ctx context.Context) *SpacesMessagesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SpacesMessagesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesMessagesCreateCall) doRequest(alt string) (*http.Response, 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.message) + 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}/messages") + 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 "chat.spaces.messages.create" call. +// Exactly one of *Message or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Message.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Message{ + ServerResponse: googleapi.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 message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Because Chat provides authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages without a service account or user authentication.", + // "flatPath": "v1/spaces/{spacesId}/messages", + // "httpMethod": "POST", + // "id": "chat.spaces.messages.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the space, in the form \"spaces/*\". Format: spaces/{space}", + // "messageId": { + // "description": "Optional. A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).", + // "location": "query", + // "type": "string" + // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the space in which to create a message. Format: spaces/{space}", // "location": "path", // "pattern": "^spaces/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.", + // "location": "query", + // "type": "string" + // }, + // "threadKey": { + // "description": "Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/messages", + // "request": { + // "$ref": "Message" + // }, // "response": { - // "$ref": "Space" + // "$ref": "Message" // }, // "scopes": [ // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.spaces", - // "https://www.googleapis.com/auth/chat.spaces.readonly" + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.create" // ] // } } -// method id "chat.spaces.list": +// method id "chat.spaces.messages.delete": -type SpacesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type SpacesMessagesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists spaces the caller is a member of. Requires authentication +// Delete: Deletes a message. For example usage, see Delete a message +// (https://developers.google.com/chat/api/guides/crudl/messages#delete_a_message). +// Requires authentication // (https://developers.google.com/chat/api/guides/auth). Fully supports // service account authentication // (https://developers.google.com/chat/api/guides/auth/service-accounts). @@ -4484,100 +7376,85 @@ type SpacesListCall struct { // (https://developers.google.com/workspace/preview), which grants early // access to certain features. User authentication // (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.spaces` or `chat.spaces.readonly` authorization scope. -// Lists spaces visible to the caller or authenticated user. Group chats -// and DMs aren't listed until the first message is sent. -func (r *SpacesService) List() *SpacesListCall { - c := &SpacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of spaces to return. The service may return fewer than this value. If -// unspecified, at most 100 spaces are returned. The maximum value is -// 1000; values above 1000 are coerced to 1000. Negative values return -// an `INVALID_ARGUMENT` error. -func (c *SpacesListCall) PageSize(pageSize int64) *SpacesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// the `chat.messages` authorization scope. +// +// - name: Resource name of the message to be deleted, in the form +// "spaces/*/messages/*" Example: +// spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB. +func (r *SpacesMessagesService) Delete(name string) *SpacesMessagesDeleteCall { + c := &SpacesMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous list spaces call. Provide this to retrieve -// the subsequent page. When paginating, the filter value should match -// the call that provided the page token. Passing a different value may -// lead to unexpected results. -func (c *SpacesListCall) PageToken(pageToken string) *SpacesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Force sets the optional parameter "force": When `true`, deleting a +// message also deletes its threaded replies. When `false`, if a message +// has threaded replies, deletion fails. Only applies when +// authenticating as a user +// (https://developers.google.com/chat/api/guides/auth/users). Has no +// effect when [authenticating with a service account] +// (https://developers.google.com/chat/api/guides/auth/service-accounts). +func (c *SpacesMessagesDeleteCall) Force(force bool) *SpacesMessagesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *SpacesListCall) Fields(s ...googleapi.Field) *SpacesListCall { +func (c *SpacesMessagesDeleteCall) Fields(s ...googleapi.Field) *SpacesMessagesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *SpacesListCall) IfNoneMatch(entityTag string) *SpacesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesListCall) Context(ctx context.Context) *SpacesListCall { +func (c *SpacesMessagesDeleteCall) Context(ctx context.Context) *SpacesMessagesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesListCall) Header() http.Header { +func (c *SpacesMessagesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesListCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesDeleteCall) doRequest(alt string) (*http.Response, 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/spaces") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chat.spaces.list" call. -// Exactly one of *ListSpacesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListSpacesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, error) { +// Do executes the "chat.spaces.messages.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4596,7 +7473,7 @@ func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSpacesResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4608,61 +7485,42 @@ func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, } return ret, nil // { - // "description": "Lists spaces the caller is a member of. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", - // "flatPath": "v1/spaces", - // "httpMethod": "GET", - // "id": "chat.spaces.list", - // "parameterOrder": [], + // "description": "Deletes a message. For example usage, see [Delete a message](https://developers.google.com/chat/api/guides/crudl/messages#delete_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.", + // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", + // "httpMethod": "DELETE", + // "id": "chat.spaces.messages.delete", + // "parameterOrder": [ + // "name" + // ], // "parameters": { - // "pageSize": { - // "description": "Optional. The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an `INVALID_ARGUMENT` error.", - // "format": "int32", + // "force": { + // "description": "When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when [authenticating as a user](https://developers.google.com/chat/api/guides/auth/users). Has no effect when [authenticating with a service account] (https://developers.google.com/chat/api/guides/auth/service-accounts).", // "location": "query", - // "type": "integer" + // "type": "boolean" // }, - // "pageToken": { - // "description": "Optional. A page token, received from a previous list spaces call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.", - // "location": "query", + // "name": { + // "description": "Required. Resource name of the message to be deleted, in the form \"spaces/*/messages/*\" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB", + // "location": "path", + // "pattern": "^spaces/[^/]+/messages/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1/spaces", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListSpacesResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.spaces", - // "https://www.googleapis.com/auth/chat.spaces.readonly" + // "https://www.googleapis.com/auth/chat.messages" // ] // } } -// 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 *SpacesListCall) Pages(ctx context.Context, f func(*ListSpacesResponse) 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 "chat.spaces.members.get": +// method id "chat.spaces.messages.get": -type SpacesMembersGetCall struct { +type SpacesMessagesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4671,9 +7529,11 @@ type SpacesMembersGetCall struct { header_ http.Header } -// Get: Returns a membership. Requires authentication -// (https://developers.google.com/chat/api/guides/auth/). Fully supports -// service account authentication +// Get: Returns a message. For example usage, see Read a message +// (https://developers.google.com/chat/api/guides/crudl/messages#read_a_message). +// Requires authentication +// (https://developers.google.com/chat/api/guides/auth). Fully supports +// Service account authentication // (https://developers.google.com/chat/api/guides/auth/service-accounts). // Supports user authentication // (https://developers.google.com/chat/api/guides/auth/users) as part of @@ -4681,13 +7541,18 @@ type SpacesMembersGetCall struct { // (https://developers.google.com/workspace/preview), which grants early // access to certain features. User authentication // (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.memberships` or `chat.memberships.readonly` authorization -// scope. +// the `chat.messages` or `chat.messages.readonly` authorization scope. +// Note: Might return a message from a blocked member or space. // -// - name: Resource name of the membership to retrieve. Format: -// spaces/{space}/members/{member}. -func (r *SpacesMembersService) Get(name string) *SpacesMembersGetCall { - c := &SpacesMembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the message to retrieve. Format: +// spaces/{space}/messages/{message} If the message begins with +// `client-`, then it has a custom name assigned by a Chat app that +// created it with the Chat REST API. That Chat app (but not others) +// can pass the custom name to get, update, or delete the message. To +// learn more, see [create and name a message] +// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message). +func (r *SpacesMessagesService) Get(name string) *SpacesMessagesGetCall { + c := &SpacesMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4695,7 +7560,7 @@ func (r *SpacesMembersService) Get(name string) *SpacesMembersGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *SpacesMembersGetCall) Fields(s ...googleapi.Field) *SpacesMembersGetCall { +func (c *SpacesMessagesGetCall) Fields(s ...googleapi.Field) *SpacesMessagesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4705,7 +7570,7 @@ func (c *SpacesMembersGetCall) Fields(s ...googleapi.Field) *SpacesMembersGetCal // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *SpacesMembersGetCall) IfNoneMatch(entityTag string) *SpacesMembersGetCall { +func (c *SpacesMessagesGetCall) IfNoneMatch(entityTag string) *SpacesMessagesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4713,21 +7578,21 @@ func (c *SpacesMembersGetCall) IfNoneMatch(entityTag string) *SpacesMembersGetCa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMembersGetCall) Context(ctx context.Context) *SpacesMembersGetCall { +func (c *SpacesMessagesGetCall) Context(ctx context.Context) *SpacesMessagesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMembersGetCall) Header() http.Header { +func (c *SpacesMessagesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMembersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4753,14 +7618,14 @@ func (c *SpacesMembersGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chat.spaces.members.get" call. -// Exactly one of *Membership or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Membership.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SpacesMembersGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) { +// Do executes the "chat.spaces.messages.get" call. +// Exactly one of *Message or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Message.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4779,7 +7644,7 @@ func (c *SpacesMembersGetCall) Do(opts ...googleapi.CallOption) (*Membership, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Membership{ + ret := &Message{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4791,38 +7656,38 @@ func (c *SpacesMembersGetCall) Do(opts ...googleapi.CallOption) (*Membership, er } return ret, nil // { - // "description": "Returns a membership. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", - // "flatPath": "v1/spaces/{spacesId}/members/{membersId}", + // "description": "Returns a message. For example usage, see [Read a message](https://developers.google.com/chat/api/guides/crudl/messages#read_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [Service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.readonly` authorization scope. Note: Might return a message from a blocked member or space.", + // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "GET", - // "id": "chat.spaces.members.get", + // "id": "chat.spaces.messages.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the membership to retrieve. Format: spaces/{space}/members/{member}", + // "description": "Required. Resource name of the message to retrieve. Format: spaces/{space}/messages/{message} If the message begins with `client-`, then it has a custom name assigned by a Chat app that created it with the Chat REST API. That Chat app (but not others) can pass the custom name to get, update, or delete the message. To learn more, see [create and name a message] (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).", // "location": "path", - // "pattern": "^spaces/[^/]+/members/[^/]+$", + // "pattern": "^spaces/[^/]+/messages/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Membership" + // "$ref": "Message" // }, // "scopes": [ // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.memberships", - // "https://www.googleapis.com/auth/chat.memberships.readonly" + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.readonly" // ] // } } -// method id "chat.spaces.members.list": +// method id "chat.spaces.messages.list": -type SpacesMembersListCall struct { +type SpacesMessagesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -4831,52 +7696,93 @@ type SpacesMembersListCall struct { header_ http.Header } -// List: Lists memberships in a space. Requires authentication -// (https://developers.google.com/chat/api/guides/auth/). Fully supports -// service account authentication -// (https://developers.google.com/chat/api/guides/auth/service-accounts). -// Supports user authentication -// (https://developers.google.com/chat/api/guides/auth/users) as part of -// the Google Workspace Developer Preview Program -// (https://developers.google.com/workspace/preview), which grants early -// access to certain features. User authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.memberships` or `chat.memberships.readonly` authorization -// scope. +// List: Developer Preview +// (https://developers.google.com/workspace/preview): Lists messages in +// a space that the caller is a member of, including messages from +// blocked members and spaces. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.messages` or `chat.messages.readonly` authorization scope. This +// method is only supported in spaces that don't allow users from +// outside the Workspace organization to join. // -// - parent: The resource name of the space for which to fetch a -// membership list. Format: spaces/{space}. -func (r *SpacesMembersService) List(parent string) *SpacesMembersListCall { - c := &SpacesMembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the space to list messages from. +// Format: spaces/{space}. +func (r *SpacesMessagesService) List(parent string) *SpacesMessagesListCall { + c := &SpacesMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": A query filter. You can +// filter messages by date (`create_time`) and thread (`thread.name`). +// To filter messages by the date they were created, specify the +// `create_time` with a timestamp in RFC-3339 +// (https://www.rfc-editor.org/rfc/rfc3339) format and double quotation +// marks. For example, "2023-04-21T11:30:00-04:00". You can use the +// greater than operator `>` to list messages that were created after a +// timestamp, or the less than operator `<` to list messages that were +// created before a timestamp. To filter messages within a time +// interval, use the `AND` operator between two timestamps. To filter by +// thread, specify the `thread.name`, formatted as +// `spaces/{space}/threads/{thread}`. You can only specify one +// `thread.name` per query. To filter by both thread and date, use the +// `AND` operator in your query. For example, the following queries are +// valid: ``` create_time > "2012-04-21T11:30:00-04:00" create_time > +// "2012-04-21T11:30:00-04:00" AND thread.name = +// spaces/AAAAAAAAAAA/threads/123 create_time > +// "2012-04-21T11:30:00+00:00" AND create_time < +// "2013-01-01T00:00:00+00:00" AND thread.name = +// spaces/AAAAAAAAAAA/threads/123 thread.name = +// spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by +// the server with an `INVALID_ARGUMENT` error. +func (c *SpacesMessagesListCall) Filter(filter string) *SpacesMessagesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Optional, if resuming +// from a previous query. How the list of messages is ordered. Specify a +// value to order by and an ordering operation. Valid ordering operation +// values are: - `ASC` for ascending. - `DESC` for descending. The +// default ordering is `create_time ASC`. +func (c *SpacesMessagesListCall) OrderBy(orderBy string) *SpacesMessagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number -// of memberships to return. The service may return fewer than this -// value. If unspecified, at most 100 memberships are returned. The -// maximum value is 1000; values above 1000 are coerced to 1000. -// Negative values return an INVALID_ARGUMENT error. -func (c *SpacesMembersListCall) PageSize(pageSize int64) *SpacesMembersListCall { +// of messages returned. The service may return fewer messages than this +// value. If unspecified, at most 25 are returned. The maximum value is +// 1000; values above 1000 are coerced to 1000. Negative values return +// an `INVALID_ARGUMENT` error. +func (c *SpacesMessagesListCall) PageSize(pageSize int64) *SpacesMessagesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous call to list memberships. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided should match the call that provided the page token. Passing -// different values to the other parameters may lead to unexpected -// results. -func (c *SpacesMembersListCall) PageToken(pageToken string) *SpacesMembersListCall { +// PageToken sets the optional parameter "pageToken": Optional, if +// resuming from a previous query. A page token received from a previous +// list messages call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided should match the call +// that provided the page token. Passing different values to the other +// parameters may lead to unexpected results. +func (c *SpacesMessagesListCall) PageToken(pageToken string) *SpacesMessagesListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ShowDeleted sets the optional parameter "showDeleted": Whether to +// include deleted messages. Deleted messages include deleted time and +// metadata about their deletion, but message content is unavailable. +func (c *SpacesMessagesListCall) ShowDeleted(showDeleted bool) *SpacesMessagesListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *SpacesMembersListCall) Fields(s ...googleapi.Field) *SpacesMembersListCall { +func (c *SpacesMessagesListCall) Fields(s ...googleapi.Field) *SpacesMessagesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4886,7 +7792,7 @@ func (c *SpacesMembersListCall) Fields(s ...googleapi.Field) *SpacesMembersListC // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *SpacesMembersListCall) IfNoneMatch(entityTag string) *SpacesMembersListCall { +func (c *SpacesMessagesListCall) IfNoneMatch(entityTag string) *SpacesMessagesListCall { c.ifNoneMatch_ = entityTag return c } @@ -4894,21 +7800,21 @@ func (c *SpacesMembersListCall) IfNoneMatch(entityTag string) *SpacesMembersList // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMembersListCall) Context(ctx context.Context) *SpacesMembersListCall { +func (c *SpacesMessagesListCall) Context(ctx context.Context) *SpacesMessagesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMembersListCall) Header() http.Header { +func (c *SpacesMessagesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMembersListCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4921,7 +7827,7 @@ func (c *SpacesMembersListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/members") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4934,14 +7840,14 @@ func (c *SpacesMembersListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chat.spaces.members.list" call. -// Exactly one of *ListMembershipsResponse or error will be non-nil. Any +// Do executes the "chat.spaces.messages.list" call. +// Exactly one of *ListMessagesResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListMembershipsResponse.ServerResponse.Header or (if a response was +// *ListMessagesResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) { +func (c *SpacesMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessagesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4960,7 +7866,7 @@ func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMembershipsResponse{ + ret := &ListMessagesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4972,41 +7878,55 @@ func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershi } return ret, nil // { - // "description": "Lists memberships in a space. Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", - // "flatPath": "v1/spaces/{spacesId}/members", + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope. This method is only supported in spaces that don't allow users from outside the Workspace organization to join.", + // "flatPath": "v1/spaces/{spacesId}/messages", // "httpMethod": "GET", - // "id": "chat.spaces.members.list", + // "id": "chat.spaces.messages.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify the `create_time` with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and double quotation marks. For example, `\"2023-04-21T11:30:00-04:00\"`. You can use the greater than operator `\u003e` to list messages that were created after a timestamp, or the less than operator `\u003c` to list messages that were created before a timestamp. To filter messages within a time interval, use the `AND` operator between two timestamps. To filter by thread, specify the `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only specify one `thread.name` per query. To filter by both thread and date, use the `AND` operator in your query. For example, the following queries are valid: ``` create_time \u003e \"2012-04-21T11:30:00-04:00\" create_time \u003e \"2012-04-21T11:30:00-04:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time \u003e \"2012-04-21T11:30:00+00:00\" AND create_time \u003c \"2013-01-01T00:00:00+00:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional, if resuming from a previous query. How the list of messages is ordered. Specify a value to order by and an ordering operation. Valid ordering operation values are: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { - // "description": "The maximum number of memberships to return. The service may return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an INVALID_ARGUMENT error.", + // "description": "The maximum number of messages returned. The service may return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1000; values above 1000 are coerced to 1000. Negative values return an `INVALID_ARGUMENT` error.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous call to list memberships. Provide this to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters may lead to unexpected results.", + // "description": "Optional, if resuming from a previous query. A page token received from a previous list messages call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters may lead to unexpected results.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}", + // "description": "Required. The resource name of the space to list messages from. Format: spaces/{space}", // "location": "path", // "pattern": "^spaces/[^/]+$", // "required": true, // "type": "string" + // }, + // "showDeleted": { + // "description": "Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+parent}/members", + // "path": "v1/{+parent}/messages", // "response": { - // "$ref": "ListMembershipsResponse" + // "$ref": "ListMessagesResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.memberships", - // "https://www.googleapis.com/auth/chat.memberships.readonly" + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.readonly" // ] // } @@ -5015,7 +7935,7 @@ func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershi // 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 *SpacesMembersListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) error) error { +func (c *SpacesMessagesListCall) Pages(ctx context.Context, f func(*ListMessagesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5033,21 +7953,24 @@ func (c *SpacesMembersListCall) Pages(ctx context.Context, f func(*ListMembershi } } -// method id "chat.spaces.messages.create": +// method id "chat.spaces.messages.patch": -type SpacesMessagesCreateCall struct { +type SpacesMessagesPatchCall struct { s *Service - parent string + name string message *Message urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a message. For example usage, see Create a message -// (https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). +// Patch: Updates a message. There's a difference between `patch` and +// `update` methods. The `patch` method uses a `patch` request while the +// `update` method uses a `put` request. We recommend using the `patch` +// method. For example usage, see Update a message +// (https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). // Requires authentication -// (https://developers.google.com/chat/api/guides/auth). Fully supports +// (https://developers.google.com/chat/api/guides/auth/). Fully supports // service account authentication // (https://developers.google.com/chat/api/guides/auth/service-accounts). // Supports user authentication @@ -5056,77 +7979,42 @@ type SpacesMessagesCreateCall struct { // (https://developers.google.com/workspace/preview), which grants early // access to certain features. User authentication // (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` or `chat.messages.create` authorization scope. -// Because Chat provides authentication for webhooks -// (https://developers.google.com/chat/how-tos/webhooks) as part of the -// URL that's generated when a webhook is registered, webhooks can -// create messages without a service account or user authentication. +// the `chat.messages` authorization scope. // -// - parent: The resource name of the space in which to create a -// message. Format: spaces/{space}. -func (r *SpacesMessagesService) Create(parent string, message *Message) *SpacesMessagesCreateCall { - c := &SpacesMessagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Resource name in the form `spaces/*/messages/*`. Example: +// `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. +func (r *SpacesMessagesService) Patch(name string, message *Message) *SpacesMessagesPatchCall { + c := &SpacesMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.message = message return c } -// MessageId sets the optional parameter "messageId": A custom name for -// a Chat message assigned at creation. Must start with `client-` and -// contain only lowercase letters, numbers, and hyphens up to 63 -// characters in length. Specify this field to get, update, or delete -// the message with the specified value. For example usage, see Name a -// created message -// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message). -func (c *SpacesMessagesCreateCall) MessageId(messageId string) *SpacesMessagesCreateCall { - c.urlParams_.Set("messageId", messageId) - return c -} - -// MessageReplyOption sets the optional parameter "messageReplyOption": -// Specifies whether a message starts a thread or replies to one. Only -// supported in named spaces. -// -// Possible values: -// -// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. -// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a -// -// reply to the thread specified by thread ID or thread_key. If it -// fails, the message starts a new thread instead. -// -// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the -// -// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND -// error is returned instead. -func (c *SpacesMessagesCreateCall) MessageReplyOption(messageReplyOption string) *SpacesMessagesCreateCall { - c.urlParams_.Set("messageReplyOption", messageReplyOption) - return c -} - -// RequestId sets the optional parameter "requestId": A unique request -// ID for this message. Specifying an existing request ID returns the -// message created with that ID instead of creating a new message. -func (c *SpacesMessagesCreateCall) RequestId(requestId string) *SpacesMessagesCreateCall { - c.urlParams_.Set("requestId", requestId) +// AllowMissing sets the optional parameter "allowMissing": If `true` +// and the message is not found, a new message is created and +// `updateMask` is ignored. The specified message ID must be +// client-assigned +// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) +// or the request fails. +func (c *SpacesMessagesPatchCall) AllowMissing(allowMissing bool) *SpacesMessagesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// ThreadKey sets the optional parameter "threadKey": Deprecated: Use -// thread.thread_key instead. Opaque thread identifier. To start or add -// to a thread, create a message and specify a `threadKey` or the -// thread.name. For example usage, see Start or reply to a message -// thread -// (https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). -func (c *SpacesMessagesCreateCall) ThreadKey(threadKey string) *SpacesMessagesCreateCall { - c.urlParams_.Set("threadKey", threadKey) +// UpdateMask sets the optional parameter "updateMask": Required. The +// field paths to update. Separate multiple values with commas. +// Currently supported field paths: - text - cards (Requires service +// account authentication (/chat/api/guides/auth/service-accounts).) - +// cards_v2 +func (c *SpacesMessagesPatchCall) UpdateMask(updateMask string) *SpacesMessagesPatchCall { + 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 *SpacesMessagesCreateCall) Fields(s ...googleapi.Field) *SpacesMessagesCreateCall { +func (c *SpacesMessagesPatchCall) Fields(s ...googleapi.Field) *SpacesMessagesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5134,21 +8022,21 @@ func (c *SpacesMessagesCreateCall) Fields(s ...googleapi.Field) *SpacesMessagesC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMessagesCreateCall) Context(ctx context.Context) *SpacesMessagesCreateCall { +func (c *SpacesMessagesPatchCall) Context(ctx context.Context) *SpacesMessagesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMessagesCreateCall) Header() http.Header { +func (c *SpacesMessagesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMessagesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5163,27 +8051,27 @@ func (c *SpacesMessagesCreateCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/messages") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } 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 "chat.spaces.messages.create" call. +// Do executes the "chat.spaces.messages.patch" call. // Exactly one of *Message or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Message.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, error) { +func (c *SpacesMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5214,53 +8102,34 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Creates a message. For example usage, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Because Chat provides authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages without a service account or user authentication.", - // "flatPath": "v1/spaces/{spacesId}/messages", - // "httpMethod": "POST", - // "id": "chat.spaces.messages.create", + // "description": "Updates a message. There's a difference between `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.", + // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", + // "httpMethod": "PATCH", + // "id": "chat.spaces.messages.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "messageId": { - // "description": "Optional. A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).", - // "location": "query", - // "type": "string" - // }, - // "messageReplyOption": { - // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", - // "enum": [ - // "MESSAGE_REPLY_OPTION_UNSPECIFIED", - // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", - // "REPLY_MESSAGE_OR_FAIL" - // ], - // "enumDescriptions": [ - // "Default. Starts a thread.", - // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", - // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." - // ], + // "allowMissing": { + // "description": "Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, - // "parent": { - // "description": "Required. The resource name of the space in which to create a message. Format: spaces/{space}", + // "name": { + // "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`", // "location": "path", - // "pattern": "^spaces/[^/]+$", + // "pattern": "^spaces/[^/]+/messages/[^/]+$", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.", - // "location": "query", - // "type": "string" - // }, - // "threadKey": { - // "description": "Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", + // "updateMask": { + // "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - cards_v2 ", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/messages", + // "path": "v1/{+name}", // "request": { // "$ref": "Message" // }, @@ -5269,27 +8138,30 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e // }, // "scopes": [ // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.messages", - // "https://www.googleapis.com/auth/chat.messages.create" + // "https://www.googleapis.com/auth/chat.messages" // ] // } } -// method id "chat.spaces.messages.delete": +// method id "chat.spaces.messages.update": -type SpacesMessagesDeleteCall struct { +type SpacesMessagesUpdateCall struct { s *Service name string + message *Message urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a message. For example usage, see Delete a message -// (https://developers.google.com/chat/api/guides/crudl/messages#delete_a_message). +// Update: Updates a message. There's a difference between `patch` and +// `update` methods. The `patch` method uses a `patch` request while the +// `update` method uses a `put` request. We recommend using the `patch` +// method. For example usage, see Update a message +// (https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). // Requires authentication -// (https://developers.google.com/chat/api/guides/auth). Fully supports +// (https://developers.google.com/chat/api/guides/auth/). Fully supports // service account authentication // (https://developers.google.com/chat/api/guides/auth/service-accounts). // Supports user authentication @@ -5300,19 +8172,40 @@ type SpacesMessagesDeleteCall struct { // (https://developers.google.com/chat/api/guides/auth/users) requires // the `chat.messages` authorization scope. // -// - name: Resource name of the message to be deleted, in the form -// "spaces/*/messages/*" Example: -// spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB. -func (r *SpacesMessagesService) Delete(name string) *SpacesMessagesDeleteCall { - c := &SpacesMessagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name in the form `spaces/*/messages/*`. Example: +// `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. +func (r *SpacesMessagesService) Update(name string, message *Message) *SpacesMessagesUpdateCall { + c := &SpacesMessagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.message = message + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If `true` +// and the message is not found, a new message is created and +// `updateMask` is ignored. The specified message ID must be +// client-assigned +// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) +// or the request fails. +func (c *SpacesMessagesUpdateCall) AllowMissing(allowMissing bool) *SpacesMessagesUpdateCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// field paths to update. Separate multiple values with commas. +// Currently supported field paths: - text - cards (Requires service +// account authentication (/chat/api/guides/auth/service-accounts).) - +// cards_v2 +func (c *SpacesMessagesUpdateCall) UpdateMask(updateMask string) *SpacesMessagesUpdateCall { + 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 *SpacesMessagesDeleteCall) Fields(s ...googleapi.Field) *SpacesMessagesDeleteCall { +func (c *SpacesMessagesUpdateCall) Fields(s ...googleapi.Field) *SpacesMessagesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5320,21 +8213,21 @@ func (c *SpacesMessagesDeleteCall) Fields(s ...googleapi.Field) *SpacesMessagesD // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMessagesDeleteCall) Context(ctx context.Context) *SpacesMessagesDeleteCall { +func (c *SpacesMessagesUpdateCall) Context(ctx context.Context) *SpacesMessagesUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMessagesDeleteCall) Header() http.Header { +func (c *SpacesMessagesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMessagesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5342,11 +8235,16 @@ func (c *SpacesMessagesDeleteCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.message) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -5357,14 +8255,14 @@ func (c *SpacesMessagesDeleteCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chat.spaces.messages.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// Do executes the "chat.spaces.messages.update" call. +// Exactly one of *Message or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) +// *Message.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5383,7 +8281,7 @@ func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Message{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5395,25 +8293,39 @@ func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err } return ret, nil // { - // "description": "Deletes a message. For example usage, see [Delete a message](https://developers.google.com/chat/api/guides/crudl/messages#delete_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.", + // "description": "Updates a message. There's a difference between `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", - // "httpMethod": "DELETE", - // "id": "chat.spaces.messages.delete", + // "httpMethod": "PUT", + // "id": "chat.spaces.messages.update", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Required. Resource name of the message to be deleted, in the form \"spaces/*/messages/*\" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB", + // "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`", // "location": "path", // "pattern": "^spaces/[^/]+/messages/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - cards_v2 ", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "Message" + // }, // "response": { - // "$ref": "Empty" + // "$ref": "Message" // }, // "scopes": [ // "https://www.googleapis.com/auth/chat.bot", @@ -5423,9 +8335,9 @@ func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err } -// method id "chat.spaces.messages.get": +// method id "chat.spaces.messages.attachments.get": -type SpacesMessagesGetCall struct { +type SpacesMessagesAttachmentsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -5434,30 +8346,16 @@ type SpacesMessagesGetCall struct { header_ http.Header } -// Get: Returns a message. For example usage, see Read a message -// (https://developers.google.com/chat/api/guides/crudl/messages#read_a_message). -// Requires authentication -// (https://developers.google.com/chat/api/guides/auth). Fully supports -// Service account authentication +// Get: Gets the metadata of a message attachment. The attachment data +// is fetched using the media API +// (https://developers.google.com/chat/api/reference/rest/v1/media/download). +// Requires service account authentication // (https://developers.google.com/chat/api/guides/auth/service-accounts). -// Supports user authentication -// (https://developers.google.com/chat/api/guides/auth/users) as part of -// the Google Workspace Developer Preview Program -// (https://developers.google.com/workspace/preview), which grants early -// access to certain features. User authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` or `chat.messages.readonly` authorization scope. -// Note: Might return a message from a blocked member or space. // -// - name: Resource name of the message to retrieve. Format: -// spaces/{space}/messages/{message} If the message begins with -// `client-`, then it has a custom name assigned by a Chat app that -// created it with the Chat REST API. That Chat app (but not others) -// can pass the custom name to get, update, or delete the message. To -// learn more, see [create and name a message] -// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message). -func (r *SpacesMessagesService) Get(name string) *SpacesMessagesGetCall { - c := &SpacesMessagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the attachment, in the form +// "spaces/*/messages/*/attachments/*". +func (r *SpacesMessagesAttachmentsService) Get(name string) *SpacesMessagesAttachmentsGetCall { + c := &SpacesMessagesAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -5465,7 +8363,7 @@ func (r *SpacesMessagesService) Get(name string) *SpacesMessagesGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *SpacesMessagesGetCall) Fields(s ...googleapi.Field) *SpacesMessagesGetCall { +func (c *SpacesMessagesAttachmentsGetCall) Fields(s ...googleapi.Field) *SpacesMessagesAttachmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5475,7 +8373,7 @@ func (c *SpacesMessagesGetCall) Fields(s ...googleapi.Field) *SpacesMessagesGetC // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *SpacesMessagesGetCall) IfNoneMatch(entityTag string) *SpacesMessagesGetCall { +func (c *SpacesMessagesAttachmentsGetCall) IfNoneMatch(entityTag string) *SpacesMessagesAttachmentsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5483,21 +8381,21 @@ func (c *SpacesMessagesGetCall) IfNoneMatch(entityTag string) *SpacesMessagesGet // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMessagesGetCall) Context(ctx context.Context) *SpacesMessagesGetCall { +func (c *SpacesMessagesAttachmentsGetCall) Context(ctx context.Context) *SpacesMessagesAttachmentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMessagesGetCall) Header() http.Header { +func (c *SpacesMessagesAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMessagesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5523,14 +8421,14 @@ func (c *SpacesMessagesGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chat.spaces.messages.get" call. -// Exactly one of *Message or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Message.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, error) { +// Do executes the "chat.spaces.messages.attachments.get" call. +// Exactly one of *Attachment or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Attachment.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SpacesMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Attachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5549,7 +8447,7 @@ func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Message{ + ret := &Attachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5561,97 +8459,65 @@ func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, erro } return ret, nil // { - // "description": "Returns a message. For example usage, see [Read a message](https://developers.google.com/chat/api/guides/crudl/messages#read_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [Service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.readonly` authorization scope. Note: Might return a message from a blocked member or space.", - // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", + // "description": "Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", + // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}", // "httpMethod": "GET", - // "id": "chat.spaces.messages.get", + // "id": "chat.spaces.messages.attachments.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the message to retrieve. Format: spaces/{space}/messages/{message} If the message begins with `client-`, then it has a custom name assigned by a Chat app that created it with the Chat REST API. That Chat app (but not others) can pass the custom name to get, update, or delete the message. To learn more, see [create and name a message] (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message).", + // "description": "Required. Resource name of the attachment, in the form \"spaces/*/messages/*/attachments/*\".", // "location": "path", - // "pattern": "^spaces/[^/]+/messages/[^/]+$", + // "pattern": "^spaces/[^/]+/messages/[^/]+/attachments/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Message" + // "$ref": "Attachment" // }, // "scopes": [ - // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.messages", - // "https://www.googleapis.com/auth/chat.messages.readonly" + // "https://www.googleapis.com/auth/chat.bot" // ] // } } -// method id "chat.spaces.messages.patch": - -type SpacesMessagesPatchCall struct { - s *Service - name string - message *Message - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a message. There's a difference between `patch` and -// `update` methods. The `patch` method uses a `patch` request while the -// `update` method uses a `put` request. We recommend using the `patch` -// method. For example usage, see Update a message -// (https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). -// Requires authentication -// (https://developers.google.com/chat/api/guides/auth/). Fully supports -// service account authentication -// (https://developers.google.com/chat/api/guides/auth/service-accounts). -// Supports user authentication -// (https://developers.google.com/chat/api/guides/auth/users) as part of -// the Google Workspace Developer Preview Program -// (https://developers.google.com/workspace/preview), which grants early -// access to certain features. User authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` authorization scope. -// -// - name: Resource name in the form `spaces/*/messages/*`. Example: -// `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. -func (r *SpacesMessagesService) Patch(name string, message *Message) *SpacesMessagesPatchCall { - c := &SpacesMessagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.message = message - return c -} +// method id "chat.spaces.messages.reactions.create": -// AllowMissing sets the optional parameter "allowMissing": If `true` -// and the message is not found, a new message is created and -// `updateMask` is ignored. The specified message ID must be -// client-assigned -// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) -// or the request fails. -func (c *SpacesMessagesPatchCall) AllowMissing(allowMissing bool) *SpacesMessagesPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c +type SpacesMessagesReactionsCreateCall struct { + s *Service + parent string + reaction *Reaction + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateMask sets the optional parameter "updateMask": Required. The -// field paths to update. Separate multiple values with commas. -// Currently supported field paths: - text - cards (Requires service -// account authentication (/chat/api/guides/auth/service-accounts).) - -// cards_v2 -func (c *SpacesMessagesPatchCall) UpdateMask(updateMask string) *SpacesMessagesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Create: Developer Preview +// (https://developers.google.com/workspace/preview): Creates a reaction +// and adds it to a message. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.messages`, `chat.messages.reactions`, or +// `chat.messages.reactions.create` scope. Only unicode emoji are +// supported. +// +// - parent: The message where the reaction is created. Format: +// spaces/{space}/messages/{message}. +func (r *SpacesMessagesReactionsService) Create(parent string, reaction *Reaction) *SpacesMessagesReactionsCreateCall { + c := &SpacesMessagesReactionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.reaction = reaction return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *SpacesMessagesPatchCall) Fields(s ...googleapi.Field) *SpacesMessagesPatchCall { +func (c *SpacesMessagesReactionsCreateCall) Fields(s ...googleapi.Field) *SpacesMessagesReactionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5659,21 +8525,21 @@ func (c *SpacesMessagesPatchCall) Fields(s ...googleapi.Field) *SpacesMessagesPa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMessagesPatchCall) Context(ctx context.Context) *SpacesMessagesPatchCall { +func (c *SpacesMessagesReactionsCreateCall) Context(ctx context.Context) *SpacesMessagesReactionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMessagesPatchCall) Header() http.Header { +func (c *SpacesMessagesReactionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMessagesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesReactionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5681,34 +8547,34 @@ func (c *SpacesMessagesPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.message) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reaction) 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}/reactions") 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 "chat.spaces.messages.patch" call. -// Exactly one of *Message or error will be non-nil. Any non-2xx status +// Do executes the "chat.spaces.messages.reactions.create" call. +// Exactly one of *Reaction or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Message.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *SpacesMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, error) { +// *Reaction.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SpacesMessagesReactionsCreateCall) Do(opts ...googleapi.CallOption) (*Reaction, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5727,7 +8593,7 @@ func (c *SpacesMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Message{ + ret := &Reaction{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5739,110 +8605,66 @@ func (c *SpacesMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, er } return ret, nil // { - // "description": "Updates a message. There's a difference between `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.", - // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", - // "httpMethod": "PATCH", - // "id": "chat.spaces.messages.patch", + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a reaction and adds it to a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages`, `chat.messages.reactions`, or `chat.messages.reactions.create` scope. Only unicode emoji are supported.", + // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", + // "httpMethod": "POST", + // "id": "chat.spaces.messages.reactions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "allowMissing": { - // "description": "Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`", + // "parent": { + // "description": "Required. The message where the reaction is created. Format: spaces/{space}/messages/{message}", // "location": "path", // "pattern": "^spaces/[^/]+/messages/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - cards_v2 ", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/reactions", // "request": { - // "$ref": "Message" + // "$ref": "Reaction" // }, // "response": { - // "$ref": "Message" + // "$ref": "Reaction" // }, // "scopes": [ - // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.messages" + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.create" // ] // } } -// method id "chat.spaces.messages.update": +// method id "chat.spaces.messages.reactions.delete": -type SpacesMessagesUpdateCall struct { +type SpacesMessagesReactionsDeleteCall struct { s *Service name string - message *Message urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Update: Updates a message. There's a difference between `patch` and -// `update` methods. The `patch` method uses a `patch` request while the -// `update` method uses a `put` request. We recommend using the `patch` -// method. For example usage, see Update a message -// (https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). -// Requires authentication -// (https://developers.google.com/chat/api/guides/auth/). Fully supports -// service account authentication -// (https://developers.google.com/chat/api/guides/auth/service-accounts). -// Supports user authentication -// (https://developers.google.com/chat/api/guides/auth/users) as part of -// the Google Workspace Developer Preview Program -// (https://developers.google.com/workspace/preview), which grants early -// access to certain features. User authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` authorization scope. +// Delete: Developer Preview +// (https://developers.google.com/workspace/preview): Deletes a reaction +// to a message. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and the +// `chat.messages` or `chat.messages.reactions` scope. // -// - name: Resource name in the form `spaces/*/messages/*`. Example: -// `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. -func (r *SpacesMessagesService) Update(name string, message *Message) *SpacesMessagesUpdateCall { - c := &SpacesMessagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the reaction to delete. Format: +// spaces/{space}/messages/{message}/reactions/{reaction}. +func (r *SpacesMessagesReactionsService) Delete(name string) *SpacesMessagesReactionsDeleteCall { + c := &SpacesMessagesReactionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.message = message - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If `true` -// and the message is not found, a new message is created and -// `updateMask` is ignored. The specified message ID must be -// client-assigned -// (https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) -// or the request fails. -func (c *SpacesMessagesUpdateCall) AllowMissing(allowMissing bool) *SpacesMessagesUpdateCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// field paths to update. Separate multiple values with commas. -// Currently supported field paths: - text - cards (Requires service -// account authentication (/chat/api/guides/auth/service-accounts).) - -// cards_v2 -func (c *SpacesMessagesUpdateCall) UpdateMask(updateMask string) *SpacesMessagesUpdateCall { - 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 *SpacesMessagesUpdateCall) Fields(s ...googleapi.Field) *SpacesMessagesUpdateCall { +func (c *SpacesMessagesReactionsDeleteCall) Fields(s ...googleapi.Field) *SpacesMessagesReactionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5850,21 +8672,21 @@ func (c *SpacesMessagesUpdateCall) Fields(s ...googleapi.Field) *SpacesMessagesU // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMessagesUpdateCall) Context(ctx context.Context) *SpacesMessagesUpdateCall { +func (c *SpacesMessagesReactionsDeleteCall) Context(ctx context.Context) *SpacesMessagesReactionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMessagesUpdateCall) Header() http.Header { +func (c *SpacesMessagesReactionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMessagesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesReactionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5872,16 +8694,11 @@ func (c *SpacesMessagesUpdateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.message) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -5892,14 +8709,14 @@ func (c *SpacesMessagesUpdateCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chat.spaces.messages.update" call. -// Exactly one of *Message or error will be non-nil. Any non-2xx status +// Do executes the "chat.spaces.messages.reactions.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Message.ServerResponse.Header or (if a response was returned at all) +// *Empty.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, error) { +func (c *SpacesMessagesReactionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5918,7 +8735,7 @@ func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Message{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5930,77 +8747,113 @@ func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Updates a message. There's a difference between `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For example usage, see [Update a message](https://developers.google.com/chat/api/guides/crudl/messages#update_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth/). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). Supports [user authentication](https://developers.google.com/chat/api/guides/auth/users) as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.", - // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", - // "httpMethod": "PUT", - // "id": "chat.spaces.messages.update", + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a reaction to a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.reactions` scope.", + // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions/{reactionsId}", + // "httpMethod": "DELETE", + // "id": "chat.spaces.messages.reactions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "Optional. If `true` and the message is not found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/crudl/messages#name_a_created_message) or the request fails.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`", + // "description": "Required. Name of the reaction to delete. Format: spaces/{space}/messages/{message}/reactions/{reaction}", // "location": "path", - // "pattern": "^spaces/[^/]+/messages/[^/]+$", + // "pattern": "^spaces/[^/]+/messages/[^/]+/reactions/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The field paths to update. Separate multiple values with commas. Currently supported field paths: - text - cards (Requires [service account authentication](/chat/api/guides/auth/service-accounts).) - cards_v2 ", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "Message" - // }, // "response": { - // "$ref": "Message" + // "$ref": "Empty" // }, // "scopes": [ - // "https://www.googleapis.com/auth/chat.bot", - // "https://www.googleapis.com/auth/chat.messages" + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions" // ] // } } -// method id "chat.spaces.messages.attachments.get": +// method id "chat.spaces.messages.reactions.list": -type SpacesMessagesAttachmentsGetCall struct { +type SpacesMessagesReactionsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the metadata of a message attachment. The attachment data -// is fetched using the media API -// (https://developers.google.com/chat/api/reference/rest/v1/media/download). -// Requires service account authentication -// (https://developers.google.com/chat/api/guides/auth/service-accounts). +// List: Developer Preview +// (https://developers.google.com/workspace/preview): Lists reactions to +// a message. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users) and +// `chat.messages`, `chat.messages.readonly`, `chat.messages.reactions`, +// or `chat.messages.reactions.readonly` scope. // -// - name: Resource name of the attachment, in the form -// "spaces/*/messages/*/attachments/*". -func (r *SpacesMessagesAttachmentsService) Get(name string) *SpacesMessagesAttachmentsGetCall { - c := &SpacesMessagesAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The message users reacted to. Format: +// spaces/{space}/messages/{message}. +func (r *SpacesMessagesReactionsService) List(parent string) *SpacesMessagesReactionsListCall { + c := &SpacesMessagesReactionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A query filter. You can +// filter reactions by emoji +// (https://developers.google.com/chat/api/reference/rest/v1/Emoji) +// (either `emoji.unicode` or `emoji.custom_emoji.uid`) and user +// (https://developers.google.com/chat/api/reference/rest/v1/User) +// (`user.name`). To filter reactions for multiple emojis or users, join +// similar fields with the `OR` operator, such as `emoji.unicode = +// "🙂" OR emoji.unicode = "👍" and `user.name = "users/AAAAAA" OR +// user.name = "users/BBBBBB". To filter reactions by emoji and user, +// use the `AND` operator, such as `emoji.unicode = "🙂" AND user.name +// = "users/AAAAAA". If your query uses both `AND` and `OR`, group them +// with parentheses. For example, the following queries are valid: ``` +// user.name = "users/{user}" emoji.unicode = "🙂" +// emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" OR +// emoji.unicode = "👍" emoji.unicode = "🙂" OR +// emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" AND user.name +// = "users/{user}" (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = +// "{uid}") AND user.name = "users/{user}" ``` The following queries are +// invalid: ``` emoji.unicode = "🙂" AND emoji.unicode = "👍" +// emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" +// emoji.unicode = "🙂" OR user.name = "users/{user}" emoji.unicode = +// "🙂" OR emoji.custom_emoji.uid = "{uid}" OR user.name = +// "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = +// "{uid}" AND user.name = "users/{user}" ``` Invalid queries are +// rejected by the server with an `INVALID_ARGUMENT` error. +func (c *SpacesMessagesReactionsListCall) Filter(filter string) *SpacesMessagesReactionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of reactions returned. The service may return fewer reactions than +// this value. If unspecified, the default value is 25. The maximum +// value is 200; values above 200 are changed to 200. +func (c *SpacesMessagesReactionsListCall) PageSize(pageSize int64) *SpacesMessagesReactionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": (If resuming from +// a previous query.) A page token received from a previous list +// reactions call. Provide this to retrieve the subsequent page. When +// paginating, the filter value should match the call that provided the +// page token. Passing a different value may lead to unexpected results. +func (c *SpacesMessagesReactionsListCall) PageToken(pageToken string) *SpacesMessagesReactionsListCall { + 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 *SpacesMessagesAttachmentsGetCall) Fields(s ...googleapi.Field) *SpacesMessagesAttachmentsGetCall { +func (c *SpacesMessagesReactionsListCall) Fields(s ...googleapi.Field) *SpacesMessagesReactionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6010,7 +8863,7 @@ func (c *SpacesMessagesAttachmentsGetCall) Fields(s ...googleapi.Field) *SpacesM // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *SpacesMessagesAttachmentsGetCall) IfNoneMatch(entityTag string) *SpacesMessagesAttachmentsGetCall { +func (c *SpacesMessagesReactionsListCall) IfNoneMatch(entityTag string) *SpacesMessagesReactionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -6018,21 +8871,21 @@ func (c *SpacesMessagesAttachmentsGetCall) IfNoneMatch(entityTag string) *Spaces // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *SpacesMessagesAttachmentsGetCall) Context(ctx context.Context) *SpacesMessagesAttachmentsGetCall { +func (c *SpacesMessagesReactionsListCall) Context(ctx context.Context) *SpacesMessagesReactionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *SpacesMessagesAttachmentsGetCall) Header() http.Header { +func (c *SpacesMessagesReactionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *SpacesMessagesAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *SpacesMessagesReactionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6045,7 +8898,7 @@ func (c *SpacesMessagesAttachmentsGetCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reactions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6053,19 +8906,19 @@ func (c *SpacesMessagesAttachmentsGetCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chat.spaces.messages.attachments.get" call. -// Exactly one of *Attachment or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Attachment.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *SpacesMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Attachment, error) { +// Do executes the "chat.spaces.messages.reactions.list" call. +// Exactly one of *ListReactionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListReactionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SpacesMessagesReactionsListCall) Do(opts ...googleapi.CallOption) (*ListReactionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6084,7 +8937,7 @@ func (c *SpacesMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*At if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Attachment{ + ret := &ListReactionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6096,29 +8949,69 @@ func (c *SpacesMessagesAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*At } return ret, nil // { - // "description": "Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", - // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}", + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists reactions to a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and `chat.messages`, `chat.messages.readonly`, `chat.messages.reactions`, or `chat.messages.reactions.readonly` scope.", + // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", // "httpMethod": "GET", - // "id": "chat.spaces.messages.attachments.get", + // "id": "chat.spaces.messages.reactions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the attachment, in the form \"spaces/*/messages/*/attachments/*\".", + // "filter": { + // "description": "Optional. A query filter. You can filter reactions by [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji) (either `emoji.unicode` or `emoji.custom_emoji.uid`) and [user](https://developers.google.com/chat/api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple emojis or users, join similar fields with the `OR` operator, such as `emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\"` and `user.name = \"users/AAAAAA\" OR user.name = \"users/BBBBBB\"`. To filter reactions by emoji and user, use the `AND` operator, such as `emoji.unicode = \"🙂\" AND user.name = \"users/AAAAAA\"`. If your query uses both `AND` and `OR`, group them with parentheses. For example, the following queries are valid: ``` user.name = \"users/{user}\" emoji.unicode = \"🙂\" emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" AND user.name = \"users/{user}\" (emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\") AND user.name = \"users/{user}\" ``` The following queries are invalid: ``` emoji.unicode = \"🙂\" AND emoji.unicode = \"👍\" emoji.unicode = \"🙂\" AND emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" AND user.name = \"users/{user}\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of reactions returned. The service may return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The message users reacted to. Format: spaces/{space}/messages/{message}", // "location": "path", - // "pattern": "^spaces/[^/]+/messages/[^/]+/attachments/[^/]+$", + // "pattern": "^spaces/[^/]+/messages/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/reactions", // "response": { - // "$ref": "Attachment" + // "$ref": "ListReactionsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/chat.bot" + // "https://www.googleapis.com/auth/chat.messages", + // "https://www.googleapis.com/auth/chat.messages.reactions", + // "https://www.googleapis.com/auth/chat.messages.reactions.readonly", + // "https://www.googleapis.com/auth/chat.messages.readonly" // ] // } } + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *SpacesMessagesReactionsListCall) Pages(ctx context.Context, f func(*ListReactionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index e802fef02b2..4b424d301ef 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -1100,7 +1100,7 @@ } } }, - "revision": "20230429", + "revision": "20230513", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -4095,7 +4095,7 @@ "type": "object" }, "ResourceSearchResult": { - "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 32", + "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 34", "id": "ResourceSearchResult", "properties": { "additionalAttributes": { @@ -4205,7 +4205,7 @@ "type": "array" }, "tagValueIds": { - "description": "TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. To search against the `tagValueIds`: * Use a field query. Example: - `tagValueIds:\"456\"` - `tagValueIds=\"tagValues/456\"` * Use a free text query. Example: - `456`", + "description": "TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. To search against the `tagValueIds`: * Use a field query. Example: - `tagValueIds=\"tagValues/456\"`", "items": { "type": "string" }, diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index e966deb1ea4..6743162149a 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -6157,7 +6157,7 @@ func (s *Resource) MarshalJSON() ([]byte, error) { } // ResourceSearchResult: A result of Resource Search, containing -// information of a cloud resource. Next ID: 32 +// information of a cloud resource. Next ID: 34 type ResourceSearchResult struct { // AdditionalAttributes: The additional searchable attributes of this // resource. The attributes may vary from one resource type to another. @@ -6350,8 +6350,7 @@ type ResourceSearchResult struct { // TagValueIds: TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. // To search against the `tagValueIds`: * Use a field query. Example: - - // `tagValueIds:"456" - `tagValueIds="tagValues/456" * Use a free text - // query. Example: - `456` + // `tagValueIds="tagValues/456" TagValueIds []string `json:"tagValueIds,omitempty"` // TagValues: TagValue namespaced names, in the format of diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index 430f50bbc4b..8f202cdc054 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -1738,6 +1738,12 @@ "description": "Required. ID of the `BuildTrigger` to update.", "location": "query", "type": "string" + }, + "updateMask": { + "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, "path": "v1/{+resourceName}", @@ -2172,6 +2178,12 @@ "location": "path", "required": true, "type": "string" + }, + "updateMask": { + "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, "path": "v1/projects/{projectId}/triggers/{triggerId}", @@ -2295,7 +2307,7 @@ } } }, - "revision": "20230426", + "revision": "20230505", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index 918e14a5659..8c0a69e8e78 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -13055,6 +13055,15 @@ func (c *ProjectsLocationsTriggersPatchCall) TriggerId(triggerId string) *Projec return c } +// UpdateMask sets the optional parameter "updateMask": Update mask for +// the resource. If this is set, the server will only update the fields +// specified in the field mask. Otherwise, a full update of the mutable +// resource fields will be performed. +func (c *ProjectsLocationsTriggersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTriggersPatchCall { + 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. @@ -13170,6 +13179,12 @@ func (c *ProjectsLocationsTriggersPatchCall) Do(opts ...googleapi.CallOption) (* // "description": "Required. ID of the `BuildTrigger` to update.", // "location": "query", // "type": "string" + // }, + // "updateMask": { + // "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+resourceName}", @@ -15078,6 +15093,15 @@ func (r *ProjectsTriggersService) Patch(projectId string, triggerId string, buil return c } +// UpdateMask sets the optional parameter "updateMask": Update mask for +// the resource. If this is set, the server will only update the fields +// specified in the field mask. Otherwise, a full update of the mutable +// resource fields will be performed. +func (c *ProjectsTriggersPatchCall) UpdateMask(updateMask string) *ProjectsTriggersPatchCall { + 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. @@ -15190,6 +15214,12 @@ func (c *ProjectsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*BuildTrig // "location": "path", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/projects/{projectId}/triggers/{triggerId}", diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 79ef2981776..be7ce37f354 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -1110,6 +1110,37 @@ "https://www.googleapis.com/auth/apps.order" ] }, + "queryEligibleBillingAccounts": { + "description": "Lists the billing accounts that are eligible to purchase particular SKUs for a given customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: Based on the provided list of SKUs, returns a list of SKU groups that must be purchased using the same billing account and the billing accounts eligible to purchase each SKU group.", + "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:queryEligibleBillingAccounts", + "httpMethod": "GET", + "id": "cloudchannel.accounts.customers.queryEligibleBillingAccounts", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Required. The resource name of the customer to list eligible billing accounts for. Format: accounts/{account_id}/customers/{customer_id}.", + "location": "path", + "pattern": "^accounts/[^/]+/customers/[^/]+$", + "required": true, + "type": "string" + }, + "skus": { + "description": "Required. List of SKUs to list eligible billing accounts for. At least one SKU is required. Format: products/{product_id}/skus/{sku_id}.", + "location": "query", + "repeated": true, + "type": "string" + } + }, + "path": "v1/{+customer}:queryEligibleBillingAccounts", + "response": { + "$ref": "GoogleCloudChannelV1QueryEligibleBillingAccountsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, "transferEntitlements": { "description": "Transfers customer entitlements to new reseller. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlements", @@ -2055,7 +2086,7 @@ } } }, - "revision": "20230507", + "revision": "20230515", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -2099,6 +2130,49 @@ }, "type": "object" }, + "GoogleCloudChannelV1BillingAccount": { + "description": "Represents a billing account.", + "id": "GoogleCloudChannelV1BillingAccount", + "properties": { + "createTime": { + "description": "Output only. The time when this billing account was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "currencyCode": { + "description": "Output only. The 3-letter currency code defined in ISO 4217.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Display name of the billing account.", + "type": "string" + }, + "name": { + "description": "Output only. Resource name of the billing account. Format: accounts/{account_id}/billingAccounts/{billing_account_id}.", + "readOnly": true, + "type": "string" + }, + "regionCode": { + "description": "Output only. The CLDR region code.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudChannelV1BillingAccountPurchaseInfo": { + "description": "Represents a billing account that can be used to make a purchase.", + "id": "GoogleCloudChannelV1BillingAccountPurchaseInfo", + "properties": { + "billingAccount": { + "$ref": "GoogleCloudChannelV1BillingAccount", + "description": "The billing account resource." + } + }, + "type": "object" + }, "GoogleCloudChannelV1CancelEntitlementRequest": { "description": "Request message for CloudChannelService.CancelEntitlement.", "id": "GoogleCloudChannelV1CancelEntitlementRequest", @@ -3954,6 +4028,20 @@ }, "type": "object" }, + "GoogleCloudChannelV1QueryEligibleBillingAccountsResponse": { + "description": "Response message for QueryEligibleBillingAccounts.", + "id": "GoogleCloudChannelV1QueryEligibleBillingAccountsResponse", + "properties": { + "skuPurchaseGroups": { + "description": "List of SKU purchase groups where each group represents a set of SKUs that must be purchased using the same billing account. Each SKU from [QueryEligibleBillingAccountsRequest.skus] will appear in exactly one SKU group.", + "items": { + "$ref": "GoogleCloudChannelV1SkuPurchaseGroup" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudChannelV1RegisterSubscriberRequest": { "description": "Request Message for RegisterSubscriber.", "id": "GoogleCloudChannelV1RegisterSubscriberRequest", @@ -4312,6 +4400,27 @@ }, "type": "object" }, + "GoogleCloudChannelV1SkuPurchaseGroup": { + "description": "Represents a set of SKUs that must be purchased using the same billing account.", + "id": "GoogleCloudChannelV1SkuPurchaseGroup", + "properties": { + "billingAccountPurchaseInfos": { + "description": "List of billing accounts that are eligible to purhcase these SKUs.", + "items": { + "$ref": "GoogleCloudChannelV1BillingAccountPurchaseInfo" + }, + "type": "array" + }, + "skus": { + "description": "Resource names of the SKUs included in this group. Format: products/{product_id}/skus/{sku_id}.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudChannelV1StartPaidServiceRequest": { "description": "Request message for CloudChannelService.StartPaidService.", "id": "GoogleCloudChannelV1StartPaidServiceRequest", diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 759411d01f9..a935d8e113e 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -401,6 +401,79 @@ func (s *GoogleCloudChannelV1AssociationInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1BillingAccount: Represents a billing account. +type GoogleCloudChannelV1BillingAccount struct { + // CreateTime: Output only. The time when this billing account was + // created. + CreateTime string `json:"createTime,omitempty"` + + // CurrencyCode: Output only. The 3-letter currency code defined in ISO + // 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + + // DisplayName: Display name of the billing account. + DisplayName string `json:"displayName,omitempty"` + + // Name: Output only. Resource name of the billing account. Format: + // accounts/{account_id}/billingAccounts/{billing_account_id}. + Name string `json:"name,omitempty"` + + // RegionCode: Output only. The CLDR region code. + RegionCode string `json:"regionCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1BillingAccount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1BillingAccount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudChannelV1BillingAccountPurchaseInfo: Represents a billing +// account that can be used to make a purchase. +type GoogleCloudChannelV1BillingAccountPurchaseInfo struct { + // BillingAccount: The billing account resource. + BillingAccount *GoogleCloudChannelV1BillingAccount `json:"billingAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BillingAccount") 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. "BillingAccount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1BillingAccountPurchaseInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1BillingAccountPurchaseInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1CancelEntitlementRequest: Request message for // CloudChannelService.CancelEntitlement. type GoogleCloudChannelV1CancelEntitlementRequest struct { @@ -3349,6 +3422,44 @@ func (s *GoogleCloudChannelV1PurchasableSku) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1QueryEligibleBillingAccountsResponse: Response +// message for QueryEligibleBillingAccounts. +type GoogleCloudChannelV1QueryEligibleBillingAccountsResponse struct { + // SkuPurchaseGroups: List of SKU purchase groups where each group + // represents a set of SKUs that must be purchased using the same + // billing account. Each SKU from + // [QueryEligibleBillingAccountsRequest.skus] will appear in exactly one + // SKU group. + SkuPurchaseGroups []*GoogleCloudChannelV1SkuPurchaseGroup `json:"skuPurchaseGroups,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "SkuPurchaseGroups") + // 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. "SkuPurchaseGroups") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1QueryEligibleBillingAccountsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1QueryEligibleBillingAccountsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1RegisterSubscriberRequest: Request Message for // RegisterSubscriber. type GoogleCloudChannelV1RegisterSubscriberRequest struct { @@ -4015,6 +4126,42 @@ func (s *GoogleCloudChannelV1SkuGroupCondition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudChannelV1SkuPurchaseGroup: Represents a set of SKUs that +// must be purchased using the same billing account. +type GoogleCloudChannelV1SkuPurchaseGroup struct { + // BillingAccountPurchaseInfos: List of billing accounts that are + // eligible to purhcase these SKUs. + BillingAccountPurchaseInfos []*GoogleCloudChannelV1BillingAccountPurchaseInfo `json:"billingAccountPurchaseInfos,omitempty"` + + // Skus: Resource names of the SKUs included in this group. Format: + // products/{product_id}/skus/{sku_id}. + Skus []string `json:"skus,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BillingAccountPurchaseInfos") 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. + // "BillingAccountPurchaseInfos") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudChannelV1SkuPurchaseGroup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudChannelV1SkuPurchaseGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudChannelV1StartPaidServiceRequest: Request message for // CloudChannelService.StartPaidService. type GoogleCloudChannelV1StartPaidServiceRequest struct { @@ -11412,6 +11559,177 @@ func (c *AccountsCustomersProvisionCloudIdentityCall) Do(opts ...googleapi.CallO } +// method id "cloudchannel.accounts.customers.queryEligibleBillingAccounts": + +type AccountsCustomersQueryEligibleBillingAccountsCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// QueryEligibleBillingAccounts: Lists the billing accounts that are +// eligible to purchase particular SKUs for a given customer. Possible +// error codes: * PERMISSION_DENIED: The customer doesn't belong to the +// reseller. * INVALID_ARGUMENT: Required request parameters are missing +// or invalid. Return value: Based on the provided list of SKUs, returns +// a list of SKU groups that must be purchased using the same billing +// account and the billing accounts eligible to purchase each SKU group. +// +// - customer: The resource name of the customer to list eligible +// billing accounts for. Format: +// accounts/{account_id}/customers/{customer_id}. +func (r *AccountsCustomersService) QueryEligibleBillingAccounts(customer string) *AccountsCustomersQueryEligibleBillingAccountsCall { + c := &AccountsCustomersQueryEligibleBillingAccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// Skus sets the optional parameter "skus": Required. List of SKUs to +// list eligible billing accounts for. At least one SKU is required. +// Format: products/{product_id}/skus/{sku_id}. +func (c *AccountsCustomersQueryEligibleBillingAccountsCall) Skus(skus ...string) *AccountsCustomersQueryEligibleBillingAccountsCall { + c.urlParams_.SetMulti("skus", append([]string{}, skus...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCustomersQueryEligibleBillingAccountsCall) Fields(s ...googleapi.Field) *AccountsCustomersQueryEligibleBillingAccountsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsCustomersQueryEligibleBillingAccountsCall) IfNoneMatch(entityTag string) *AccountsCustomersQueryEligibleBillingAccountsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCustomersQueryEligibleBillingAccountsCall) Context(ctx context.Context) *AccountsCustomersQueryEligibleBillingAccountsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCustomersQueryEligibleBillingAccountsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCustomersQueryEligibleBillingAccountsCall) doRequest(alt string) (*http.Response, 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/{+customer}:queryEligibleBillingAccounts") + 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{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudchannel.accounts.customers.queryEligibleBillingAccounts" call. +// Exactly one of +// *GoogleCloudChannelV1QueryEligibleBillingAccountsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudChannelV1QueryEligibleBillingAccountsResponse.ServerRespon +// se.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsCustomersQueryEligibleBillingAccountsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1QueryEligibleBillingAccountsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudChannelV1QueryEligibleBillingAccountsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the billing accounts that are eligible to purchase particular SKUs for a given customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: Based on the provided list of SKUs, returns a list of SKU groups that must be purchased using the same billing account and the billing accounts eligible to purchase each SKU group.", + // "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:queryEligibleBillingAccounts", + // "httpMethod": "GET", + // "id": "cloudchannel.accounts.customers.queryEligibleBillingAccounts", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Required. The resource name of the customer to list eligible billing accounts for. Format: accounts/{account_id}/customers/{customer_id}.", + // "location": "path", + // "pattern": "^accounts/[^/]+/customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "skus": { + // "description": "Required. List of SKUs to list eligible billing accounts for. At least one SKU is required. Format: products/{product_id}/skus/{sku_id}.", + // "location": "query", + // "repeated": true, + // "type": "string" + // } + // }, + // "path": "v1/{+customer}:queryEligibleBillingAccounts", + // "response": { + // "$ref": "GoogleCloudChannelV1QueryEligibleBillingAccountsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/apps.order" + // ] + // } + +} + // method id "cloudchannel.accounts.customers.transferEntitlements": type AccountsCustomersTransferEntitlementsCall struct { diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index 1bb1951168f..2211495adff 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -546,7 +546,7 @@ } } }, - "revision": "20230420", + "revision": "20230504", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -1687,7 +1687,7 @@ "type": "string" }, "version": { - "description": "Version of the secret (version number or the string 'latest'). It is preferrable to use `latest` version with secret volumes as secret value changes are reflected immediately.", + "description": "Version of the secret (version number or the string 'latest'). It is preferable to use `latest` version with secret volumes as secret value changes are reflected immediately.", "type": "string" } }, diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index 10f475c1188..4a3b68df0d1 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -1960,7 +1960,7 @@ type SecretVersion struct { Path string `json:"path,omitempty"` // Version: Version of the secret (version number or the string - // 'latest'). It is preferrable to use `latest` version with secret + // 'latest'). It is preferable to use `latest` version with secret // volumes as secret value changes are reflected immediately. Version string `json:"version,omitempty"` diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index d1193cf3a30..5ca88de4195 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -127,6 +127,7 @@ "type": "string" }, "organizationId": { + "deprecated": true, "description": "The id of the Organization resource to fetch. This field is deprecated and will be removed in v1. Use name instead.", "location": "query", "type": "string" @@ -567,7 +568,7 @@ } } }, - "revision": "20230409", + "revision": "20230514", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go index 141067bbb0e..84a756df966 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go @@ -1645,6 +1645,7 @@ func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*Organization, // "type": "string" // }, // "organizationId": { + // "deprecated": true, // "description": "The id of the Organization resource to fetch. This field is deprecated and will be removed in v1. Use name instead.", // "location": "query", // "type": "string" diff --git a/cloudresourcemanager/v3/cloudresourcemanager-api.json b/cloudresourcemanager/v3/cloudresourcemanager-api.json index 24f9929ac6b..014114cce86 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v3/cloudresourcemanager-api.json @@ -1805,7 +1805,7 @@ } } }, - "revision": "20230430", + "revision": "20230514", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -2054,7 +2054,7 @@ "type": "string" }, "tagKeyParentName": { - "description": "The parent name of the tag key. Must be in the format `organizations/{organization_id}`.", + "description": "The parent name of the tag key. Must be in the format `organizations/{organization_id}` or `projects/{project_number}`", "type": "string" }, "tagValue": { diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index 786ff6b8401..22924f583cd 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -680,7 +680,8 @@ type EffectiveTag struct { TagKey string `json:"tagKey,omitempty"` // TagKeyParentName: The parent name of the tag key. Must be in the - // format `organizations/{organization_id}`. + // format `organizations/{organization_id}` or + // `projects/{project_number}` TagKeyParentName string `json:"tagKeyParentName,omitempty"` // TagValue: Resource name for TagValue in the format `tagValues/456`. diff --git a/cloudtasks/v2/cloudtasks-api.json b/cloudtasks/v2/cloudtasks-api.json index 83331efe030..42be6f58dff 100644 --- a/cloudtasks/v2/cloudtasks-api.json +++ b/cloudtasks/v2/cloudtasks-api.json @@ -685,7 +685,7 @@ } } }, - "revision": "20230201", + "revision": "20230505", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpRequest": { @@ -997,7 +997,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index a0a1ba40e6d..fa8efcd13df 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -948,7 +948,7 @@ func (s *ListTasksResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 5fcc92094c4..5773f49a453 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -876,7 +876,7 @@ } } }, - "revision": "20230224", + "revision": "20230505", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -1411,7 +1411,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index e600fa5bc93..87dfa40e5d3 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -1473,7 +1473,7 @@ func (s *ListTasksResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index 561f16ea241..65af3b4ba4a 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -732,7 +732,7 @@ } } }, - "revision": "20230417", + "revision": "20230505", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -1180,7 +1180,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index c6d02b34f33..837dd914a69 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -1242,7 +1242,7 @@ func (s *ListTasksResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index 3ebec824558..1ad78657ab7 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -518,7 +518,7 @@ } } }, - "revision": "20230323", + "revision": "20230510", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { @@ -817,45 +817,6 @@ }, "type": "object" }, - "ExecuteAirflowCommandResponse": { - "description": "Response to ExecuteAirflowCommandRequest.", - "id": "ExecuteAirflowCommandResponse", - "properties": { - "error": { - "description": "Error message. Empty if there was no error.", - "type": "string" - }, - "executionId": { - "description": "The unique ID of the command execution for polling.", - "type": "string" - }, - "pod": { - "description": "The name of the pod where the command is executed.", - "type": "string" - }, - "podNamespace": { - "description": "The namespace of the pod where the command is executed.", - "type": "string" - } - }, - "type": "object" - }, - "ExitInfo": { - "description": "Information about how a command ended.", - "id": "ExitInfo", - "properties": { - "error": { - "description": "Error message. Empty if there was no error.", - "type": "string" - }, - "exitCode": { - "description": "The exit code from the command execution.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "IPAllocationPolicy": { "description": "Configuration for controlling how IPs are allocated in the GKE cluster.", "id": "IPAllocationPolicy", @@ -917,22 +878,6 @@ }, "type": "object" }, - "Line": { - "description": "Contains information about a single line from logs.", - "id": "Line", - "properties": { - "content": { - "description": "Text content of the log line.", - "type": "string" - }, - "lineNumber": { - "description": "Number of the line.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "ListEnvironmentsResponse": { "description": "The environments in a project and location.", "id": "ListEnvironmentsResponse", @@ -1239,28 +1184,6 @@ }, "type": "object" }, - "PollAirflowCommandResponse": { - "description": "Response to PollAirflowCommandRequest.", - "id": "PollAirflowCommandResponse", - "properties": { - "exitInfo": { - "$ref": "ExitInfo", - "description": "The result exit status of the command." - }, - "output": { - "description": "Output from the command execution. It may not contain the full output and the caller may need to poll for more lines.", - "items": { - "$ref": "Line" - }, - "type": "array" - }, - "outputEnd": { - "description": "Whether the command execution has finished and there is no more output.", - "type": "boolean" - } - }, - "type": "object" - }, "PrivateClusterConfig": { "description": "Configuration options for the private GKE cluster in a Cloud Composer environment.", "id": "PrivateClusterConfig", diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index b82bfe94335..ae6cc1f177b 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -722,75 +722,6 @@ func (s *EnvironmentConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ExecuteAirflowCommandResponse: Response to -// ExecuteAirflowCommandRequest. -type ExecuteAirflowCommandResponse struct { - // Error: Error message. Empty if there was no error. - Error string `json:"error,omitempty"` - - // ExecutionId: The unique ID of the command execution for polling. - ExecutionId string `json:"executionId,omitempty"` - - // Pod: The name of the pod where the command is executed. - Pod string `json:"pod,omitempty"` - - // PodNamespace: The namespace of the pod where the command is executed. - PodNamespace string `json:"podNamespace,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ExecuteAirflowCommandResponse) MarshalJSON() ([]byte, error) { - type NoMethod ExecuteAirflowCommandResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ExitInfo: Information about how a command ended. -type ExitInfo struct { - // Error: Error message. Empty if there was no error. - Error string `json:"error,omitempty"` - - // ExitCode: The exit code from the command execution. - ExitCode int64 `json:"exitCode,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Error") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ExitInfo) MarshalJSON() ([]byte, error) { - type NoMethod ExitInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // IPAllocationPolicy: Configuration for controlling how IPs are // allocated in the GKE cluster. type IPAllocationPolicy struct { @@ -916,37 +847,6 @@ func (s *ImageVersion) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Line: Contains information about a single line from logs. -type Line struct { - // Content: Text content of the log line. - Content string `json:"content,omitempty"` - - // LineNumber: Number of the line. - LineNumber int64 `json:"lineNumber,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Line) MarshalJSON() ([]byte, error) { - type NoMethod Line - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ListEnvironmentsResponse: The environments in a project and location. type ListEnvironmentsResponse struct { // Environments: The list of environments returned by a @@ -1492,42 +1392,6 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PollAirflowCommandResponse: Response to PollAirflowCommandRequest. -type PollAirflowCommandResponse struct { - // ExitInfo: The result exit status of the command. - ExitInfo *ExitInfo `json:"exitInfo,omitempty"` - - // Output: Output from the command execution. It may not contain the - // full output and the caller may need to poll for more lines. - Output []*Line `json:"output,omitempty"` - - // OutputEnd: Whether the command execution has finished and there is no - // more output. - OutputEnd bool `json:"outputEnd,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExitInfo") 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. "ExitInfo") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PollAirflowCommandResponse) MarshalJSON() ([]byte, error) { - type NoMethod PollAirflowCommandResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // PrivateClusterConfig: Configuration options for the private GKE // cluster in a Cloud Composer environment. type PrivateClusterConfig struct { diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index f4fa362c41d..88aab80e5ba 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -32646,6 +32646,53 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getNatIpInfo": { + "description": "Retrieves runtime NAT IP information.", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + "httpMethod": "GET", + "id": "compute.routers.getNatIpInfo", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "natName": { + "description": "Name of the nat service to filter the NAT IP information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "router": { + "description": "Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + "response": { + "$ref": "NatIpInfoResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "getNatMappingInfo": { "description": "Retrieves runtime Nat mapping information of VM endpoints.", "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo", @@ -41380,7 +41427,7 @@ } } }, - "revision": "20230425", + "revision": "20230502", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -42861,6 +42908,10 @@ "description": "Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: https://www.googleapis.com/compute/v1/projects/project/zones/zone /diskTypes/pd-standard For a full list of acceptable values, see Persistent disk types. If you specify this field when creating a VM, you can provide either the full or partial URL. For example, the following values are valid: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /diskTypes/diskType - projects/project/zones/zone/diskTypes/diskType - zones/zone/diskTypes/diskType If you specify this field when creating or updating an instance template or all-instances configuration, specify the type of the disk, not the URL. For example: pd-standard.", "type": "string" }, + "enableConfidentialCompute": { + "description": "Whether this disk is using confidential compute mode. see go/confidential-mode-in-arcus for details.", + "type": "boolean" + }, "guestOsFeatures": { "description": "A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures", "items": { @@ -50016,6 +50067,22 @@ "description": "[Output only] Represents status related to the future reservation.", "id": "FutureReservationStatus", "properties": { + "amendmentStatus": { + "description": "The current status of the requested amendment.", + "enum": [ + "AMENDMENT_APPROVED", + "AMENDMENT_DECLINED", + "AMENDMENT_IN_REVIEW", + "AMENDMENT_STATUS_UNSPECIFIED" + ], + "enumDescriptions": [ + "The requested amendment to the Future Resevation has been approved and applied by GCP.", + "The requested amendment to the Future Reservation has been declined by GCP and the original state was restored.", + "The requested amendment to the Future Reservation is currently being reviewd by GCP.", + "" + ], + "type": "string" + }, "autoCreatedReservations": { "description": "Fully qualified urls of the automatically created reservations at start_time.", "items": { @@ -50028,6 +50095,10 @@ "format": "int64", "type": "string" }, + "lastKnownGoodState": { + "$ref": "FutureReservationStatusLastKnownGoodState", + "description": "This field represents the future reservation before an amendment was requested. If the amendment is declined, the Future Reservation will be reverted to the last known good state. The last known good state is not set when updating a future reservation whose Procurement Status is DRAFTING." + }, "lockTime": { "description": "Time when Future Reservation would become LOCKED, after which no modifications to Future Reservation will be allowed. Applicable only after the Future Reservation is in the APPROVED state. The lock_time is an RFC3339 string. The procurement_status will transition to PROCURING state at this time.", "type": "string" @@ -50043,6 +50114,7 @@ "FAILED", "FAILED_PARTIALLY_FULFILLED", "FULFILLED", + "PENDING_AMENDMENT_APPROVAL", "PENDING_APPROVAL", "PROCUREMENT_STATUS_UNSPECIFIED", "PROCURING", @@ -50057,6 +50129,7 @@ "Future reservation failed. No additional reservations were provided.", "Future reservation is partially fulfilled. Additional reservations were provided but did not reach total_count reserved instance slots.", "Future reservation is fulfilled completely.", + "An Amendment to the Future Reservation has been requested. If the Amendment is declined, the Future Reservation will be restored to the last known good state.", "Future reservation is pending approval by GCP.", "", "Future reservation is being procured by GCP. Beyond this point, Future reservation is locked and no further modifications are allowed.", @@ -50070,6 +50143,77 @@ }, "type": "object" }, + "FutureReservationStatusLastKnownGoodState": { + "description": "The state that the future reservation will be reverted to should the amendment be declined.", + "id": "FutureReservationStatusLastKnownGoodState", + "properties": { + "description": { + "description": "The description of the FutureReservation before an amendment was requested.", + "type": "string" + }, + "futureReservationSpecs": { + "$ref": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs" + }, + "namePrefix": { + "description": "The name prefix of the Future Reservation before an amendment was requested.", + "type": "string" + }, + "procurementStatus": { + "description": "The status of the last known good state for the Future Reservation.", + "enum": [ + "APPROVED", + "CANCELLED", + "COMMITTED", + "DECLINED", + "DRAFTING", + "FAILED", + "FAILED_PARTIALLY_FULFILLED", + "FULFILLED", + "PENDING_AMENDMENT_APPROVAL", + "PENDING_APPROVAL", + "PROCUREMENT_STATUS_UNSPECIFIED", + "PROCURING", + "PROVISIONING" + ], + "enumDescriptions": [ + "Future reservation is approved by GCP.", + "Future reservation is cancelled by the customer.", + "Future reservation is committed by the customer.", + "Future reservation is rejected by GCP.", + "Related status for PlanningStatus.Draft. Transitions to PENDING_APPROVAL upon user submitting FR.", + "Future reservation failed. No additional reservations were provided.", + "Future reservation is partially fulfilled. Additional reservations were provided but did not reach total_count reserved instance slots.", + "Future reservation is fulfilled completely.", + "An Amendment to the Future Reservation has been requested. If the Amendment is declined, the Future Reservation will be restored to the last known good state.", + "Future reservation is pending approval by GCP.", + "", + "Future reservation is being procured by GCP. Beyond this point, Future reservation is locked and no further modifications are allowed.", + "Future reservation capacity is being provisioned. This state will be entered after start_time, while reservations are being created to provide total_count reserved instance slots. This state will not persist past start_time + 24h." + ], + "type": "string" + } + }, + "type": "object" + }, + "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs": { + "description": "The properties of the last known good state for the Future Reservation.", + "id": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs", + "properties": { + "shareSettings": { + "$ref": "ShareSettings", + "description": "The previous share settings of the Future Reservation." + }, + "specificSkuProperties": { + "$ref": "FutureReservationSpecificSKUProperties", + "description": "The previous instance related properties of the Future Reservation." + }, + "timeWindow": { + "$ref": "FutureReservationTimeWindow", + "description": "The previous time window of the Future Reservation." + } + }, + "type": "object" + }, "FutureReservationStatusSpecificSKUProperties": { "description": "Properties to be set for the Future Reservation.", "id": "FutureReservationStatusSpecificSKUProperties", @@ -59515,7 +59659,7 @@ "type": "object" }, "InterconnectRemoteLocation": { - "description": "Represents an Cross-Cloud Interconnect Remote Location resource. You can use this resource to find remote location details about an Interconnect attachment (VLAN).", + "description": "Represents a Cross-Cloud Interconnect Remote Location resource. You can use this resource to find remote location details about an Interconnect attachment (VLAN).", "id": "InterconnectRemoteLocation", "properties": { "address": { @@ -59586,7 +59730,7 @@ ], "enumDescriptions": [ "LACP_SUPPORTED: LACP is supported, and enabled by default on the Cross-Cloud Interconnect.", - "LACP_UNSUPPORTED: LACP is not supported and will not be enabled on this port. GetDiagnostics will show bundleAggregationType as \"static\". GCP does not support LAGs without LACP, so requestedLinkCount must be 1." + "LACP_UNSUPPORTED: LACP is not supported and is not be enabled on this port. GetDiagnostics shows bundleAggregationType as \"static\". GCP does not support LAGs without LACP, so requestedLinkCount must be 1." ], "type": "string" }, @@ -59646,7 +59790,7 @@ "id": "InterconnectRemoteLocationConstraints", "properties": { "portPairRemoteLocation": { - "description": "[Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI will require that both ports use the same remote location.", + "description": "[Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location.", "enum": [ "PORT_PAIR_MATCHING_REMOTE_LOCATION", "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" @@ -59711,7 +59855,7 @@ "type": "string" }, "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "description": "[Output Only] This token lets you get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", "type": "string" }, "selfLink": { @@ -60941,7 +61085,7 @@ "type": "integer" }, "guestAcceleratorType": { - "description": "The accelerator type resource name, not a full URL, e.g. 'nvidia-tesla-k80'.", + "description": "The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.", "type": "string" } }, @@ -61782,6 +61926,72 @@ }, "type": "object" }, + "NatIpInfo": { + "description": "Contains NAT IP information of a NAT config (i.e. usage status, mode).", + "id": "NatIpInfo", + "properties": { + "natIpInfoMappings": { + "description": "A list of all NAT IPs assigned to this NAT config.", + "items": { + "$ref": "NatIpInfoNatIpInfoMapping" + }, + "type": "array" + }, + "natName": { + "description": "Name of the NAT config which the NAT IP belongs to.", + "type": "string" + } + }, + "type": "object" + }, + "NatIpInfoNatIpInfoMapping": { + "description": "Contains information of a NAT IP.", + "id": "NatIpInfoNatIpInfoMapping", + "properties": { + "mode": { + "description": "Specifies whether NAT IP is auto or manual.", + "enum": [ + "AUTO", + "MANUAL" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "natIp": { + "description": "NAT IP address. For example: 203.0.113.11.", + "type": "string" + }, + "usage": { + "description": "Specifies whether NAT IP is currently serving at least one endpoint or not.", + "enum": [ + "IN_USE", + "UNUSED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "NatIpInfoResponse": { + "id": "NatIpInfoResponse", + "properties": { + "result": { + "description": "[Output Only] A list of NAT IP information.", + "items": { + "$ref": "NatIpInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "Network": { "description": "Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network.", "id": "Network", @@ -61923,7 +62133,7 @@ "type": "string" }, "fingerprint": { - "description": "[Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch.", + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch.", "format": "byte", "type": "string" }, @@ -73942,7 +74152,7 @@ "type": "array" }, "sourceSubnetworkIpRangesToNat": { - "description": "Specify the Nat option, which can take one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat. - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.", + "description": "Specify the Nat option, which can take one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat. - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not be any other Router.Nat section in any Router for this network in this region.", "enum": [ "ALL_SUBNETWORKS_ALL_IP_RANGES", "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", @@ -77239,6 +77449,10 @@ "format": "int64", "type": "string" }, + "enableConfidentialCompute": { + "description": "Whether this snapshot is created from a confidential compute mode disk. see go/confidential-mode-in-arcus for details. [Output Only]: This field is not set by user, but from source disk.", + "type": "boolean" + }, "guestFlush": { "description": "[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.", "type": "boolean" @@ -77299,6 +77513,7 @@ "name": { "annotations": { "required": [ + "compute.disks.createSnapshot", "compute.snapshots.insert" ] }, @@ -79375,7 +79590,7 @@ "type": "string" }, "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "type": "boolean" }, "enableL2": { @@ -79482,7 +79697,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ "AGGREGATE", "CLOUD_EXTENSION", @@ -79516,7 +79731,7 @@ "type": "string" }, "role": { - "description": "The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", + "description": "The role of subnetwork. Currently, this field is only used when purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ "ACTIVE", "BACKUP" @@ -79849,7 +80064,7 @@ "type": "string" }, "enable": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled.", + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. Flow logging isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "type": "boolean" }, "filterExpr": { @@ -84152,7 +84367,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ "AGGREGATE", "CLOUD_EXTENSION", @@ -84178,7 +84393,7 @@ "type": "string" }, "role": { - "description": "The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", + "description": "The role of subnetwork. Currently, this field is only used when purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ "ACTIVE", "BACKUP" diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 9839aadcdcf..f617145c531 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -3611,6 +3611,10 @@ type AttachedDiskInitializeParams struct { // example: pd-standard. DiskType string `json:"diskType,omitempty"` + // EnableConfidentialCompute: Whether this disk is using confidential + // compute mode. see go/confidential-mode-in-arcus for details. + EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` + // GuestOsFeatures: A list of features to enable on the guest operating // system. Applicable only for bootable images. Read Enabling guest // operating system features to see a list of available options. Guest @@ -15169,6 +15173,19 @@ func (s *FutureReservationSpecificSKUProperties) MarshalJSON() ([]byte, error) { // FutureReservationStatus: [Output only] Represents status related to // the future reservation. type FutureReservationStatus struct { + // AmendmentStatus: The current status of the requested amendment. + // + // Possible values: + // "AMENDMENT_APPROVED" - The requested amendment to the Future + // Resevation has been approved and applied by GCP. + // "AMENDMENT_DECLINED" - The requested amendment to the Future + // Reservation has been declined by GCP and the original state was + // restored. + // "AMENDMENT_IN_REVIEW" - The requested amendment to the Future + // Reservation is currently being reviewd by GCP. + // "AMENDMENT_STATUS_UNSPECIFIED" + AmendmentStatus string `json:"amendmentStatus,omitempty"` + // AutoCreatedReservations: Fully qualified urls of the automatically // created reservations at start_time. AutoCreatedReservations []string `json:"autoCreatedReservations,omitempty"` @@ -15178,6 +15195,13 @@ type FutureReservationStatus struct { // capacity delivered as part of existing matching reservations. FulfilledCount int64 `json:"fulfilledCount,omitempty,string"` + // LastKnownGoodState: This field represents the future reservation + // before an amendment was requested. If the amendment is declined, the + // Future Reservation will be reverted to the last known good state. The + // last known good state is not set when updating a future reservation + // whose Procurement Status is DRAFTING. + LastKnownGoodState *FutureReservationStatusLastKnownGoodState `json:"lastKnownGoodState,omitempty"` + // LockTime: Time when Future Reservation would become LOCKED, after // which no modifications to Future Reservation will be allowed. // Applicable only after the Future Reservation is in the APPROVED @@ -15200,6 +15224,9 @@ type FutureReservationStatus struct { // fulfilled. Additional reservations were provided but did not reach // total_count reserved instance slots. // "FULFILLED" - Future reservation is fulfilled completely. + // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future + // Reservation has been requested. If the Amendment is declined, the + // Future Reservation will be restored to the last known good state. // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. // "PROCUREMENT_STATUS_UNSPECIFIED" // "PROCURING" - Future reservation is being procured by GCP. Beyond @@ -15213,19 +15240,18 @@ type FutureReservationStatus struct { SpecificSkuProperties *FutureReservationStatusSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AutoCreatedReservations") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "AmendmentStatus") 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. "AutoCreatedReservations") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "AmendmentStatus") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. @@ -15238,6 +15264,108 @@ func (s *FutureReservationStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FutureReservationStatusLastKnownGoodState: The state that the future +// reservation will be reverted to should the amendment be declined. +type FutureReservationStatusLastKnownGoodState struct { + // Description: The description of the FutureReservation before an + // amendment was requested. + Description string `json:"description,omitempty"` + + FutureReservationSpecs *FutureReservationStatusLastKnownGoodStateFutureReservationSpecs `json:"futureReservationSpecs,omitempty"` + + // NamePrefix: The name prefix of the Future Reservation before an + // amendment was requested. + NamePrefix string `json:"namePrefix,omitempty"` + + // ProcurementStatus: The status of the last known good state for the + // Future Reservation. + // + // Possible values: + // "APPROVED" - Future reservation is approved by GCP. + // "CANCELLED" - Future reservation is cancelled by the customer. + // "COMMITTED" - Future reservation is committed by the customer. + // "DECLINED" - Future reservation is rejected by GCP. + // "DRAFTING" - Related status for PlanningStatus.Draft. Transitions + // to PENDING_APPROVAL upon user submitting FR. + // "FAILED" - Future reservation failed. No additional reservations + // were provided. + // "FAILED_PARTIALLY_FULFILLED" - Future reservation is partially + // fulfilled. Additional reservations were provided but did not reach + // total_count reserved instance slots. + // "FULFILLED" - Future reservation is fulfilled completely. + // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future + // Reservation has been requested. If the Amendment is declined, the + // Future Reservation will be restored to the last known good state. + // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. + // "PROCUREMENT_STATUS_UNSPECIFIED" + // "PROCURING" - Future reservation is being procured by GCP. Beyond + // this point, Future reservation is locked and no further modifications + // are allowed. + // "PROVISIONING" - Future reservation capacity is being provisioned. + // This state will be entered after start_time, while reservations are + // being created to provide total_count reserved instance slots. This + // state will not persist past start_time + 24h. + ProcurementStatus string `json:"procurementStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FutureReservationStatusLastKnownGoodState) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationStatusLastKnownGoodState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FutureReservationStatusLastKnownGoodStateFutureReservationSpecs: The +// properties of the last known good state for the Future Reservation. +type FutureReservationStatusLastKnownGoodStateFutureReservationSpecs struct { + // ShareSettings: The previous share settings of the Future Reservation. + ShareSettings *ShareSettings `json:"shareSettings,omitempty"` + + // SpecificSkuProperties: The previous instance related properties of + // the Future Reservation. + SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` + + // TimeWindow: The previous time window of the Future Reservation. + TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ShareSettings") 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. "ShareSettings") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FutureReservationStatusLastKnownGoodStateFutureReservationSpecs) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationStatusLastKnownGoodStateFutureReservationSpecs + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FutureReservationStatusSpecificSKUProperties: Properties to be set // for the Future Reservation. type FutureReservationStatusSpecificSKUProperties struct { @@ -30399,7 +30527,7 @@ func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectRemoteLocation: Represents an Cross-Cloud Interconnect +// InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect // Remote Location resource. You can use this resource to find remote // location details about an Interconnect attachment (VLAN). type InterconnectRemoteLocation struct { @@ -30463,8 +30591,8 @@ type InterconnectRemoteLocation struct { // Possible values: // "LACP_SUPPORTED" - LACP_SUPPORTED: LACP is supported, and enabled // by default on the Cross-Cloud Interconnect. - // "LACP_UNSUPPORTED" - LACP_UNSUPPORTED: LACP is not supported and - // will not be enabled on this port. GetDiagnostics will show + // "LACP_UNSUPPORTED" - LACP_UNSUPPORTED: LACP is not supported and is + // not be enabled on this port. GetDiagnostics shows // bundleAggregationType as "static". GCP does not support LAGs without // LACP, so requestedLinkCount must be 1. Lacp string `json:"lacp,omitempty"` @@ -30552,7 +30680,7 @@ type InterconnectRemoteLocationConstraints struct { // incompatible with their cloud provider. Specifically, when ordering a // redundant pair of Cross-Cloud Interconnect ports, and one of them // uses a remote location with portPairMatchingRemoteLocation set to - // matching, the UI will require that both ports use the same remote + // matching, the UI requires that both ports use the same remote // location. // // Possible values: @@ -30659,12 +30787,11 @@ type InterconnectRemoteLocationList struct { // remote locations. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. + // NextPageToken: [Output Only] This token lets you get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will + // have their own nextPageToken to continue paging through the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. @@ -32724,7 +32851,7 @@ type MachineTypeAccelerators struct { GuestAcceleratorCount int64 `json:"guestAcceleratorCount,omitempty"` // GuestAcceleratorType: The accelerator type resource name, not a full - // URL, e.g. 'nvidia-tesla-k80'. + // URL, e.g. nvidia-tesla-t4. GuestAcceleratorType string `json:"guestAcceleratorType,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -34005,6 +34132,113 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NatIpInfo: Contains NAT IP information of a NAT config (i.e. usage +// status, mode). +type NatIpInfo struct { + // NatIpInfoMappings: A list of all NAT IPs assigned to this NAT config. + NatIpInfoMappings []*NatIpInfoNatIpInfoMapping `json:"natIpInfoMappings,omitempty"` + + // NatName: Name of the NAT config which the NAT IP belongs to. + NatName string `json:"natName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NatIpInfoMappings") + // 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. "NatIpInfoMappings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NatIpInfo) MarshalJSON() ([]byte, error) { + type NoMethod NatIpInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NatIpInfoNatIpInfoMapping: Contains information of a NAT IP. +type NatIpInfoNatIpInfoMapping struct { + // Mode: Specifies whether NAT IP is auto or manual. + // + // Possible values: + // "AUTO" + // "MANUAL" + Mode string `json:"mode,omitempty"` + + // NatIp: NAT IP address. For example: 203.0.113.11. + NatIp string `json:"natIp,omitempty"` + + // Usage: Specifies whether NAT IP is currently serving at least one + // endpoint or not. + // + // Possible values: + // "IN_USE" + // "UNUSED" + Usage string `json:"usage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") 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. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NatIpInfoNatIpInfoMapping) MarshalJSON() ([]byte, error) { + type NoMethod NatIpInfoNatIpInfoMapping + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NatIpInfoResponse struct { + // Result: [Output Only] A list of NAT IP information. + Result []*NatIpInfo `json:"result,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NatIpInfoResponse) MarshalJSON() ([]byte, error) { + type NoMethod NatIpInfoResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Network: Represents a VPC Network resource. Networks connect // resources to each other and to the internet. For more information, // read Virtual Private Cloud (VPC) Network. @@ -34160,10 +34394,9 @@ type NetworkAttachment struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Fingerprint: [Output Only] Fingerprint of this resource. A hash of - // the contents stored in this object. This field is used in optimistic - // locking. An up-to-date fingerprint must be provided in order to - // patch. + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. An + // up-to-date fingerprint must be provided in order to patch. Fingerprint string `json:"fingerprint,omitempty"` // Id: [Output Only] The unique identifier for the resource type. The @@ -52724,10 +52957,9 @@ type RouterNat struct { // in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list // of Subnetworks are allowed to Nat (specified in the field subnetwork // below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. - // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or - // ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any - // other Router.Nat section in any Router for this network in this - // region. + // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then + // there should not be any other Router.Nat section in any Router for + // this network in this region. // // Possible values: // "ALL_SUBNETWORKS_ALL_IP_RANGES" - All the IP ranges in every @@ -57796,6 +58028,12 @@ type Snapshot struct { // snapshot to a disk. DownloadBytes int64 `json:"downloadBytes,omitempty,string"` + // EnableConfidentialCompute: Whether this snapshot is created from a + // confidential compute mode disk. see go/confidential-mode-in-arcus for + // details. [Output Only]: This field is not set by user, but from + // source disk. + EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` + // GuestFlush: [Input Only] Whether to attempt an application consistent // snapshot by informing the OS to prepare for the snapshot process. GuestFlush bool `json:"guestFlush,omitempty"` @@ -60951,8 +61189,8 @@ type Subnetwork struct { // If this field is not explicitly set, it will not appear in get // listings. If not set the default behavior is determined by the org // policy, if there is no org policy specified, then it will default to - // disabled. This field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. + // disabled. This field isn't supported if the subnet purpose field is + // set to REGIONAL_MANAGED_PROXY. EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` // EnableL2: Enables Layer2 communication on the subnetwork. @@ -61073,12 +61311,20 @@ type Subnetwork struct { PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` // Purpose: The purpose of the resource. This field can be either - // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created - // subnetwork that is reserved for Internal HTTP(S) Load Balancing. If - // unspecified, the purpose defaults to PRIVATE_RFC_1918. The - // enableFlowLogs field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. + // PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or + // INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in + // auto mode networks. A subnet with purpose set to + // REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved + // for regional Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private + // Service Connect. A subnet with purpose set to + // INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used + // only by regional internal HTTP(S) load balancers. Note that + // REGIONAL_MANAGED_PROXY is the preferred setting for all regional + // Envoy load balancers. If unspecified, the subnet purpose defaults to + // PRIVATE. The enableFlowLogs field isn't supported if the subnet + // purpose field is set to REGIONAL_MANAGED_PROXY. // // Possible values: // "AGGREGATE" - Subnetwork used to aggregate multiple private @@ -61108,9 +61354,9 @@ type Subnetwork struct { ReservedInternalRange string `json:"reservedInternalRange,omitempty"` // Role: The role of subnetwork. Currently, this field is only used when - // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to - // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being - // used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one + // purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + // BACKUP. An ACTIVE subnetwork is one that is currently being used for + // Envoy-based load balancers in a region. A BACKUP subnetwork is one // that is ready to be promoted to ACTIVE or is currently draining. This // field can be updated with a patch request. // @@ -61609,6 +61855,8 @@ type SubnetworkLogConfig struct { // field is not explicitly set, it will not appear in get listings. If // not set the default behavior is determined by the org policy, if // there is no org policy specified, then it will default to disabled. + // Flow logging isn't supported if the subnet purpose field is set to + // REGIONAL_MANAGED_PROXY. Enable bool `json:"enable,omitempty"` // FilterExpr: Can only be specified if VPC flow logs for this @@ -68736,12 +68984,20 @@ type UsableSubnetwork struct { Network string `json:"network,omitempty"` // Purpose: The purpose of the resource. This field can be either - // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created - // subnetwork that is reserved for Internal HTTP(S) Load Balancing. If - // unspecified, the purpose defaults to PRIVATE_RFC_1918. The - // enableFlowLogs field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. + // PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or + // INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in + // auto mode networks. A subnet with purpose set to + // REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved + // for regional Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private + // Service Connect. A subnet with purpose set to + // INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used + // only by regional internal HTTP(S) load balancers. Note that + // REGIONAL_MANAGED_PROXY is the preferred setting for all regional + // Envoy load balancers. If unspecified, the subnet purpose defaults to + // PRIVATE. The enableFlowLogs field isn't supported if the subnet + // purpose field is set to REGIONAL_MANAGED_PROXY. // // Possible values: // "AGGREGATE" - Subnetwork used to aggregate multiple private @@ -68764,9 +69020,9 @@ type UsableSubnetwork struct { Purpose string `json:"purpose,omitempty"` // Role: The role of subnetwork. Currently, this field is only used when - // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to - // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being - // used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one + // purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + // BACKUP. An ACTIVE subnetwork is one that is currently being used for + // Envoy-based load balancers in a region. A BACKUP subnetwork is one // that is ready to be promoted to ACTIVE or is currently draining. This // field can be updated with a patch request. // @@ -207346,6 +207602,191 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { } +// method id "compute.routers.getNatIpInfo": + +type RoutersGetNatIpInfoCall struct { + s *Service + project string + region string + router string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetNatIpInfo: Retrieves runtime NAT IP information. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name of the Router resource to query for Nat IP +// information. The name should conform to RFC1035. +func (r *RoutersService) GetNatIpInfo(project string, region string, router string) *RoutersGetNatIpInfoCall { + c := &RoutersGetNatIpInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + return c +} + +// NatName sets the optional parameter "natName": Name of the nat +// service to filter the NAT IP information. If it is omitted, all nats +// for this router will be returned. Name should conform to RFC1035. +func (c *RoutersGetNatIpInfoCall) NatName(natName string) *RoutersGetNatIpInfoCall { + c.urlParams_.Set("natName", natName) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoutersGetNatIpInfoCall) Fields(s ...googleapi.Field) *RoutersGetNatIpInfoCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RoutersGetNatIpInfoCall) IfNoneMatch(entityTag string) *RoutersGetNatIpInfoCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoutersGetNatIpInfoCall) Context(ctx context.Context) *RoutersGetNatIpInfoCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoutersGetNatIpInfoCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersGetNatIpInfoCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo") + 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{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.getNatIpInfo" call. +// Exactly one of *NatIpInfoResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *NatIpInfoResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RoutersGetNatIpInfoCall) Do(opts ...googleapi.CallOption) (*NatIpInfoResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &NatIpInfoResponse{ + ServerResponse: googleapi.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 runtime NAT IP information.", + // "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + // "httpMethod": "GET", + // "id": "compute.routers.getNatIpInfo", + // "parameterOrder": [ + // "project", + // "region", + // "router" + // ], + // "parameters": { + // "natName": { + // "description": "Name of the nat service to filter the NAT IP information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "router": { + // "description": "Name of the Router resource to query for Nat IP information. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", + // "response": { + // "$ref": "NatIpInfoResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.routers.getNatMappingInfo": type RoutersGetNatMappingInfoCall struct { diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 8ac816b682f..9042931c001 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -11548,6 +11548,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setSecurityPolicy": { + "description": "Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview", + "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", + "httpMethod": "POST", + "id": "compute.instances.setSecurityPolicy", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", + "request": { + "$ref": "InstancesSetSecurityPolicyRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setServiceAccount": { "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", @@ -12392,13 +12441,13 @@ } } }, - "interconnectAttachments": { + "instantSnapshots": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of interconnect attachments.", - "flatPath": "projects/{project}/aggregated/interconnectAttachments", + "description": "Retrieves an aggregated list of instantSnapshots.", + "flatPath": "projects/{project}/aggregated/instantSnapshots", "httpMethod": "GET", - "id": "compute.interconnectAttachments.aggregatedList", + "id": "compute.instantSnapshots.aggregatedList", "parameterOrder": [ "project" ], @@ -12444,9 +12493,9 @@ "type": "boolean" } }, - "path": "projects/{project}/aggregated/interconnectAttachments", + "path": "projects/{project}/aggregated/instantSnapshots", "response": { - "$ref": "InterconnectAttachmentAggregatedList" + "$ref": "InstantSnapshotAggregatedList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -12455,18 +12504,18 @@ ] }, "delete": { - "description": "Deletes the specified interconnect attachment.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", "httpMethod": "DELETE", - "id": "compute.interconnectAttachments.delete", + "id": "compute.instantSnapshots.delete", "parameterOrder": [ "project", - "region", - "interconnectAttachment" + "zone", + "instantSnapshot" ], "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to delete.", + "instantSnapshot": { + "description": "Name of the InstantSnapshot resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -12479,20 +12528,70 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region for this request.", + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "export": { + "description": "Export the changed blocks between two instant snapshots to a customer's bucket in the user specified format.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}/export", + "httpMethod": "POST", + "id": "compute.instantSnapshots.export", + "parameterOrder": [ + "project", + "zone", + "instantSnapshot" + ], + "parameters": { + "instantSnapshot": { + "description": "Name of the instant snapshot to export.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" }, "requestId": { "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" } }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}/export", + "request": { + "$ref": "InstantSnapshotsExportRequest" + }, "response": { "$ref": "Operation" }, @@ -12502,18 +12601,18 @@ ] }, "get": { - "description": "Returns the specified interconnect attachment.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "description": "Returns the specified InstantSnapshot resource in the specified zone.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", "httpMethod": "GET", - "id": "compute.interconnectAttachments.get", + "id": "compute.instantSnapshots.get", "parameterOrder": [ "project", - "region", - "interconnectAttachment" + "zone", + "instantSnapshot" ], "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to return.", + "instantSnapshot": { + "description": "Name of the InstantSnapshot resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -12526,17 +12625,17 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region for this request.", + "zone": { + "description": "The name of the zone for this request.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", "response": { - "$ref": "InterconnectAttachment" + "$ref": "InstantSnapshot" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -12544,16 +12643,23 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "insert": { - "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.insert", + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", + "httpMethod": "GET", + "id": "compute.instantSnapshots.getIamPolicy", "parameterOrder": [ "project", - "region" + "zone", + "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -12561,27 +12667,64 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region for this request.", + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates an instant snapshot in the specified zone.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", + "httpMethod": "POST", + "id": "compute.instantSnapshots.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" }, "requestId": { "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" } }, - "path": "projects/{project}/regions/{region}/interconnectAttachments", + "path": "projects/{project}/zones/{zone}/instantSnapshots", "request": { - "$ref": "InterconnectAttachment" + "$ref": "InstantSnapshot" }, "response": { "$ref": "Operation" @@ -12592,13 +12735,13 @@ ] }, "list": { - "description": "Retrieves the list of interconnect attachments contained within the specified region.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", + "description": "Retrieves the list of InstantSnapshot resources contained within the specified zone.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", "httpMethod": "GET", - "id": "compute.interconnectAttachments.list", + "id": "compute.instantSnapshots.list", "parameterOrder": [ "project", - "region" + "zone" ], "parameters": { "filter": { @@ -12631,22 +12774,22 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, "returnPartialSuccess": { "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", "location": "query", "type": "boolean" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" } }, - "path": "projects/{project}/regions/{region}/interconnectAttachments", + "path": "projects/{project}/zones/{zone}/instantSnapshots", "response": { - "$ref": "InterconnectAttachmentList" + "$ref": "InstantSnapshotList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -12654,24 +12797,17 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "patch": { - "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "PATCH", - "id": "compute.interconnectAttachments.patch", + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", + "httpMethod": "POST", + "id": "compute.instantSnapshots.setIamPolicy", "parameterOrder": [ "project", - "region", - "interconnectAttachment" + "zone", + "resource" ], "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, "project": { "description": "Project ID for this request.", "location": "path", @@ -12679,25 +12815,27 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region scoping this request.", + "resource": { + "description": "Name or id of the resource for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - "location": "query", + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", + "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", "request": { - "$ref": "InterconnectAttachment" + "$ref": "ZoneSetPolicyRequest" }, "response": { - "$ref": "Operation" + "$ref": "Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -12705,13 +12843,13 @@ ] }, "setLabels": { - "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", + "description": "Sets the labels on a instantSnapshot in the given zone. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", "httpMethod": "POST", - "id": "compute.interconnectAttachments.setLabels", + "id": "compute.instantSnapshots.setLabels", "parameterOrder": [ "project", - "region", + "zone", "resource" ], "parameters": { @@ -12722,13 +12860,6 @@ "required": true, "type": "string" }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, "requestId": { "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", @@ -12740,11 +12871,18 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" } }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", + "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", "request": { - "$ref": "RegionSetLabelsRequest" + "$ref": "ZoneSetLabelsRequest" }, "response": { "$ref": "Operation" @@ -12756,12 +12894,12 @@ }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", "httpMethod": "POST", - "id": "compute.interconnectAttachments.testIamPermissions", + "id": "compute.instantSnapshots.testIamPermissions", "parameterOrder": [ "project", - "region", + "zone", "resource" ], "parameters": { @@ -12772,22 +12910,22 @@ "required": true, "type": "string" }, - "region": { - "description": "The name of the region for this request.", + "resource": { + "description": "Name or id of the resource for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, - "resource": { - "description": "Name or id of the resource for this request.", + "zone": { + "description": "The name of the zone for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", + "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", "request": { "$ref": "TestPermissionsRequest" }, @@ -12802,48 +12940,13 @@ } } }, - "interconnectLocations": { + "interconnectAttachments": { "methods": { - "get": { - "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", - "flatPath": "projects/{project}/global/interconnectLocations/{interconnectLocation}", - "httpMethod": "GET", - "id": "compute.interconnectLocations.get", - "parameterOrder": [ - "project", - "interconnectLocation" - ], - "parameters": { - "interconnectLocation": { - "description": "Name of the interconnect location to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectLocations/{interconnectLocation}", - "response": { - "$ref": "InterconnectLocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of interconnect locations available to the specified project.", - "flatPath": "projects/{project}/global/interconnectLocations", + "aggregatedList": { + "description": "Retrieves an aggregated list of interconnect attachments.", + "flatPath": "projects/{project}/aggregated/interconnectAttachments", "httpMethod": "GET", - "id": "compute.interconnectLocations.list", + "id": "compute.interconnectAttachments.aggregatedList", "parameterOrder": [ "project" ], @@ -12853,6 +12956,11 @@ "location": "query", "type": "string" }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, "maxResults": { "default": "500", "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -12884,32 +12992,29 @@ "type": "boolean" } }, - "path": "projects/{project}/global/interconnectLocations", + "path": "projects/{project}/aggregated/interconnectAttachments", "response": { - "$ref": "InterconnectLocationList" + "$ref": "InterconnectAttachmentAggregatedList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] - } - } - }, - "interconnects": { - "methods": { + }, "delete": { - "description": "Deletes the specified Interconnect.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", + "description": "Deletes the specified interconnect attachment.", + "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", "httpMethod": "DELETE", - "id": "compute.interconnects.delete", + "id": "compute.interconnectAttachments.delete", "parameterOrder": [ "project", - "interconnect" + "region", + "interconnectAttachment" ], "parameters": { - "interconnect": { - "description": "Name of the interconnect to delete.", + "interconnectAttachment": { + "description": "Name of the interconnect attachment to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -12922,13 +13027,20 @@ "required": true, "type": "string" }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, "requestId": { "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" } }, - "path": "projects/{project}/global/interconnects/{interconnect}", + "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", "response": { "$ref": "Operation" }, @@ -12938,17 +13050,18 @@ ] }, "get": { - "description": "Returns the specified Interconnect. Get a list of available Interconnects by making a list() request.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", + "description": "Returns the specified interconnect attachment.", + "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", "httpMethod": "GET", - "id": "compute.interconnects.get", + "id": "compute.interconnectAttachments.get", "parameterOrder": [ "project", - "interconnect" + "region", + "interconnectAttachment" ], "parameters": { - "interconnect": { - "description": "Name of the interconnect to return.", + "interconnectAttachment": { + "description": "Name of the interconnect attachment to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -12960,46 +13073,18 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}", - "response": { - "$ref": "Interconnect" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified Interconnect.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", - "httpMethod": "GET", - "id": "compute.interconnects.getDiagnostics", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" }, - "project": { - "description": "Project ID for this request.", + "region": { + "description": "Name of the region for this request.", "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" } }, - "path": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", + "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", "response": { - "$ref": "InterconnectsGetDiagnosticsResponse" + "$ref": "InterconnectAttachment" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13008,12 +13093,13 @@ ] }, "insert": { - "description": "Creates an Interconnect in the specified project using the data included in the request.", - "flatPath": "projects/{project}/global/interconnects", + "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", "httpMethod": "POST", - "id": "compute.interconnects.insert", + "id": "compute.interconnectAttachments.insert", "parameterOrder": [ - "project" + "project", + "region" ], "parameters": { "project": { @@ -13023,15 +13109,27 @@ "required": true, "type": "string" }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, "requestId": { "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" + }, + "validateOnly": { + "description": "If true, the request will not be committed.", + "location": "query", + "type": "boolean" } }, - "path": "projects/{project}/global/interconnects", + "path": "projects/{project}/regions/{region}/interconnectAttachments", "request": { - "$ref": "Interconnect" + "$ref": "InterconnectAttachment" }, "response": { "$ref": "Operation" @@ -13042,12 +13140,13 @@ ] }, "list": { - "description": "Retrieves the list of Interconnects available to the specified project.", - "flatPath": "projects/{project}/global/interconnects", + "description": "Retrieves the list of interconnect attachments contained within the specified region.", + "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", "httpMethod": "GET", - "id": "compute.interconnects.list", + "id": "compute.interconnectAttachments.list", "parameterOrder": [ - "project" + "project", + "region" ], "parameters": { "filter": { @@ -13080,15 +13179,22 @@ "required": true, "type": "string" }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, "returnPartialSuccess": { "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", "location": "query", "type": "boolean" } }, - "path": "projects/{project}/global/interconnects", + "path": "projects/{project}/regions/{region}/interconnectAttachments", "response": { - "$ref": "InterconnectList" + "$ref": "InterconnectAttachmentList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13097,17 +13203,18 @@ ] }, "patch": { - "description": "Updates the specified Interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", + "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", "httpMethod": "PATCH", - "id": "compute.interconnects.patch", + "id": "compute.interconnectAttachments.patch", "parameterOrder": [ "project", - "interconnect" + "region", + "interconnectAttachment" ], "parameters": { - "interconnect": { - "description": "Name of the interconnect to update.", + "interconnectAttachment": { + "description": "Name of the interconnect attachment to patch.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -13120,15 +13227,22 @@ "required": true, "type": "string" }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, "requestId": { "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" } }, - "path": "projects/{project}/global/interconnects/{interconnect}", + "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", "request": { - "$ref": "Interconnect" + "$ref": "InterconnectAttachment" }, "response": { "$ref": "Operation" @@ -13139,12 +13253,13 @@ ] }, "setLabels": { - "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.", - "flatPath": "projects/{project}/global/interconnects/{resource}/setLabels", + "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", "httpMethod": "POST", - "id": "compute.interconnects.setLabels", + "id": "compute.interconnectAttachments.setLabels", "parameterOrder": [ "project", + "region", "resource" ], "parameters": { @@ -13155,17 +13270,29 @@ "required": true, "type": "string" }, + "region": { + "description": "The region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, "resource": { "description": "Name or id of the resource for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/global/interconnects/{resource}/setLabels", + "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", "request": { - "$ref": "GlobalSetLabelsRequest" + "$ref": "RegionSetLabelsRequest" }, "response": { "$ref": "Operation" @@ -13177,11 +13304,12 @@ }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/interconnects/{resource}/testIamPermissions", + "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", "httpMethod": "POST", - "id": "compute.interconnects.testIamPermissions", + "id": "compute.interconnectAttachments.testIamPermissions", "parameterOrder": [ "project", + "region", "resource" ], "parameters": { @@ -13192,15 +13320,22 @@ "required": true, "type": "string" }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, "resource": { "description": "Name or id of the resource for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/global/interconnects/{resource}/testIamPermissions", + "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", "request": { "$ref": "TestPermissionsRequest" }, @@ -13215,22 +13350,22 @@ } } }, - "licenseCodes": { + "interconnectLocations": { "methods": { "get": { - "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenseCodes/{licenseCode}", + "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", + "flatPath": "projects/{project}/global/interconnectLocations/{interconnectLocation}", "httpMethod": "GET", - "id": "compute.licenseCodes.get", + "id": "compute.interconnectLocations.get", "parameterOrder": [ "project", - "licenseCode" + "interconnectLocation" ], "parameters": { - "licenseCode": { - "description": "Number corresponding to the License code resource to return.", + "interconnectLocation": { + "description": "Name of the interconnect location to return.", "location": "path", - "pattern": "[0-9]{0,61}?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -13242,9 +13377,9 @@ "type": "string" } }, - "path": "projects/{project}/global/licenseCodes/{licenseCode}", + "path": "projects/{project}/global/interconnectLocations/{interconnectLocation}", "response": { - "$ref": "LicenseCode" + "$ref": "InterconnectLocation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13252,16 +13387,38 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.licenseCodes.testIamPermissions", + "list": { + "description": "Retrieves the list of interconnect locations available to the specified project.", + "flatPath": "projects/{project}/global/interconnectLocations", + "httpMethod": "GET", + "id": "compute.interconnectLocations.list", "parameterOrder": [ - "project", - "resource" + "project" ], "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -13269,20 +13426,109 @@ "required": true, "type": "string" }, - "resource": { - "description": "Name or id of the resource for this request.", + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/interconnectLocations", + "response": { + "$ref": "InterconnectLocationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "interconnectRemoteLocations": { + "methods": { + "get": { + "description": "Returns the details for the specified interconnect remote location. Gets a list of available interconnect remote locations by making a list() request.", + "flatPath": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + "httpMethod": "GET", + "id": "compute.interconnectRemoteLocations.get", + "parameterOrder": [ + "project", + "interconnectRemoteLocation" + ], + "parameters": { + "interconnectRemoteLocation": { + "description": "Name of the interconnect remote location to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" } }, - "path": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" + "path": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + "response": { + "$ref": "InterconnectRemoteLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Retrieves the list of interconnect remote locations available to the specified project.", + "flatPath": "projects/{project}/global/interconnectRemoteLocations", + "httpMethod": "GET", + "id": "compute.interconnectRemoteLocations.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } }, + "path": "projects/{project}/global/interconnectRemoteLocations", "response": { - "$ref": "TestPermissionsResponse" + "$ref": "InterconnectRemoteLocationList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13292,20 +13538,20 @@ } } }, - "licenses": { + "interconnects": { "methods": { "delete": { - "description": "Deletes the specified license. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenses/{license}", + "description": "Deletes the specified Interconnect.", + "flatPath": "projects/{project}/global/interconnects/{interconnect}", "httpMethod": "DELETE", - "id": "compute.licenses.delete", + "id": "compute.interconnects.delete", "parameterOrder": [ "project", - "license" + "interconnect" ], "parameters": { - "license": { - "description": "Name of the license resource to delete.", + "interconnect": { + "description": "Name of the interconnect to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -13324,7 +13570,7 @@ "type": "string" } }, - "path": "projects/{project}/global/licenses/{license}", + "path": "projects/{project}/global/interconnects/{interconnect}", "response": { "$ref": "Operation" }, @@ -13334,17 +13580,17 @@ ] }, "get": { - "description": "Returns the specified License resource. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenses/{license}", + "description": "Returns the specified Interconnect. Get a list of available Interconnects by making a list() request.", + "flatPath": "projects/{project}/global/interconnects/{interconnect}", "httpMethod": "GET", - "id": "compute.licenses.get", + "id": "compute.interconnects.get", "parameterOrder": [ "project", - "license" + "interconnect" ], "parameters": { - "license": { - "description": "Name of the License resource to return.", + "interconnect": { + "description": "Name of the interconnect to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -13358,9 +13604,9 @@ "type": "string" } }, - "path": "projects/{project}/global/licenses/{license}", + "path": "projects/{project}/global/interconnects/{interconnect}", "response": { - "$ref": "License" + "$ref": "Interconnect" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13368,40 +13614,34 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenses/{resource}/getIamPolicy", + "getDiagnostics": { + "description": "Returns the interconnectDiagnostics for the specified Interconnect.", + "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", "httpMethod": "GET", - "id": "compute.licenses.getIamPolicy", + "id": "compute.interconnects.getDiagnostics", "parameterOrder": [ "project", - "resource" + "interconnect" ], "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", + "interconnect": { + "description": "Name of the interconnect resource to query.", "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, - "resource": { - "description": "Name or id of the resource for this request.", + "project": { + "description": "Project ID for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" } }, - "path": "projects/{project}/global/licenses/{resource}/getIamPolicy", + "path": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", "response": { - "$ref": "Policy" + "$ref": "InterconnectsGetDiagnosticsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13410,10 +13650,10 @@ ] }, "insert": { - "description": "Create a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenses", + "description": "Creates an Interconnect in the specified project using the data included in the request.", + "flatPath": "projects/{project}/global/interconnects", "httpMethod": "POST", - "id": "compute.licenses.insert", + "id": "compute.interconnects.insert", "parameterOrder": [ "project" ], @@ -13431,26 +13671,23 @@ "type": "string" } }, - "path": "projects/{project}/global/licenses", + "path": "projects/{project}/global/interconnects", "request": { - "$ref": "License" + "$ref": "Interconnect" }, "response": { "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" + "https://www.googleapis.com/auth/compute" ] }, "list": { - "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenses", + "description": "Retrieves the list of Interconnects available to the specified project.", + "flatPath": "projects/{project}/global/interconnects", "httpMethod": "GET", - "id": "compute.licenses.list", + "id": "compute.interconnects.list", "parameterOrder": [ "project" ], @@ -13491,9 +13728,9 @@ "type": "boolean" } }, - "path": "projects/{project}/global/licenses", + "path": "projects/{project}/global/interconnects", "response": { - "$ref": "LicensesListResponse" + "$ref": "InterconnectList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13501,11 +13738,53 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenses/{resource}/setIamPolicy", + "patch": { + "description": "Updates the specified Interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "flatPath": "projects/{project}/global/interconnects/{interconnect}", + "httpMethod": "PATCH", + "id": "compute.interconnects.patch", + "parameterOrder": [ + "project", + "interconnect" + ], + "parameters": { + "interconnect": { + "description": "Name of the interconnect to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/interconnects/{interconnect}", + "request": { + "$ref": "Interconnect" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setLabels": { + "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/global/interconnects/{resource}/setLabels", "httpMethod": "POST", - "id": "compute.licenses.setIamPolicy", + "id": "compute.interconnects.setLabels", "parameterOrder": [ "project", "resource" @@ -13526,12 +13805,12 @@ "type": "string" } }, - "path": "projects/{project}/global/licenses/{resource}/setIamPolicy", + "path": "projects/{project}/global/interconnects/{resource}/setLabels", "request": { - "$ref": "GlobalSetPolicyRequest" + "$ref": "GlobalSetLabelsRequest" }, "response": { - "$ref": "Policy" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -13539,10 +13818,10 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", - "flatPath": "projects/{project}/global/licenses/{resource}/testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/global/interconnects/{resource}/testIamPermissions", "httpMethod": "POST", - "id": "compute.licenses.testIamPermissions", + "id": "compute.interconnects.testIamPermissions", "parameterOrder": [ "project", "resource" @@ -13563,7 +13842,7 @@ "type": "string" } }, - "path": "projects/{project}/global/licenses/{resource}/testIamPermissions", + "path": "projects/{project}/global/interconnects/{resource}/testIamPermissions", "request": { "$ref": "TestPermissionsRequest" }, @@ -13578,22 +13857,22 @@ } } }, - "machineImages": { + "licenseCodes": { "methods": { - "delete": { - "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.", - "flatPath": "projects/{project}/global/machineImages/{machineImage}", - "httpMethod": "DELETE", - "id": "compute.machineImages.delete", + "get": { + "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenseCodes/{licenseCode}", + "httpMethod": "GET", + "id": "compute.licenseCodes.get", "parameterOrder": [ "project", - "machineImage" + "licenseCode" ], "parameters": { - "machineImage": { - "description": "The name of the machine image to delete.", + "licenseCode": { + "description": "Number corresponding to the License code resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "[0-9]{0,61}?", "required": true, "type": "string" }, @@ -13603,7 +13882,370 @@ "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" - }, + } + }, + "path": "projects/{project}/global/licenseCodes/{licenseCode}", + "response": { + "$ref": "LicenseCode" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.licenseCodes.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "licenses": { + "methods": { + "delete": { + "description": "Deletes the specified license. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses/{license}", + "httpMethod": "DELETE", + "id": "compute.licenses.delete", + "parameterOrder": [ + "project", + "license" + ], + "parameters": { + "license": { + "description": "Name of the license resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/licenses/{license}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified License resource. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses/{license}", + "httpMethod": "GET", + "id": "compute.licenses.get", + "parameterOrder": [ + "project", + "license" + ], + "parameters": { + "license": { + "description": "Name of the License resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/licenses/{license}", + "response": { + "$ref": "License" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses/{resource}/getIamPolicy", + "httpMethod": "GET", + "id": "compute.licenses.getIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/licenses/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Create a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses", + "httpMethod": "POST", + "id": "compute.licenses.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/licenses", + "request": { + "$ref": "License" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "list": { + "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses", + "httpMethod": "GET", + "id": "compute.licenses.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/licenses", + "response": { + "$ref": "LicensesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses/{resource}/setIamPolicy", + "httpMethod": "POST", + "id": "compute.licenses.setIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/licenses/{resource}/setIamPolicy", + "request": { + "$ref": "GlobalSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.licenses.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/licenses/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "machineImages": { + "methods": { + "delete": { + "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.", + "flatPath": "projects/{project}/global/machineImages/{machineImage}", + "httpMethod": "DELETE", + "id": "compute.machineImages.delete", + "parameterOrder": [ + "project", + "machineImage" + ], + "parameters": { + "machineImage": { + "description": "The name of the machine image to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, "requestId": { "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", @@ -24052,6 +24694,445 @@ } } }, + "regionInstantSnapshots": { + "methods": { + "delete": { + "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", + "httpMethod": "DELETE", + "id": "compute.regionInstantSnapshots.delete", + "parameterOrder": [ + "project", + "region", + "instantSnapshot" + ], + "parameters": { + "instantSnapshot": { + "description": "Name of the InstantSnapshot resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "export": { + "description": "Export the changed blocks between two instant snapshots to a customer's bucket in the user specified format.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}/export", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshots.export", + "parameterOrder": [ + "project", + "region", + "instantSnapshot" + ], + "parameters": { + "instantSnapshot": { + "description": "Name of the instant snapshot to export.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}/export", + "request": { + "$ref": "RegionInstantSnapshotsExportRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified InstantSnapshot resource in the specified region.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", + "httpMethod": "GET", + "id": "compute.regionInstantSnapshots.get", + "parameterOrder": [ + "project", + "region", + "instantSnapshot" + ], + "parameters": { + "instantSnapshot": { + "description": "Name of the InstantSnapshot resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", + "response": { + "$ref": "InstantSnapshot" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", + "httpMethod": "GET", + "id": "compute.regionInstantSnapshots.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates an instant snapshot in the specified region.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshots.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots", + "request": { + "$ref": "InstantSnapshot" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of InstantSnapshot resources contained within the specified region.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots", + "httpMethod": "GET", + "id": "compute.regionInstantSnapshots.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots", + "response": { + "$ref": "InstantSnapshotList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshots.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setLabels": { + "description": "Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshots.setLabels", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshots.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionNetworkEndpointGroups": { "methods": { "delete": { @@ -33760,6 +34841,55 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setSecurityPolicy": { + "description": "Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview", + "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + "httpMethod": "POST", + "id": "compute.targetInstances.setSecurityPolicy", + "parameterOrder": [ + "project", + "zone", + "targetInstance" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetInstance": { + "description": "Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + "request": { + "$ref": "SecurityPolicyReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource.", "flatPath": "projects/{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", @@ -34367,6 +35497,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setSecurityPolicy": { + "description": "Sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview", + "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + "httpMethod": "POST", + "id": "compute.targetPools.setSecurityPolicy", + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetPool": { + "description": "Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + "request": { + "$ref": "SecurityPolicyReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource.", "flatPath": "projects/{project}/regions/{region}/targetPools/{resource}/testIamPermissions", @@ -37000,7 +38179,7 @@ } } }, - "revision": "20230425", + "revision": "20230509", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -37484,6 +38663,10 @@ "description": "The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this access config.", + "type": "string" + }, "setPublicPtr": { "description": "Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated.", "type": "boolean" @@ -39787,6 +40970,13 @@ "$ref": "Duration", "description": "Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED." }, + "metadatas": { + "additionalProperties": { + "type": "string" + }, + "description": "Deployment metadata associated with the resource to be set by a GKE hub controller and read by the backend RCTH", + "type": "object" + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -42065,6 +43255,14 @@ "description": "[Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.", "type": "string" }, + "sourceInstantSnapshot": { + "description": "The source instant snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot ", + "type": "string" + }, + "sourceInstantSnapshotId": { + "description": "[Output Only] The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.", + "type": "string" + }, "sourceSnapshot": { "description": "The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project /global/snapshots/snapshot - projects/project/global/snapshots/snapshot - global/snapshots/snapshot ", "type": "string" @@ -44193,6 +45391,10 @@ "format": "int32", "type": "integer" }, + "securityProfileGroup": { + "description": "A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.", + "type": "string" + }, "targetResources": { "description": "A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.", "items": { @@ -44213,6 +45415,10 @@ "type": "string" }, "type": "array" + }, + "tlsInspect": { + "description": "Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.", + "type": "boolean" } }, "type": "object" @@ -48543,7 +49749,7 @@ "type": "string" }, "initialDelaySec": { - "description": "The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].", + "description": "The initial delay is the number of seconds that a new VM takes to initialize and run its startup script. During a VM's initial delay period, the MIG ignores unsuccessful health checks because the VM might be in the startup process. This prevents the MIG from prematurely recreating a VM. If the health check receives a healthy response during the initial delay, it indicates that the startup process is complete and the VM is ready. The value of initial delay must be between 0 and 3600 seconds. The default value is 0.", "format": "int32", "type": "integer" } @@ -50535,193 +51741,819 @@ }, "type": "object" }, - "InstanceWithNamedPorts": { - "id": "InstanceWithNamedPorts", + "InstanceWithNamedPorts": { + "id": "InstanceWithNamedPorts", + "properties": { + "instance": { + "description": "[Output Only] The URL of the instance.", + "type": "string" + }, + "namedPorts": { + "description": "[Output Only] The named ports that belong to this instance group.", + "items": { + "$ref": "NamedPort" + }, + "type": "array" + }, + "status": { + "description": "[Output Only] The status of the instance.", + "enum": [ + "DEPROVISIONING", + "PROVISIONING", + "REPAIRING", + "RUNNING", + "STAGING", + "STOPPED", + "STOPPING", + "SUSPENDED", + "SUSPENDING", + "TERMINATED" + ], + "enumDescriptions": [ + "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", + "Resources are being allocated for the instance.", + "The instance is in repair.", + "The instance is running.", + "All required resources have been allocated and the instance is being started.", + "The instance has stopped successfully.", + "The instance is currently stopping (either being deleted or killed).", + "The instance has suspended.", + "The instance is suspending.", + "The instance has stopped (either by explicit action or underlying failure)." + ], + "type": "string" + } + }, + "type": "object" + }, + "InstancesAddResourcePoliciesRequest": { + "id": "InstancesAddResourcePoliciesRequest", + "properties": { + "resourcePolicies": { + "description": "Resource policies to be added to this instance.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstancesGetEffectiveFirewallsResponse": { + "id": "InstancesGetEffectiveFirewallsResponse", + "properties": { + "firewallPolicys": { + "description": "Effective firewalls from firewall policies.", + "items": { + "$ref": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" + }, + "type": "array" + }, + "firewalls": { + "description": "Effective firewalls on the instance.", + "items": { + "$ref": "Firewall" + }, + "type": "array" + }, + "organizationFirewalls": { + "description": "Effective firewalls from organization policies.", + "items": { + "$ref": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { + "id": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", + "properties": { + "displayName": { + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", + "type": "string" + }, + "name": { + "description": "[Output Only] The name of the firewall policy.", + "type": "string" + }, + "rules": { + "description": "The rules that apply to the network.", + "items": { + "$ref": "FirewallPolicyRule" + }, + "type": "array" + }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy.", + "type": "string" + }, + "type": { + "description": "[Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL.", + "enum": [ + "HIERARCHY", + "NETWORK", + "NETWORK_REGIONAL", + "UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy": { + "description": "A pruned SecurityPolicy containing ID and any applicable firewall rules.", + "id": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy", + "properties": { + "id": { + "description": "The unique identifier for the security policy. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "rules": { + "description": "The rules that apply to the network.", + "items": { + "$ref": "SecurityPolicyRule" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstancesRemoveResourcePoliciesRequest": { + "id": "InstancesRemoveResourcePoliciesRequest", + "properties": { + "resourcePolicies": { + "description": "Resource policies to be removed from this instance.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstancesResumeRequest": { + "id": "InstancesResumeRequest", + "properties": { + "disks": { + "description": "Array of disks associated with this instance that are protected with a customer-supplied encryption key. In order to resume the instance, the disk url and its corresponding key must be provided. If the disk is not protected with a customer-supplied encryption key it should not be specified.", + "items": { + "$ref": "CustomerEncryptionKeyProtectedDisk" + }, + "type": "array" + }, + "instanceEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "Decrypts data associated with an instance that is protected with a customer-supplied encryption key. If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance resume will not succeed." + } + }, + "type": "object" + }, + "InstancesScopedList": { + "id": "InstancesScopedList", + "properties": { + "instances": { + "description": "[Output Only] A list of instances contained in this scope.", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning which replaces the list of instances when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InstancesSetLabelsRequest": { + "id": "InstancesSetLabelsRequest", + "properties": { + "labelFingerprint": { + "description": "Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.", + "format": "byte", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, + "InstancesSetMachineResourcesRequest": { + "id": "InstancesSetMachineResourcesRequest", + "properties": { + "guestAccelerators": { + "description": "A list of the type and count of accelerator cards attached to the instance.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstancesSetMachineTypeRequest": { + "id": "InstancesSetMachineTypeRequest", + "properties": { + "machineType": { + "description": "Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1", + "type": "string" + } + }, + "type": "object" + }, + "InstancesSetMinCpuPlatformRequest": { + "id": "InstancesSetMinCpuPlatformRequest", + "properties": { + "minCpuPlatform": { + "description": "Minimum cpu/platform this instance should be started at.", + "type": "string" + } + }, + "type": "object" + }, + "InstancesSetNameRequest": { + "id": "InstancesSetNameRequest", + "properties": { + "currentName": { + "description": "The current name of this resource, used to prevent conflicts. Provide the latest name when making a request to change name.", + "type": "string" + }, + "name": { + "description": "The name to be applied to the instance. Needs to be RFC 1035 compliant.", + "type": "string" + } + }, + "type": "object" + }, + "InstancesSetSecurityPolicyRequest": { + "id": "InstancesSetSecurityPolicyRequest", + "properties": { + "networkInterfaces": { + "description": "The network interfaces that the security policy will be applied to. Network interfaces use the nicN naming format. You can only set a security policy for network interfaces with an access config.", + "items": { + "type": "string" + }, + "type": "array" + }, + "securityPolicy": { + "description": "A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy.", + "type": "string" + } + }, + "type": "object" + }, + "InstancesSetServiceAccountRequest": { + "id": "InstancesSetServiceAccountRequest", + "properties": { + "email": { + "description": "Email address of the service account.", + "type": "string" + }, + "scopes": { + "description": "The list of scopes to be made available for this service account.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstancesStartWithEncryptionKeyRequest": { + "id": "InstancesStartWithEncryptionKeyRequest", + "properties": { + "disks": { + "description": "Array of disks associated with this instance that are protected with a customer-supplied encryption key. In order to start the instance, the disk url and its corresponding key must be provided. If the disk is not protected with a customer-supplied encryption key it should not be specified.", + "items": { + "$ref": "CustomerEncryptionKeyProtectedDisk" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstantSnapshot": { + "description": "Represents a InstantSnapshot resource. You can use instant snapshots to create disk rollback points quickly..", + "id": "InstantSnapshot", + "properties": { + "architecture": { + "description": "[Output Only] The architecture of the instant snapshot. Valid values are ARM64 or X86_64.", + "enum": [ + "ARCHITECTURE_UNSPECIFIED", + "ARM64", + "X86_64" + ], + "enumDescriptions": [ + "Default value indicating Architecture is not set.", + "Machines with architecture ARM64", + "Machines with architecture X86_64" + ], + "type": "string" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "diskSizeGb": { + "description": "[Output Only] Size of the source disk, specified in GB.", + "format": "int64", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#instantSnapshot", + "description": "[Output Only] Type of the resource. Always compute#instantSnapshot for InstantSnapshot resources.", + "type": "string" + }, + "labelFingerprint": { + "description": "A fingerprint for the labels being applied to this InstantSnapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a InstantSnapshot.", + "format": "byte", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to this InstantSnapshot. These can be later modified by the setLabels method. Label values may be empty.", + "type": "object" + }, + "name": { + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "region": { + "description": "[Output Only] URL of the region where the instant snapshot resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "resourceStatus": { + "$ref": "InstantSnapshotResourceStatus", + "description": "[Output Only] Status information for the instant snapshot resource." + }, + "satisfiesPzs": { + "description": "[Output Only] Reserved for future use.", + "type": "boolean" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource's resource id.", + "type": "string" + }, + "sourceDisk": { + "description": "URL of the source disk used to create this instant snapshot. Note that the source disk must be in the same zone/region as the instant snapshot to be created. This can be a full or valid partial URL. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk ", + "type": "string" + }, + "sourceDiskId": { + "description": "[Output Only] The ID value of the disk used to create this InstantSnapshot. This value may be used to determine whether the InstantSnapshot was taken from the current or a previous instance of a given disk name.", + "type": "string" + }, + "status": { + "description": "[Output Only] The status of the instantSnapshot. This can be CREATING, DELETING, FAILED, or READY.", + "enum": [ + "CREATING", + "DELETING", + "FAILED", + "READY" + ], + "enumDescriptions": [ + "InstantSnapshot creation is in progress.", + "InstantSnapshot is currently being deleted.", + "InstantSnapshot creation failed.", + "InstantSnapshot has been created successfully." + ], + "type": "string" + }, + "zone": { + "description": "[Output Only] URL of the zone where the instant snapshot resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + } + }, + "type": "object" + }, + "InstantSnapshotAggregatedList": { + "id": "InstantSnapshotAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "InstantSnapshotsScopedList", + "description": "[Output Only] Name of the scope containing this set of instantSnapshots." + }, + "description": "A list of InstantSnapshotsScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#instantSnapshotAggregatedList", + "description": "[Output Only] Type of resource. Always compute#instantSnapshotAggregatedList for aggregated lists of instantSnapshots.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InstantSnapshotExportParams": { + "id": "InstantSnapshotExportParams", + "properties": { + "baseInstantSnapshot": { + "description": "An optional base instant snapshot that this resource is compared against. If not specified, all blocks of this resource are exported. The base instant snapshot and this resource must be created from the same disk. The base instant snapshot must be created earlier in time than this resource.", + "type": "string" + }, + "bucketName": { + "description": "The name of an existing bucket in Cloud Storage where the changed blocks will be stored. The Google Service Account must have read and write access to this bucket. The bucket has to be in the same region as this resource.", + "type": "string" + }, + "encryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "Encryption key used to encrypt the instant snapshot." + }, + "objectName": { + "description": "Name of the output Bigstore object storing the changed blocks. Object name must be less than 1024 bytes in length.", + "type": "string" + }, + "outputType": { + "description": "The format of the output file.", + "enum": [ + "INVALID", + "METADATA_AND_DATA", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "InstantSnapshotList": { + "description": "Contains a list of InstantSnapshot resources.", + "id": "InstantSnapshotList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of InstantSnapshot resources.", + "items": { + "$ref": "InstantSnapshot" + }, + "type": "array" + }, + "kind": { + "default": "compute#instantSnapshotList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InstantSnapshotResourceStatus": { + "id": "InstantSnapshotResourceStatus", "properties": { - "instance": { - "description": "[Output Only] The URL of the instance.", - "type": "string" - }, - "namedPorts": { - "description": "[Output Only] The named ports that belong to this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "status": { - "description": "[Output Only] The status of the instance.", - "enum": [ - "DEPROVISIONING", - "PROVISIONING", - "REPAIRING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", - "Resources are being allocated for the instance.", - "The instance is in repair.", - "The instance is running.", - "All required resources have been allocated and the instance is being started.", - "The instance has stopped successfully.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has suspended.", - "The instance is suspending.", - "The instance has stopped (either by explicit action or underlying failure)." - ], + "storageSizeBytes": { + "description": "[Output Only] The storage size of this instant snapshot.", + "format": "int64", "type": "string" } }, "type": "object" }, - "InstancesAddResourcePoliciesRequest": { - "id": "InstancesAddResourcePoliciesRequest", + "InstantSnapshotsExportRequest": { + "id": "InstantSnapshotsExportRequest", "properties": { - "resourcePolicies": { - "description": "Resource policies to be added to this instance.", - "items": { - "type": "string" - }, - "type": "array" + "exportParams": { + "$ref": "InstantSnapshotExportParams", + "description": "Parameters to export the changed blocks." } }, "type": "object" }, - "InstancesGetEffectiveFirewallsResponse": { - "id": "InstancesGetEffectiveFirewallsResponse", + "InstantSnapshotsScopedList": { + "id": "InstantSnapshotsScopedList", "properties": { - "firewallPolicys": { - "description": "Effective firewalls from firewall policies.", + "instantSnapshots": { + "description": "[Output Only] A list of instantSnapshots contained in this scope.", "items": { - "$ref": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - }, - "type": "array" - }, - "firewalls": { - "description": "Effective firewalls on the instance.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - }, - "organizationFirewalls": { - "description": "Effective firewalls from organization policies.", - "items": { - "$ref": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { - "id": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - "properties": { - "displayName": { - "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the firewall policy.", - "type": "string" - }, - "rules": { - "description": "The rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "shortName": { - "description": "[Output Only] The short name of the firewall policy.", - "type": "string" - }, - "type": { - "description": "[Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL.", - "enum": [ - "HIERARCHY", - "NETWORK", - "NETWORK_REGIONAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy": { - "description": "A pruned SecurityPolicy containing ID and any applicable firewall rules.", - "id": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy", - "properties": { - "id": { - "description": "The unique identifier for the security policy. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "rules": { - "description": "The rules that apply to the network.", - "items": { - "$ref": "SecurityPolicyRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesRemoveResourcePoliciesRequest": { - "id": "InstancesRemoveResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be removed from this instance.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesResumeRequest": { - "id": "InstancesResumeRequest", - "properties": { - "disks": { - "description": "Array of disks associated with this instance that are protected with a customer-supplied encryption key. In order to resume the instance, the disk url and its corresponding key must be provided. If the disk is not protected with a customer-supplied encryption key it should not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - }, - "type": "array" - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with an instance that is protected with a customer-supplied encryption key. If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance resume will not succeed." - } - }, - "type": "object" - }, - "InstancesScopedList": { - "id": "InstancesScopedList", - "properties": { - "instances": { - "description": "[Output Only] A list of instances contained in this scope.", - "items": { - "$ref": "Instance" + "$ref": "InstantSnapshot" }, "type": "array" }, "warning": { - "description": "[Output Only] Informational warning which replaces the list of instances when the list is empty.", + "description": "[Output Only] Informational warning which replaces the list of instantSnapshots when the list is empty.", "properties": { "code": { "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", @@ -50812,100 +52644,6 @@ }, "type": "object" }, - "InstancesSetLabelsRequest": { - "id": "InstancesSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - }, - "InstancesSetMachineResourcesRequest": { - "id": "InstancesSetMachineResourcesRequest", - "properties": { - "guestAccelerators": { - "description": "A list of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesSetMachineTypeRequest": { - "id": "InstancesSetMachineTypeRequest", - "properties": { - "machineType": { - "description": "Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetMinCpuPlatformRequest": { - "id": "InstancesSetMinCpuPlatformRequest", - "properties": { - "minCpuPlatform": { - "description": "Minimum cpu/platform this instance should be started at.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetNameRequest": { - "id": "InstancesSetNameRequest", - "properties": { - "currentName": { - "description": "The current name of this resource, used to prevent conflicts. Provide the latest name when making a request to change name.", - "type": "string" - }, - "name": { - "description": "The name to be applied to the instance. Needs to be RFC 1035 compliant.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetServiceAccountRequest": { - "id": "InstancesSetServiceAccountRequest", - "properties": { - "email": { - "description": "Email address of the service account.", - "type": "string" - }, - "scopes": { - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesStartWithEncryptionKeyRequest": { - "id": "InstancesStartWithEncryptionKeyRequest", - "properties": { - "disks": { - "description": "Array of disks associated with this instance that are protected with a customer-supplied encryption key. In order to start the instance, the disk url and its corresponding key must be provided. If the disk is not protected with a customer-supplied encryption key it should not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - }, - "type": "array" - } - }, - "type": "object" - }, "Int64RangeMatch": { "description": "HttpRouteRuleMatch criteria for field values that must stay within the specified integer range.", "id": "Int64RangeMatch", @@ -51059,6 +52797,10 @@ "format": "int32", "type": "integer" }, + "remoteLocation": { + "description": "Indicates that this is a Cross-Cloud Interconnect. This field specifies the location outside of Google's network that the interconnect is connected to.", + "type": "string" + }, "requestedLinkCount": { "description": "Target number of physical links in the link bundle, as requested by the customer.", "format": "int32", @@ -51153,6 +52895,10 @@ "description": "This field is not available.", "type": "string" }, + "configurationConstraints": { + "$ref": "InterconnectAttachmentConfigurationConstraints", + "description": "[Output Only] Constraints for this attachment, if any. The attachment does not work if these constraints are not met." + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -51284,6 +53030,10 @@ "description": "[Output Only] URL of the region where the regional interconnect attachment resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", "type": "string" }, + "remoteService": { + "description": "[Output Only] If the attachment is on a Cross-Cloud Interconnect connection, this field contains the interconnect's remote location service provider. Example values: \"Amazon Web Services\" \"Microsoft Azure\". The field is set only for attachments on Cross-Cloud Interconnect connections. Its value is copied from the InterconnectRemoteLocation remoteService field.", + "type": "string" + }, "router": { "description": "URL of the Cloud Router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.", "type": "string" @@ -51330,6 +53080,11 @@ ], "type": "string" }, + "subnetLength": { + "description": "Length of the IPv4 subnet mask. Allowed values: - 29 (default) - 30 The default value is 29, except for Cross-Cloud Interconnect connections that use an InterconnectRemoteLocation with a constraints.subnetLengthRange.min equal to 30. For example, connections that use an Azure remote location fall into this category. In these cases, the default value is 30, and requesting 29 returns an error. Where both 29 and 30 are allowed, 29 is preferred, because it gives Google Cloud Support more debugging visibility. ", + "format": "int32", + "type": "integer" + }, "type": { "description": "The type of interconnect attachment this is, which can take one of the following values: - DEDICATED: an attachment to a Dedicated Interconnect. - PARTNER: an attachment to a Partner Interconnect, created by the customer. - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by the partner. ", "enum": [ @@ -51479,6 +53234,47 @@ }, "type": "object" }, + "InterconnectAttachmentConfigurationConstraints": { + "id": "InterconnectAttachmentConfigurationConstraints", + "properties": { + "bgpMd5": { + "description": "[Output Only] Whether the attachment's BGP session requires/allows/disallows BGP MD5 authentication. This can take one of the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. For example, a Cross-Cloud Interconnect connection to a remote cloud provider that requires BGP MD5 authentication has the interconnectRemoteLocation attachment_configuration_constraints.bgp_md5 field set to MD5_REQUIRED, and that property is propagated to the attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if MD5 is requested.", + "enum": [ + "MD5_OPTIONAL", + "MD5_REQUIRED", + "MD5_UNSUPPORTED" + ], + "enumDescriptions": [ + "MD5_OPTIONAL: BGP MD5 authentication is supported and can optionally be configured.", + "MD5_REQUIRED: BGP MD5 authentication must be configured.", + "MD5_UNSUPPORTED: BGP MD5 authentication must not be configured" + ], + "type": "string" + }, + "bgpPeerAsnRanges": { + "description": "[Output Only] List of ASN ranges that the remote location is known to support. Formatted as an array of inclusive ranges {min: min-value, max: max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}] allows the peer ASN to be 123 or anything in the range 64512-65534. This field is only advisory. Although the API accepts other ranges, these are the ranges that we recommend.", + "items": { + "$ref": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" + }, + "type": "array" + } + }, + "type": "object" + }, + "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange": { + "id": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", + "properties": { + "max": { + "format": "uint32", + "type": "integer" + }, + "min": { + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, "InterconnectAttachmentList": { "description": "Response to the list request, and contains a list of interconnect attachments.", "id": "InterconnectAttachmentList", @@ -52100,10 +53896,364 @@ "type": "string" }, "kind": { - "default": "compute#interconnectLocation", - "description": "[Output Only] Type of the resource. Always compute#interconnectLocation for interconnect locations.", + "default": "compute#interconnectLocation", + "description": "[Output Only] Type of the resource. Always compute#interconnectLocation for interconnect locations.", + "type": "string" + }, + "name": { + "description": "[Output Only] Name of the resource.", + "type": "string" + }, + "peeringdbFacilityId": { + "description": "[Output Only] The peeringdb identifier for this facility (corresponding with a netfac type in peeringdb).", + "type": "string" + }, + "regionInfos": { + "description": "[Output Only] A list of InterconnectLocation.RegionInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Google Cloud regions.", + "items": { + "$ref": "InterconnectLocationRegionInfo" + }, + "type": "array" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "status": { + "description": "[Output Only] The status of this InterconnectLocation, which can take one of the following values: - CLOSED: The InterconnectLocation is closed and is unavailable for provisioning new Interconnects. - AVAILABLE: The InterconnectLocation is available for provisioning new Interconnects. ", + "enum": [ + "AVAILABLE", + "CLOSED" + ], + "enumDescriptions": [ + "The InterconnectLocation is available for provisioning new Interconnects.", + "The InterconnectLocation is closed for provisioning new Interconnects." + ], + "type": "string" + }, + "supportsPzs": { + "description": "[Output Only] Reserved for future use.", + "type": "boolean" + } + }, + "type": "object" + }, + "InterconnectLocationList": { + "description": "Response to the list request, and contains a list of interconnect locations.", + "id": "InterconnectLocationList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of InterconnectLocation resources.", + "items": { + "$ref": "InterconnectLocation" + }, + "type": "array" + }, + "kind": { + "default": "compute#interconnectLocationList", + "description": "[Output Only] Type of resource. Always compute#interconnectLocationList for lists of interconnect locations.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InterconnectLocationRegionInfo": { + "description": "Information about any potential InterconnectAttachments between an Interconnect at a specific InterconnectLocation, and a specific Cloud Region.", + "id": "InterconnectLocationRegionInfo", + "properties": { + "expectedRttMs": { + "description": "Expected round-trip time in milliseconds, from this InterconnectLocation to a VM in this region.", + "format": "int64", + "type": "string" + }, + "locationPresence": { + "description": "Identifies the network presence of this location.", + "enum": [ + "GLOBAL", + "LOCAL_REGION", + "LP_GLOBAL", + "LP_LOCAL_REGION" + ], + "enumDescriptions": [ + "This region is not in any common network presence with this InterconnectLocation.", + "This region shares the same regional network presence as this InterconnectLocation.", + "[Deprecated] This region is not in any common network presence with this InterconnectLocation.", + "[Deprecated] This region shares the same regional network presence as this InterconnectLocation." + ], + "type": "string" + }, + "region": { + "description": "URL for the region of this location.", + "type": "string" + } + }, + "type": "object" + }, + "InterconnectOutageNotification": { + "description": "Description of a planned outage on this Interconnect.", + "id": "InterconnectOutageNotification", + "properties": { + "affectedCircuits": { + "description": "If issue_type is IT_PARTIAL_OUTAGE, a list of the Google-side circuit IDs that will be affected.", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "A description about the purpose of the outage.", + "type": "string" + }, + "endTime": { + "description": "Scheduled end time for the outage (milliseconds since Unix epoch).", + "format": "int64", + "type": "string" + }, + "issueType": { + "description": "Form this outage is expected to take, which can take one of the following values: - OUTAGE: The Interconnect may be completely out of service for some or all of the specified window. - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole should remain up, but with reduced bandwidth. Note that the versions of this enum prefixed with \"IT_\" have been deprecated in favor of the unprefixed values.", + "enum": [ + "IT_OUTAGE", + "IT_PARTIAL_OUTAGE", + "OUTAGE", + "PARTIAL_OUTAGE" + ], + "enumDescriptions": [ + "[Deprecated] The Interconnect may be completely out of service for some or all of the specified window.", + "[Deprecated] Some circuits comprising the Interconnect will be out of service during the expected window. The interconnect as a whole should remain up, albeit with reduced bandwidth.", + "The Interconnect may be completely out of service for some or all of the specified window.", + "Some circuits comprising the Interconnect will be out of service during the expected window. The interconnect as a whole should remain up, albeit with reduced bandwidth." + ], + "type": "string" + }, + "name": { + "description": "Unique identifier for this outage notification.", + "type": "string" + }, + "source": { + "description": "The party that generated this notification, which can take the following value: - GOOGLE: this notification as generated by Google. Note that the value of NSRC_GOOGLE has been deprecated in favor of GOOGLE.", + "enum": [ + "GOOGLE", + "NSRC_GOOGLE" + ], + "enumDescriptions": [ + "This notification was generated by Google.", + "[Deprecated] This notification was generated by Google." + ], + "type": "string" + }, + "startTime": { + "description": "Scheduled start time for the outage (milliseconds since Unix epoch).", + "format": "int64", + "type": "string" + }, + "state": { + "description": "State of this notification, which can take one of the following values: - ACTIVE: This outage notification is active. The event could be in the past, present, or future. See start_time and end_time for scheduling. - CANCELLED: The outage associated with this notification was cancelled before the outage was due to start. - COMPLETED: The outage associated with this notification is complete. Note that the versions of this enum prefixed with \"NS_\" have been deprecated in favor of the unprefixed values.", + "enum": [ + "ACTIVE", + "CANCELLED", + "COMPLETED", + "NS_ACTIVE", + "NS_CANCELED" + ], + "enumDescriptions": [ + "This outage notification is active. The event could be in the future, present, or past. See start_time and end_time for scheduling.", + "The outage associated with this notification was cancelled before the outage was due to start.", + "The outage associated with this notification is complete.", + "[Deprecated] This outage notification is active. The event could be in the future, present, or past. See start_time and end_time for scheduling.", + "[Deprecated] The outage associated with this notification was canceled before the outage was due to start." + ], + "type": "string" + } + }, + "type": "object" + }, + "InterconnectRemoteLocation": { + "description": "Represents a Cross-Cloud Interconnect Remote Location resource. You can use this resource to find remote location details about an Interconnect attachment (VLAN).", + "id": "InterconnectRemoteLocation", + "properties": { + "address": { + "description": "[Output Only] The postal address of the Point of Presence, each line in the address is separated by a newline character.", + "type": "string" + }, + "attachmentConfigurationConstraints": { + "$ref": "InterconnectAttachmentConfigurationConstraints", + "description": "[Output Only] Subset of fields from InterconnectAttachment's |configurationConstraints| field that apply to all attachments for this remote location." + }, + "city": { + "description": "[Output Only] Metropolitan area designator that indicates which city an interconnect is located. For example: \"Chicago, IL\", \"Amsterdam, Netherlands\".", + "type": "string" + }, + "constraints": { + "$ref": "InterconnectRemoteLocationConstraints", + "description": "[Output Only] Constraints on the parameters for creating Cross-Cloud Interconnect and associated InterconnectAttachments." + }, + "continent": { + "description": "[Output Only] Continent for this location, which can take one of the following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - SOUTH_AMERICA ", + "enum": [ + "AFRICA", + "ASIA_PAC", + "EUROPE", + "NORTH_AMERICA", + "SOUTH_AMERICA" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "[Output Only] An optional description of the resource.", + "type": "string" + }, + "facilityProvider": { + "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX).", + "type": "string" + }, + "facilityProviderFacilityId": { + "description": "[Output Only] A provider-assigned Identifier for this facility (e.g., Ashburn-DC1).", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#interconnectRemoteLocation", + "description": "[Output Only] Type of the resource. Always compute#interconnectRemoteLocation for interconnect remote locations.", + "type": "string" + }, + "lacp": { + "description": "[Output Only] Link Aggregation Control Protocol (LACP) constraints, which can take one of the following values: LACP_SUPPORTED, LACP_UNSUPPORTED", + "enum": [ + "LACP_SUPPORTED", + "LACP_UNSUPPORTED" + ], + "enumDescriptions": [ + "LACP_SUPPORTED: LACP is supported, and enabled by default on the Cross-Cloud Interconnect.", + "LACP_UNSUPPORTED: LACP is not supported and is not be enabled on this port. GetDiagnostics shows bundleAggregationType as \"static\". GCP does not support LAGs without LACP, so requestedLinkCount must be 1." + ], "type": "string" }, + "maxLagSize100Gbps": { + "description": "[Output Only] The maximum number of 100 Gbps ports supported in a link aggregation group (LAG). When linkType is 100 Gbps, requestedLinkCount cannot exceed max_lag_size_100_gbps.", + "format": "int32", + "type": "integer" + }, + "maxLagSize10Gbps": { + "description": "[Output Only] The maximum number of 10 Gbps ports supported in a link aggregation group (LAG). When linkType is 10 Gbps, requestedLinkCount cannot exceed max_lag_size_10_gbps.", + "format": "int32", + "type": "integer" + }, "name": { "description": "[Output Only] Name of the resource.", "type": "string" @@ -52112,58 +54262,106 @@ "description": "[Output Only] The peeringdb identifier for this facility (corresponding with a netfac type in peeringdb).", "type": "string" }, - "regionInfos": { - "description": "[Output Only] A list of InterconnectLocation.RegionInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Google Cloud regions.", + "permittedConnections": { + "description": "[Output Only] Permitted connections.", "items": { - "$ref": "InterconnectLocationRegionInfo" + "$ref": "InterconnectRemoteLocationPermittedConnections" }, "type": "array" }, + "remoteService": { + "description": "[Output Only] Indicates the service provider present at the remote location. Example values: \"Amazon Web Services\", \"Microsoft Azure\".", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, "status": { - "description": "[Output Only] The status of this InterconnectLocation, which can take one of the following values: - CLOSED: The InterconnectLocation is closed and is unavailable for provisioning new Interconnects. - AVAILABLE: The InterconnectLocation is available for provisioning new Interconnects. ", + "description": "[Output Only] The status of this InterconnectRemoteLocation, which can take one of the following values: - CLOSED: The InterconnectRemoteLocation is closed and is unavailable for provisioning new Cross-Cloud Interconnects. - AVAILABLE: The InterconnectRemoteLocation is available for provisioning new Cross-Cloud Interconnects. ", "enum": [ "AVAILABLE", "CLOSED" ], "enumDescriptions": [ - "The InterconnectLocation is available for provisioning new Interconnects.", - "The InterconnectLocation is closed for provisioning new Interconnects." + "The InterconnectRemoteLocation is available for provisioning new Cross-Cloud Interconnects.", + "The InterconnectRemoteLocation is closed for provisioning new Cross-Cloud Interconnects." + ], + "type": "string" + } + }, + "type": "object" + }, + "InterconnectRemoteLocationConstraints": { + "id": "InterconnectRemoteLocationConstraints", + "properties": { + "portPairRemoteLocation": { + "description": "[Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location.", + "enum": [ + "PORT_PAIR_MATCHING_REMOTE_LOCATION", + "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" + ], + "enumDescriptions": [ + "If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider allocates ports in pairs, and the user should choose the same remote location for both ports.", + "If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision a redundant pair of Cross-Cloud Interconnects using two different remote locations in the same city." ], "type": "string" }, - "supportsPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" + "portPairVlan": { + "description": "[Output Only] Port pair VLAN constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN", + "enum": [ + "PORT_PAIR_MATCHING_VLAN", + "PORT_PAIR_UNCONSTRAINED_VLAN" + ], + "enumDescriptions": [ + "If PORT_PAIR_MATCHING_VLAN, the Interconnect for this attachment is part of a pair of ports that should have matching VLAN allocations. This occurs with Cross-Cloud Interconnect to Azure remote locations. While GCP's API does not explicitly group pairs of ports, the UI uses this field to ensure matching VLAN ids when configuring a redundant VLAN pair.", + "PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint." + ], + "type": "string" + }, + "subnetLengthRange": { + "$ref": "InterconnectRemoteLocationConstraintsSubnetLengthRange", + "description": "[Output Only] [min-length, max-length] The minimum and maximum value (inclusive) for the IPv4 subnet length. For example, an interconnectRemoteLocation for Azure has {min: 30, max: 30} because Azure requires /30 subnets. This range specifies the values supported by both cloud providers. Interconnect currently supports /29 and /30 IPv4 subnet lengths. If a remote cloud has no constraint on IPv4 subnet length, the range would thus be {min: 29, max: 30}. " } }, "type": "object" }, - "InterconnectLocationList": { - "description": "Response to the list request, and contains a list of interconnect locations.", - "id": "InterconnectLocationList", + "InterconnectRemoteLocationConstraintsSubnetLengthRange": { + "id": "InterconnectRemoteLocationConstraintsSubnetLengthRange", + "properties": { + "max": { + "format": "int32", + "type": "integer" + }, + "min": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InterconnectRemoteLocationList": { + "description": "Response to the list request, and contains a list of interconnect remote locations.", + "id": "InterconnectRemoteLocationList", "properties": { "id": { "description": "[Output Only] Unique identifier for the resource; defined by the server.", "type": "string" }, "items": { - "description": "A list of InterconnectLocation resources.", + "description": "A list of InterconnectRemoteLocation resources.", "items": { - "$ref": "InterconnectLocation" + "$ref": "InterconnectRemoteLocation" }, "type": "array" }, "kind": { - "default": "compute#interconnectLocationList", - "description": "[Output Only] Type of resource. Always compute#interconnectLocationList for lists of interconnect locations.", + "default": "compute#interconnectRemoteLocationList", + "description": "[Output Only] Type of resource. Always compute#interconnectRemoteLocationList for lists of interconnect remote locations.", "type": "string" }, "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "description": "[Output Only] This token lets you get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", "type": "string" }, "selfLink": { @@ -52262,111 +54460,11 @@ }, "type": "object" }, - "InterconnectLocationRegionInfo": { - "description": "Information about any potential InterconnectAttachments between an Interconnect at a specific InterconnectLocation, and a specific Cloud Region.", - "id": "InterconnectLocationRegionInfo", + "InterconnectRemoteLocationPermittedConnections": { + "id": "InterconnectRemoteLocationPermittedConnections", "properties": { - "expectedRttMs": { - "description": "Expected round-trip time in milliseconds, from this InterconnectLocation to a VM in this region.", - "format": "int64", - "type": "string" - }, - "locationPresence": { - "description": "Identifies the network presence of this location.", - "enum": [ - "GLOBAL", - "LOCAL_REGION", - "LP_GLOBAL", - "LP_LOCAL_REGION" - ], - "enumDescriptions": [ - "This region is not in any common network presence with this InterconnectLocation.", - "This region shares the same regional network presence as this InterconnectLocation.", - "[Deprecated] This region is not in any common network presence with this InterconnectLocation.", - "[Deprecated] This region shares the same regional network presence as this InterconnectLocation." - ], - "type": "string" - }, - "region": { - "description": "URL for the region of this location.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectOutageNotification": { - "description": "Description of a planned outage on this Interconnect.", - "id": "InterconnectOutageNotification", - "properties": { - "affectedCircuits": { - "description": "If issue_type is IT_PARTIAL_OUTAGE, a list of the Google-side circuit IDs that will be affected.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "A description about the purpose of the outage.", - "type": "string" - }, - "endTime": { - "description": "Scheduled end time for the outage (milliseconds since Unix epoch).", - "format": "int64", - "type": "string" - }, - "issueType": { - "description": "Form this outage is expected to take, which can take one of the following values: - OUTAGE: The Interconnect may be completely out of service for some or all of the specified window. - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole should remain up, but with reduced bandwidth. Note that the versions of this enum prefixed with \"IT_\" have been deprecated in favor of the unprefixed values.", - "enum": [ - "IT_OUTAGE", - "IT_PARTIAL_OUTAGE", - "OUTAGE", - "PARTIAL_OUTAGE" - ], - "enumDescriptions": [ - "[Deprecated] The Interconnect may be completely out of service for some or all of the specified window.", - "[Deprecated] Some circuits comprising the Interconnect will be out of service during the expected window. The interconnect as a whole should remain up, albeit with reduced bandwidth.", - "The Interconnect may be completely out of service for some or all of the specified window.", - "Some circuits comprising the Interconnect will be out of service during the expected window. The interconnect as a whole should remain up, albeit with reduced bandwidth." - ], - "type": "string" - }, - "name": { - "description": "Unique identifier for this outage notification.", - "type": "string" - }, - "source": { - "description": "The party that generated this notification, which can take the following value: - GOOGLE: this notification as generated by Google. Note that the value of NSRC_GOOGLE has been deprecated in favor of GOOGLE.", - "enum": [ - "GOOGLE", - "NSRC_GOOGLE" - ], - "enumDescriptions": [ - "This notification was generated by Google.", - "[Deprecated] This notification was generated by Google." - ], - "type": "string" - }, - "startTime": { - "description": "Scheduled start time for the outage (milliseconds since Unix epoch).", - "format": "int64", - "type": "string" - }, - "state": { - "description": "State of this notification, which can take one of the following values: - ACTIVE: This outage notification is active. The event could be in the past, present, or future. See start_time and end_time for scheduling. - CANCELLED: The outage associated with this notification was cancelled before the outage was due to start. - COMPLETED: The outage associated with this notification is complete. Note that the versions of this enum prefixed with \"NS_\" have been deprecated in favor of the unprefixed values.", - "enum": [ - "ACTIVE", - "CANCELLED", - "COMPLETED", - "NS_ACTIVE", - "NS_CANCELED" - ], - "enumDescriptions": [ - "This outage notification is active. The event could be in the future, present, or past. See start_time and end_time for scheduling.", - "The outage associated with this notification was cancelled before the outage was due to start.", - "The outage associated with this notification is complete.", - "[Deprecated] This outage notification is active. The event could be in the future, present, or past. See start_time and end_time for scheduling.", - "[Deprecated] The outage associated with this notification was canceled before the outage was due to start." - ], + "interconnectLocation": { + "description": "[Output Only] URL of an Interconnect location that is permitted to connect to this Interconnect remote location.", "type": "string" } }, @@ -53109,7 +55207,7 @@ "type": "integer" }, "guestAcceleratorType": { - "description": "The accelerator type resource name, not a full URL, e.g. 'nvidia-tesla-k80'.", + "description": "The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.", "type": "string" } }, @@ -53987,7 +56085,7 @@ "type": "string" }, "fingerprint": { - "description": "[Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch.", + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch.", "format": "byte", "type": "string" }, @@ -61775,6 +63873,16 @@ }, "type": "object" }, + "RegionInstantSnapshotsExportRequest": { + "id": "RegionInstantSnapshotsExportRequest", + "properties": { + "exportParams": { + "$ref": "InstantSnapshotExportParams", + "description": "Parameters to export the changed blocks." + } + }, + "type": "object" + }, "RegionList": { "description": "Contains a list of region resources.", "id": "RegionList", @@ -64469,7 +66577,7 @@ "type": "array" }, "sourceSubnetworkIpRangesToNat": { - "description": "Specify the Nat option, which can take one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat. - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.", + "description": "Specify the Nat option, which can take one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat. - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not be any other Router.Nat section in any Router for this network in this region.", "enum": [ "ALL_SUBNETWORKS_ALL_IP_RANGES", "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", @@ -65782,6 +67890,13 @@ "" ], "type": "string" + }, + "userDefinedFields": { + "description": "Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to 4 bytes extracted from a fixed offset in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an optional mask to select certain bits. Rules may then specify matching values for these fields. Example: userDefinedFields: - name: \"ipv4_fragment_offset\" base: IPV4 offset: 6 size: 2 mask: \"0x1fff\"", + "items": { + "$ref": "SecurityPolicyUserDefinedField" + }, + "type": "array" } }, "type": "object" @@ -66114,6 +68229,10 @@ "$ref": "SecurityPolicyRuleMatcher", "description": "A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced." }, + "networkMatch": { + "$ref": "SecurityPolicyRuleNetworkMatcher", + "description": "A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - \"192.0.2.0/24\" - \"198.51.100.0/24\" userDefinedFields: - name: \"ipv4_fragment_offset\" values: - \"1-0x1fff\" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named \"ipv4_fragment_offset\" with a value between 1 and 0x1fff inclusive." + }, "preconfiguredWafConfig": { "$ref": "SecurityPolicyRulePreconfiguredWafConfig", "description": "Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect." @@ -66201,6 +68320,10 @@ "$ref": "Expr", "description": "User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. Expressions containing `evaluateThreatIntelligence` require Cloud Armor Managed Protection Plus tier and are not supported in Edge Policies nor in Regional Policies. Expressions containing `evaluatePreconfiguredExpr('sourceiplist-*')` require Cloud Armor Managed Protection Plus tier and are only supported in Global Security Policies." }, + "exprOptions": { + "$ref": "SecurityPolicyRuleMatcherExprOptions", + "description": "The configuration options available when specifying a user defined CEVAL expression (i.e., 'expr')." + }, "versionedExpr": { "description": "Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.", "enum": [ @@ -66260,6 +68383,117 @@ }, "type": "object" }, + "SecurityPolicyRuleMatcherExprOptions": { + "id": "SecurityPolicyRuleMatcherExprOptions", + "properties": { + "recaptchaOptions": { + "$ref": "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions", + "description": "reCAPTCHA configuration options to be applied for the rule. If the rule does not evaluate reCAPTCHA tokens, this field will have no effect." + } + }, + "type": "object" + }, + "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions": { + "id": "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions", + "properties": { + "actionTokenSiteKeys": { + "description": "A list of site keys to be used during the validation of reCAPTCHA action-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sessionTokenSiteKeys": { + "description": "A list of site keys to be used during the validation of reCAPTCHA session-tokens. The provided site keys need to be created from reCAPTCHA API under the same project where the security policy is created.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "SecurityPolicyRuleNetworkMatcher": { + "description": "Represents a match condition that incoming network traffic is evaluated against.", + "id": "SecurityPolicyRuleNetworkMatcher", + "properties": { + "destIpRanges": { + "description": "Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "destPorts": { + "description": "Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "ipProtocols": { + "description": "IPv4 protocol / IPv6 next header (after extension headers). Each element can be an 8-bit unsigned decimal number (e.g. \"6\"), range (e.g. \"253-254\"), or one of the following protocol names: \"tcp\", \"udp\", \"icmp\", \"esp\", \"ah\", \"ipip\", or \"sctp\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcAsns": { + "description": "BGP Autonomous System Number associated with the source IP address.", + "items": { + "format": "uint32", + "type": "integer" + }, + "type": "array" + }, + "srcIpRanges": { + "description": "Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcPorts": { + "description": "Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcRegionCodes": { + "description": "Two-letter ISO 3166-1 alpha-2 country code associated with the source IP address.", + "items": { + "type": "string" + }, + "type": "array" + }, + "userDefinedFields": { + "description": "User-defined fields. Each element names a defined field and lists the matching values for that field.", + "items": { + "$ref": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch": { + "id": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch", + "properties": { + "name": { + "description": "Name of the user-defined field, as given in the definition.", + "type": "string" + }, + "values": { + "description": "Matching values of the field. Each element can be a 32-bit unsigned decimal or hexadecimal (starting with \"0x\") number (e.g. \"64\") or range (e.g. \"0x400-0x7ff\").", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "SecurityPolicyRulePreconfiguredWafConfig": { "id": "SecurityPolicyRulePreconfiguredWafConfig", "properties": { @@ -66488,6 +68722,46 @@ }, "type": "object" }, + "SecurityPolicyUserDefinedField": { + "id": "SecurityPolicyUserDefinedField", + "properties": { + "base": { + "description": "The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required", + "enum": [ + "IPV4", + "IPV6", + "TCP", + "UDP" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "mask": { + "description": "If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with \"0x\"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.", + "type": "string" + }, + "name": { + "description": "The name of this field. Must be unique within the policy.", + "type": "string" + }, + "offset": { + "description": "Offset of the first byte of the field (in network byte order) relative to 'base'.", + "format": "int32", + "type": "integer" + }, + "size": { + "description": "Size of the field in bytes. Valid values: 1-4.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "SecuritySettings": { "description": "The authentication and authorization settings for a BackendService.", "id": "SecuritySettings", @@ -66501,11 +68775,11 @@ "description": "The configuration needed to generate a signature for access to private storage buckets that support AWS's Signature Version 4 for authentication. Allowed only for INTERNET_IP_PORT and INTERNET_FQDN_PORT NEG backends." }, "clientTlsPolicy": { - "description": "Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service's backends. clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. If left blank, communications are not encrypted. Note: This field currently has no impact.", + "description": "Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service's backends. clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. If left blank, communications are not encrypted.", "type": "string" }, "subjectAltNames": { - "description": "Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate's subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service. Note that the contents of the server certificate's subjectAltName field are configured by the Public Key Infrastructure which provisions server identities. Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode). Note: This field currently has no impact.", + "description": "Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate's subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service. Note that the contents of the server certificate's subjectAltName field are configured by the Public Key Infrastructure which provisions server identities. Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode).", "items": { "type": "string" }, @@ -67393,6 +69667,7 @@ "name": { "annotations": { "required": [ + "compute.disks.createSnapshot", "compute.snapshots.insert" ] }, @@ -67436,6 +69711,14 @@ "description": "[Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.", "type": "string" }, + "sourceInstantSnapshot": { + "description": "The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot ", + "type": "string" + }, + "sourceInstantSnapshotId": { + "description": "[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.", + "type": "string" + }, "sourceSnapshotSchedulePolicy": { "description": "[Output Only] URL of the resource policy which created this scheduled snapshot.", "type": "string" @@ -68890,7 +71173,7 @@ "type": "string" }, "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "type": "boolean" }, "externalIpv6Prefix": { @@ -68972,7 +71255,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", @@ -68998,7 +71281,7 @@ "type": "string" }, "role": { - "description": "The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", + "description": "The role of subnetwork. Currently, this field is only used when purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ "ACTIVE", "BACKUP" @@ -69319,7 +71602,7 @@ "type": "string" }, "enable": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled.", + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. Flow logging isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "type": "boolean" }, "filterExpr": { @@ -70709,6 +72992,10 @@ "description": "The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this target instance.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -71123,6 +73410,10 @@ "description": "[Output Only] URL of the region where the target pool resides.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this target pool.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -73393,7 +75684,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", @@ -73411,7 +75702,7 @@ "type": "string" }, "role": { - "description": "The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", + "description": "The role of subnetwork. Currently, this field is only used when purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ "ACTIVE", "BACKUP" diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index e6241af9b36..1bf4994cfae 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -171,8 +171,10 @@ func New(client *http.Client) (*Service, error) { s.InstanceGroups = NewInstanceGroupsService(s) s.InstanceTemplates = NewInstanceTemplatesService(s) s.Instances = NewInstancesService(s) + s.InstantSnapshots = NewInstantSnapshotsService(s) s.InterconnectAttachments = NewInterconnectAttachmentsService(s) s.InterconnectLocations = NewInterconnectLocationsService(s) + s.InterconnectRemoteLocations = NewInterconnectRemoteLocationsService(s) s.Interconnects = NewInterconnectsService(s) s.LicenseCodes = NewLicenseCodesService(s) s.Licenses = NewLicensesService(s) @@ -202,6 +204,7 @@ func New(client *http.Client) (*Service, error) { s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) s.RegionInstanceTemplates = NewRegionInstanceTemplatesService(s) s.RegionInstances = NewRegionInstancesService(s) + s.RegionInstantSnapshots = NewRegionInstantSnapshotsService(s) s.RegionNetworkEndpointGroups = NewRegionNetworkEndpointGroupsService(s) s.RegionNetworkFirewallPolicies = NewRegionNetworkFirewallPoliciesService(s) s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) @@ -297,10 +300,14 @@ type Service struct { Instances *InstancesService + InstantSnapshots *InstantSnapshotsService + InterconnectAttachments *InterconnectAttachmentsService InterconnectLocations *InterconnectLocationsService + InterconnectRemoteLocations *InterconnectRemoteLocationsService + Interconnects *InterconnectsService LicenseCodes *LicenseCodesService @@ -359,6 +366,8 @@ type Service struct { RegionInstances *RegionInstancesService + RegionInstantSnapshots *RegionInstantSnapshotsService + RegionNetworkEndpointGroups *RegionNetworkEndpointGroupsService RegionNetworkFirewallPolicies *RegionNetworkFirewallPoliciesService @@ -671,6 +680,15 @@ type InstancesService struct { s *Service } +func NewInstantSnapshotsService(s *Service) *InstantSnapshotsService { + rs := &InstantSnapshotsService{s: s} + return rs +} + +type InstantSnapshotsService struct { + s *Service +} + func NewInterconnectAttachmentsService(s *Service) *InterconnectAttachmentsService { rs := &InterconnectAttachmentsService{s: s} return rs @@ -689,6 +707,15 @@ type InterconnectLocationsService struct { s *Service } +func NewInterconnectRemoteLocationsService(s *Service) *InterconnectRemoteLocationsService { + rs := &InterconnectRemoteLocationsService{s: s} + return rs +} + +type InterconnectRemoteLocationsService struct { + s *Service +} + func NewInterconnectsService(s *Service) *InterconnectsService { rs := &InterconnectsService{s: s} return rs @@ -950,6 +977,15 @@ type RegionInstancesService struct { s *Service } +func NewRegionInstantSnapshotsService(s *Service) *RegionInstantSnapshotsService { + rs := &RegionInstantSnapshotsService{s: s} + return rs +} + +type RegionInstantSnapshotsService struct { + s *Service +} + func NewRegionNetworkEndpointGroupsService(s *Service) *RegionNetworkEndpointGroupsService { rs := &RegionNetworkEndpointGroupsService{s: s} return rs @@ -2036,6 +2072,10 @@ type AccessConfig struct { // external IPv6 range. PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this access config. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SetPublicPtr: Specifies whether a public DNS 'PTR' record should be // created to map the external IP address of the instance to a DNS // domain name. This field is not used in ipv6AccessConfig. A default @@ -5772,6 +5812,10 @@ type BackendService struct { // loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED. MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` + // Metadatas: Deployment metadata associated with the resource to be set + // by a GKE hub controller and read by the backend RCTH + Metadatas map[string]string `json:"metadatas,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -9387,6 +9431,24 @@ type Disk struct { // version of the image that was used. SourceImageId string `json:"sourceImageId,omitempty"` + // SourceInstantSnapshot: The source instant snapshot used to create + // this disk. You can provide this as a partial or full URL to the + // resource. For example, the following are valid values: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /instantSnapshots/instantSnapshot - + // projects/project/zones/zone/instantSnapshots/instantSnapshot - + // zones/zone/instantSnapshots/instantSnapshot + SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` + + // SourceInstantSnapshotId: [Output Only] The unique ID of the instant + // snapshot used to create this disk. This value identifies the exact + // instant snapshot that was used to create this persistent disk. For + // example, if you created the persistent disk from an instant snapshot + // that was later deleted and recreated under the same name, the source + // instant snapshot ID would identify the exact version of the instant + // snapshot that was used. + SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` + // SourceSnapshot: The source snapshot used to create this disk. You can // provide this as a partial or full URL to the resource. For example, // the following are valid values: - @@ -12936,6 +12998,13 @@ type FirewallPolicyRule struct { // single firewall policy rule. RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` + // SecurityProfileGroup: A fully-qualified URL of a SecurityProfile + // resource instance. Example: + // https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group + // Must be specified if action = 'apply_security_profile_group' and + // cannot be specified for other actions. + SecurityProfileGroup string `json:"securityProfileGroup,omitempty"` + // TargetResources: A list of network resource URLs to which this rule // applies. This field allows you to control which network's VMs get // this rule. If this field is left blank, all VMs within the @@ -12958,6 +13027,11 @@ type FirewallPolicyRule struct { // of instances that are applied with this rule. TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` + // TlsInspect: Boolean flag indicating if the traffic should be TLS + // decrypted. Can be set only if action = 'apply_security_profile_group' + // and cannot be set for other actions. + TlsInspect bool `json:"tlsInspect,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -19798,13 +19872,14 @@ type InstanceGroupManagerAutoHealingPolicy struct { // HealthCheck: The URL for the health check that signals autohealing. HealthCheck string `json:"healthCheck,omitempty"` - // InitialDelaySec: The number of seconds that the managed instance - // group waits before it applies autohealing policies to new instances - // or recently recreated instances. This initial delay allows instances - // to initialize and run their startup scripts before the instance group - // determines that they are UNHEALTHY. This prevents the managed - // instance group from recreating its instances prematurely. This value - // must be from range [0, 3600]. + // InitialDelaySec: The initial delay is the number of seconds that a + // new VM takes to initialize and run its startup script. During a VM's + // initial delay period, the MIG ignores unsuccessful health checks + // because the VM might be in the startup process. This prevents the MIG + // from prematurely recreating a VM. If the health check receives a + // healthy response during the initial delay, it indicates that the + // startup process is complete and the VM is ready. The value of initial + // delay must be between 0 and 3600 seconds. The default value is 0. InitialDelaySec int64 `json:"initialDelaySec,omitempty"` // ForceSendFields is a list of field names (e.g. "HealthCheck") to @@ -23828,6 +23903,42 @@ func (s *InstancesSetNameRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesSetSecurityPolicyRequest struct { + // NetworkInterfaces: The network interfaces that the security policy + // will be applied to. Network interfaces use the nicN naming format. + // You can only set a security policy for network interfaces with an + // access config. + NetworkInterfaces []string `json:"networkInterfaces,omitempty"` + + // SecurityPolicy: A full or partial URL to a security policy to add to + // this instance. If this field is set to an empty string it will remove + // the associated security policy. + SecurityPolicy string `json:"securityPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkInterfaces") + // 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. "NetworkInterfaces") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancesSetSecurityPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstancesSetSecurityPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstancesSetServiceAccountRequest struct { // Email: Email address of the service account. Email string `json:"email,omitempty"` @@ -23890,418 +24001,53 @@ func (s *InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Int64RangeMatch: HttpRouteRuleMatch criteria for field values that -// must stay within the specified integer range. -type Int64RangeMatch struct { - // RangeEnd: The end of the range (exclusive) in signed long integer - // format. - RangeEnd int64 `json:"rangeEnd,omitempty,string"` - - // RangeStart: The start of the range (inclusive) in signed long integer - // format. - RangeStart int64 `json:"rangeStart,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "RangeEnd") 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. "RangeEnd") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Int64RangeMatch) MarshalJSON() ([]byte, error) { - type NoMethod Int64RangeMatch - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Interconnect: Represents an Interconnect resource. An Interconnect -// resource is a dedicated connection between the Google Cloud network -// and your on-premises network. For more information, read the -// Dedicated Interconnect Overview. -type Interconnect struct { - // AdminEnabled: Administrative status of the interconnect. When this is - // set to true, the Interconnect is functional and can carry traffic. - // When set to false, no packets can be carried over the interconnect - // and no BGP routes are exchanged over it. By default, the status is - // set to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - - // CircuitInfos: [Output Only] A list of CircuitInfo objects, that - // describe the individual circuits in this LAG. - CircuitInfos []*InterconnectCircuitInfo `json:"circuitInfos,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CustomerName: Customer name, to put in the Letter of Authorization as - // the party authorized to request a crossconnect. - CustomerName string `json:"customerName,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // ExpectedOutages: [Output Only] A list of outages expected for this - // Interconnect. - ExpectedOutages []*InterconnectOutageNotification `json:"expectedOutages,omitempty"` - - // GoogleIpAddress: [Output Only] IP address configured on the Google - // side of the Interconnect link. This can be used only for ping tests. - GoogleIpAddress string `json:"googleIpAddress,omitempty"` - - // GoogleReferenceId: [Output Only] Google reference ID to be used when - // raising support tickets with Google or otherwise to debug backend - // connectivity issues. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InterconnectAttachments: [Output Only] A list of the URLs of all - // InterconnectAttachments configured to use this Interconnect. - InterconnectAttachments []string `json:"interconnectAttachments,omitempty"` - - // InterconnectType: Type of interconnect, which can take one of the - // following values: - PARTNER: A partner-managed interconnection shared - // between customers though a partner. - DEDICATED: A dedicated physical - // interconnection with the customer. Note that a value IT_PRIVATE has - // been deprecated in favor of DEDICATED. - // - // Possible values: - // "DEDICATED" - A dedicated physical interconnection with the - // customer. - // "IT_PRIVATE" - [Deprecated] A private, physical interconnection - // with the customer. - // "PARTNER" - A partner-managed interconnection shared between - // customers via partner. - InterconnectType string `json:"interconnectType,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#interconnect - // for interconnects. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // Interconnect, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels, otherwise the request will fail with error - // 412 conditionNotMet. To see the latest fingerprint, make a get() - // request to retrieve an Interconnect. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels for this resource. These can only be added or modified - // by the setLabels method. Each label key/value pair must comply with - // RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // LinkType: Type of link requested, which can take one of the following - // values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - - // LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. Note that - // this field indicates the speed of each of the links in the bundle, - // not the speed of the entire bundle. - // - // Possible values: - // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. - // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. [(rate_bps) - // = 10000000000]; - LinkType string `json:"linkType,omitempty"` - - // Location: URL of the InterconnectLocation object that represents - // where this connection is to be provisioned. - Location string `json:"location,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NocContactEmail: Email address to contact the customer NOC for - // operations and maintenance notifications regarding this Interconnect. - // If specified, this will be used for notifications in addition to all - // other forms described, such as Cloud Monitoring logs alerting and - // Cloud Notifications. This field is required for users who sign up for - // Cloud Interconnect using workforce identity federation. - NocContactEmail string `json:"nocContactEmail,omitempty"` - - // OperationalStatus: [Output Only] The current status of this - // Interconnect's functionality, which can take one of the following - // values: - OS_ACTIVE: A valid Interconnect, which is turned up and is - // ready to use. Attachments may be provisioned on this Interconnect. - - // OS_UNPROVISIONED: An Interconnect that has not completed turnup. No - // attachments may be provisioned on this Interconnect. - - // OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal - // maintenance. No attachments may be provisioned or updated on this - // Interconnect. - // - // Possible values: - // "OS_ACTIVE" - The interconnect is valid, turned up, and ready to - // use. Attachments may be provisioned on this interconnect. - // "OS_UNPROVISIONED" - The interconnect has not completed turnup. No - // attachments may be provisioned on this interconnect. - OperationalStatus string `json:"operationalStatus,omitempty"` - - // PeerIpAddress: [Output Only] IP address configured on the customer - // side of the Interconnect link. The customer should configure this IP - // address during turnup when prompted by Google NOC. This can be used - // only for ping tests. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // ProvisionedLinkCount: [Output Only] Number of links actually - // provisioned in this interconnect. - ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"` - - // RequestedLinkCount: Target number of physical links in the link - // bundle, as requested by the customer. - RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` - - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // State: [Output Only] The current state of Interconnect functionality, - // which can take one of the following values: - ACTIVE: The - // Interconnect is valid, turned up and ready to use. Attachments may be - // provisioned on this Interconnect. - UNPROVISIONED: The Interconnect - // has not completed turnup. No attachments may be provisioned on this - // Interconnect. - UNDER_MAINTENANCE: The Interconnect is undergoing - // internal maintenance. No attachments may be provisioned or updated on - // this Interconnect. - // - // Possible values: - // "ACTIVE" - The interconnect is valid, turned up, and ready to use. - // Attachments may be provisioned on this interconnect. - // "UNPROVISIONED" - The interconnect has not completed turnup. No - // attachments may be provisioned on this interconnect. - State string `json:"state,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AdminEnabled") 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. "AdminEnabled") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Interconnect) MarshalJSON() ([]byte, error) { - type NoMethod Interconnect - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachment: Represents an Interconnect Attachment (VLAN) -// resource. You can use Interconnect attachments (VLANS) to connect -// your Virtual Private Cloud networks to your on-premises networks -// through an Interconnect. For more information, read Creating VLAN -// Attachments. -type InterconnectAttachment struct { - // AdminEnabled: Determines whether this Attachment will carry packets. - // Not present for PARTNER_PROVIDER. - AdminEnabled bool `json:"adminEnabled,omitempty"` - - // Bandwidth: Provisioned bandwidth capacity for the interconnect - // attachment. For attachments of type DEDICATED, the user can set the - // bandwidth. For attachments of type PARTNER, the Google Partner that - // is operating the interconnect must set the bandwidth. Output only for - // PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can - // take one of the following values: - BPS_50M: 50 Mbit/s - BPS_100M: - // 100 Mbit/s - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - BPS_400M: - // 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: 1 Gbit/s - BPS_2G: 2 - // Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - BPS_20G: 20 Gbit/s - - // BPS_50G: 50 Gbit/s +// InstantSnapshot: Represents a InstantSnapshot resource. You can use +// instant snapshots to create disk rollback points quickly.. +type InstantSnapshot struct { + // Architecture: [Output Only] The architecture of the instant snapshot. + // Valid values are ARM64 or X86_64. // // Possible values: - // "BPS_100M" - 100 Mbit/s - // "BPS_10G" - 10 Gbit/s - // "BPS_1G" - 1 Gbit/s - // "BPS_200M" - 200 Mbit/s - // "BPS_20G" - 20 Gbit/s - // "BPS_2G" - 2 Gbit/s - // "BPS_300M" - 300 Mbit/s - // "BPS_400M" - 400 Mbit/s - // "BPS_500M" - 500 Mbit/s - // "BPS_50G" - 50 Gbit/s - // "BPS_50M" - 50 Mbit/s - // "BPS_5G" - 5 Gbit/s - Bandwidth string `json:"bandwidth,omitempty"` - - // CandidateIpv6Subnets: This field is not available. - CandidateIpv6Subnets []string `json:"candidateIpv6Subnets,omitempty"` - - // CandidateSubnets: Up to 16 candidate prefixes that can be used to - // restrict the allocation of cloudRouterIpAddress and - // customerRouterIpAddress for this attachment. All prefixes must be - // within link-local address space (169.254.0.0/16) and must be /29 or - // shorter (/28, /27, etc). Google will attempt to select an unused /29 - // from the supplied candidate prefix(es). The request will fail if all - // possible /29s are in use on Google's edge. If not supplied, Google - // will randomly select an unused /29 from all of link-local space. - CandidateSubnets []string `json:"candidateSubnets,omitempty"` - - // CloudRouterIpAddress: [Output Only] IPv4 address + prefix length to - // be configured on Cloud Router Interface for this interconnect - // attachment. - CloudRouterIpAddress string `json:"cloudRouterIpAddress,omitempty"` - - // CloudRouterIpv6Address: [Output Only] IPv6 address + prefix length to - // be configured on Cloud Router Interface for this interconnect - // attachment. - CloudRouterIpv6Address string `json:"cloudRouterIpv6Address,omitempty"` - - // CloudRouterIpv6InterfaceId: This field is not available. - CloudRouterIpv6InterfaceId string `json:"cloudRouterIpv6InterfaceId,omitempty"` + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture + // is not set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomerRouterIpAddress: [Output Only] IPv4 address + prefix length - // to be configured on the customer router subinterface for this - // interconnect attachment. - CustomerRouterIpAddress string `json:"customerRouterIpAddress,omitempty"` - - // CustomerRouterIpv6Address: [Output Only] IPv6 address + prefix length - // to be configured on the customer router subinterface for this - // interconnect attachment. - CustomerRouterIpv6Address string `json:"customerRouterIpv6Address,omitempty"` - - // CustomerRouterIpv6InterfaceId: This field is not available. - CustomerRouterIpv6InterfaceId string `json:"customerRouterIpv6InterfaceId,omitempty"` - - // DataplaneVersion: [Output Only] Dataplane version for this - // InterconnectAttachment. This field is only present for Dataplane - // version 2 and higher. Absence of this field in the API output - // indicates that the Dataplane is version 1. - DataplaneVersion int64 `json:"dataplaneVersion,omitempty"` - - // Description: An optional description of this resource. + // Description: An optional description of this resource. Provide this + // property when you create the resource. Description string `json:"description,omitempty"` - // EdgeAvailabilityDomain: Desired availability domain for the - // attachment. Only available for type PARTNER, at creation time, and - // can take one of the following values: - AVAILABILITY_DOMAIN_ANY - - // AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved - // reliability, customers should configure a pair of attachments, one - // per availability domain. The selected availability domain will be - // provided to the Partner via the pairing key, so that the provisioned - // circuit will lie in the specified domain. If not specified, the value - // will default to AVAILABILITY_DOMAIN_ANY. - // - // Possible values: - // "AVAILABILITY_DOMAIN_1" - // "AVAILABILITY_DOMAIN_2" - // "AVAILABILITY_DOMAIN_ANY" - EdgeAvailabilityDomain string `json:"edgeAvailabilityDomain,omitempty"` - - // Encryption: Indicates the user-supplied encryption option of this - // VLAN attachment (interconnectAttachment). Can only be specified at - // attachment creation for PARTNER or DEDICATED attachments. Possible - // values are: - NONE - This is the default value, which means that the - // VLAN attachment carries unencrypted traffic. VMs are able to send - // traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - // - The VLAN attachment carries only encrypted traffic that is - // encrypted by an IPsec device, such as an HA VPN gateway or - // third-party IPsec VPN. VMs cannot directly send traffic to, or - // receive traffic from, such a VLAN attachment. To use *HA VPN over - // Cloud Interconnect*, the VLAN attachment must be created with this - // option. - // - // Possible values: - // "IPSEC" - The interconnect attachment will carry only encrypted - // traffic that is encrypted by an IPsec device such as HA VPN gateway; - // VMs cannot directly send traffic to or receive traffic from such an - // interconnect attachment. To use HA VPN over Cloud Interconnect, the - // interconnect attachment must be created with this option. - // "NONE" - This is the default value, which means the Interconnect - // Attachment will carry unencrypted traffic. VMs will be able to send - // traffic to or receive traffic from such interconnect attachment. - Encryption string `json:"encryption,omitempty"` - - // GoogleReferenceId: [Output Only] Google reference ID, to be used when - // raising support tickets with Google or otherwise to debug backend - // connectivity issues. [Deprecated] This field is not used. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` + // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Interconnect: URL of the underlying Interconnect object that this - // attachment's traffic will traverse through. - Interconnect string `json:"interconnect,omitempty"` - - // IpsecInternalAddresses: A list of URLs of addresses that have been - // reserved for the VLAN attachment. Used only for the VLAN attachment - // that has the encryption option as IPSEC. The addresses must be - // regional internal IP address ranges. When creating an HA VPN gateway - // over the VLAN attachment, if the attachment is configured to use a - // regional internal IP address, then the VPN gateway's IP address is - // allocated from the IP address range specified here. For example, if - // the HA VPN gateway's interface 0 is paired to this VLAN attachment, - // then a regional internal IP address for the VPN gateway interface 0 - // will be allocated from the IP address specified for this VLAN - // attachment. If this field is not specified when creating the VLAN - // attachment, then later on when creating an HA VPN gateway on this - // VLAN attachment, the HA VPN gateway's IP address is allocated from - // the regional external IP address pool. - IpsecInternalAddresses []string `json:"ipsecInternalAddresses,omitempty"` - // Kind: [Output Only] Type of the resource. Always - // compute#interconnectAttachment for interconnect attachments. + // compute#instantSnapshot for InstantSnapshot resources. Kind string `json:"kind,omitempty"` // LabelFingerprint: A fingerprint for the labels being applied to this - // InterconnectAttachment, which is essentially a hash of the labels set - // used for optimistic locking. The fingerprint is initially generated - // by Compute Engine and changes after every request to modify or update + // InstantSnapshot, which is essentially a hash of the labels set used + // for optimistic locking. The fingerprint is initially generated by + // Compute Engine and changes after every request to modify or update // labels. You must always provide an up-to-date fingerprint hash in // order to update or change labels, otherwise the request will fail // with error 412 conditionNotMet. To see the latest fingerprint, make a - // get() request to retrieve an InterconnectAttachment. + // get() request to retrieve a InstantSnapshot. LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified - // by the setLabels method. Each label key/value pair must comply with - // RFC1035. Label values may be empty. + // Labels: Labels to apply to this InstantSnapshot. These can be later + // modified by the setLabels method. Label values may be empty. Labels map[string]string `json:"labels,omitempty"` - // Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing - // through this interconnect attachment. Only 1440 and 1500 are allowed. - // If not specified, the value will default to 1440. - Mtu int64 `json:"mtu,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource + // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means @@ -24310,52 +24056,14 @@ type InterconnectAttachment struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // OperationalStatus: [Output Only] The current status of whether or not - // this interconnect attachment is functional, which can take one of the - // following values: - OS_ACTIVE: The attachment has been turned up and - // is ready to use. - OS_UNPROVISIONED: The attachment is not ready to - // use yet, because turnup is not complete. - // - // Possible values: - // "OS_ACTIVE" - Indicates that attachment has been turned up and is - // ready to use. - // "OS_UNPROVISIONED" - Indicates that attachment is not ready to use - // yet, because turnup is not complete. - OperationalStatus string `json:"operationalStatus,omitempty"` - - // PairingKey: [Output only for type PARTNER. Input only for - // PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier - // of an PARTNER attachment used to initiate provisioning with a - // selected partner. Of the form "XXXXX/region/domain" - PairingKey string `json:"pairingKey,omitempty"` - - // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 - // Partner if they configured BGP on behalf of the customer. Output only - // for PARTNER type, input only for PARTNER_PROVIDER, not available for - // DEDICATED. - PartnerAsn int64 `json:"partnerAsn,omitempty,string"` - - // PartnerMetadata: Informational metadata about Partner attachments - // from Partners to display to customers. Output only for for PARTNER - // type, mutable for PARTNER_PROVIDER, not available for DEDICATED. - PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` - - // PrivateInterconnectInfo: [Output Only] Information specific to an - // InterconnectAttachment. This property is populated if the - // interconnect that this is attached to is of type DEDICATED. - PrivateInterconnectInfo *InterconnectAttachmentPrivateInfo `json:"privateInterconnectInfo,omitempty"` - - // Region: [Output Only] URL of the region where the regional - // interconnect attachment resides. You must specify this field as part - // of the HTTP request URL. It is not settable as a field in the request - // body. + // Region: [Output Only] URL of the region where the instant snapshot + // resides. You must specify this field as part of the HTTP request URL. + // It is not settable as a field in the request body. Region string `json:"region,omitempty"` - // Router: URL of the Cloud Router to be used for dynamic routing. This - // router must be in the same region as this InterconnectAttachment. The - // InterconnectAttachment will automatically connect the Interconnect to - // the network & region within which the Cloud Router is configured. - Router string `json:"router,omitempty"` + // ResourceStatus: [Output Only] Status information for the instant + // snapshot resource. + ResourceStatus *InstantSnapshotResourceStatus `json:"resourceStatus,omitempty"` // SatisfiesPzs: [Output Only] Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` @@ -24363,80 +24071,48 @@ type InterconnectAttachment struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for this interconnect attachment to - // identify whether the IPv6 feature is enabled or not. If not - // specified, IPV4_ONLY will be used. This field can be both set at - // interconnect attachments creation and update interconnect attachment - // operations. - // - // Possible values: - // "IPV4_IPV6" - The interconnect attachment can have both IPv4 and - // IPv6 addresses. - // "IPV4_ONLY" - The interconnect attachment will only be assigned - // IPv4 addresses. - StackType string `json:"stackType,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource's + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: [Output Only] The current state of this attachment's - // functionality. Enum values ACTIVE and UNPROVISIONED are shared by - // DEDICATED/PRIVATE, PARTNER, and PARTNER_PROVIDER interconnect - // attachments, while enum values PENDING_PARTNER, - // PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for only - // PARTNER and PARTNER_PROVIDER interconnect attachments. This state can - // take one of the following values: - ACTIVE: The attachment has been - // turned up and is ready to use. - UNPROVISIONED: The attachment is not - // ready to use yet, because turnup is not complete. - PENDING_PARTNER: - // A newly-created PARTNER attachment that has not yet been configured - // on the Partner side. - PARTNER_REQUEST_RECEIVED: A PARTNER attachment - // is in the process of provisioning after a PARTNER_PROVIDER attachment - // was created that references it. - PENDING_CUSTOMER: A PARTNER or - // PARTNER_PROVIDER attachment that is waiting for a customer to - // activate it. - DEFUNCT: The attachment was deleted externally and is - // no longer functional. This could be because the associated - // Interconnect was removed, or because the other side of a Partner - // attachment was deleted. - // - // Possible values: - // "ACTIVE" - Indicates that attachment has been turned up and is - // ready to use. - // "DEFUNCT" - The attachment was deleted externally and is no longer - // functional. This could be because the associated Interconnect was - // wiped out, or because the other side of a Partner attachment was - // deleted. - // "PARTNER_REQUEST_RECEIVED" - A PARTNER attachment is in the process - // of provisioning after a PARTNER_PROVIDER attachment was created that - // references it. - // "PENDING_CUSTOMER" - PARTNER or PARTNER_PROVIDER attachment that is - // waiting for the customer to activate. - // "PENDING_PARTNER" - A newly created PARTNER attachment that has not - // yet been configured on the Partner side. - // "STATE_UNSPECIFIED" - // "UNPROVISIONED" - Indicates that attachment is not ready to use - // yet, because turnup is not complete. - State string `json:"state,omitempty"` + // SourceDisk: URL of the source disk used to create this instant + // snapshot. Note that the source disk must be in the same zone/region + // as the instant snapshot to be created. This can be a full or valid + // partial URL. For example, the following are valid values: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /disks/disk - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /disks/disk - projects/project/zones/zone/disks/disk - + // projects/project/regions/region/disks/disk - zones/zone/disks/disk - + // regions/region/disks/disk + SourceDisk string `json:"sourceDisk,omitempty"` - // Type: The type of interconnect attachment this is, which can take one - // of the following values: - DEDICATED: an attachment to a Dedicated - // Interconnect. - PARTNER: an attachment to a Partner Interconnect, - // created by the customer. - PARTNER_PROVIDER: an attachment to a - // Partner Interconnect, created by the partner. + // SourceDiskId: [Output Only] The ID value of the disk used to create + // this InstantSnapshot. This value may be used to determine whether the + // InstantSnapshot was taken from the current or a previous instance of + // a given disk name. + SourceDiskId string `json:"sourceDiskId,omitempty"` + + // Status: [Output Only] The status of the instantSnapshot. This can be + // CREATING, DELETING, FAILED, or READY. // // Possible values: - // "DEDICATED" - Attachment to a dedicated interconnect. - // "PARTNER" - Attachment to a partner interconnect, created by the - // customer. - // "PARTNER_PROVIDER" - Attachment to a partner interconnect, created - // by the partner. - Type string `json:"type,omitempty"` + // "CREATING" - InstantSnapshot creation is in progress. + // "DELETING" - InstantSnapshot is currently being deleted. + // "FAILED" - InstantSnapshot creation failed. + // "READY" - InstantSnapshot has been created successfully. + Status string `json:"status,omitempty"` - // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the - // range 2-4093. Only specified at creation time. - VlanTag8021q int64 `json:"vlanTag8021q,omitempty"` + // Zone: [Output Only] URL of the zone where the instant snapshot + // resides. You must specify this field as part of the HTTP request URL. + // It is not settable as a field in the request body. + Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to + // ForceSendFields is a list of field names (e.g. "Architecture") 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 @@ -24444,7 +24120,7 @@ type InterconnectAttachment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include + // NullFields is a list of field names (e.g. "Architecture") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -24453,23 +24129,23 @@ type InterconnectAttachment struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachment) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachment +func (s *InstantSnapshot) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshot raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectAttachmentAggregatedList struct { +type InstantSnapshotAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachmentsScopedList resources. - Items map[string]InterconnectAttachmentsScopedList `json:"items,omitempty"` + // Items: A list of InstantSnapshotsScopedList resources. + Items map[string]InstantSnapshotsScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always - // compute#interconnectAttachmentAggregatedList for aggregated lists of - // interconnect attachments. + // compute#instantSnapshotAggregatedList for aggregated lists of + // instantSnapshots. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -24487,7 +24163,7 @@ type InterconnectAttachmentAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentAggregatedListWarning `json:"warning,omitempty"` + Warning *InstantSnapshotAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -24510,15 +24186,15 @@ type InterconnectAttachmentAggregatedList struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedList +func (s *InstantSnapshotAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentAggregatedListWarning: [Output Only] -// Informational warning message. -type InterconnectAttachmentAggregatedListWarning struct { +// InstantSnapshotAggregatedListWarning: [Output Only] Informational +// warning message. +type InstantSnapshotAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -24586,7 +24262,7 @@ type InterconnectAttachmentAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InterconnectAttachmentAggregatedListWarningData `json:"data,omitempty"` + Data []*InstantSnapshotAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -24609,13 +24285,13 @@ type InterconnectAttachmentAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedListWarning +func (s *InstantSnapshotAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectAttachmentAggregatedListWarningData struct { +type InstantSnapshotAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -24646,25 +24322,75 @@ type InterconnectAttachmentAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedListWarningData +func (s *InstantSnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentList: Response to the list request, and -// contains a list of interconnect attachments. -type InterconnectAttachmentList struct { +type InstantSnapshotExportParams struct { + // BaseInstantSnapshot: An optional base instant snapshot that this + // resource is compared against. If not specified, all blocks of this + // resource are exported. The base instant snapshot and this resource + // must be created from the same disk. The base instant snapshot must be + // created earlier in time than this resource. + BaseInstantSnapshot string `json:"baseInstantSnapshot,omitempty"` + + // BucketName: The name of an existing bucket in Cloud Storage where the + // changed blocks will be stored. The Google Service Account must have + // read and write access to this bucket. The bucket has to be in the + // same region as this resource. + BucketName string `json:"bucketName,omitempty"` + + // EncryptionKey: Encryption key used to encrypt the instant snapshot. + EncryptionKey *CustomerEncryptionKey `json:"encryptionKey,omitempty"` + + // ObjectName: Name of the output Bigstore object storing the changed + // blocks. Object name must be less than 1024 bytes in length. + ObjectName string `json:"objectName,omitempty"` + + // OutputType: The format of the output file. + // + // Possible values: + // "INVALID" + // "METADATA_AND_DATA" + // "METADATA_ONLY" + OutputType string `json:"outputType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BaseInstantSnapshot") + // 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. "BaseInstantSnapshot") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstantSnapshotExportParams) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotExportParams + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstantSnapshotList: Contains a list of InstantSnapshot resources. +type InstantSnapshotList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachment resources. - Items []*InterconnectAttachment `json:"items,omitempty"` + // Items: A list of InstantSnapshot resources. + Items []*InstantSnapshot `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#interconnectAttachmentList for lists of interconnect - // attachments. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -24679,7 +24405,7 @@ type InterconnectAttachmentList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentListWarning `json:"warning,omitempty"` + Warning *InstantSnapshotListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -24702,15 +24428,15 @@ type InterconnectAttachmentList struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentList +func (s *InstantSnapshotList) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentListWarning: [Output Only] Informational -// warning message. -type InterconnectAttachmentListWarning struct { +// InstantSnapshotListWarning: [Output Only] Informational warning +// message. +type InstantSnapshotListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -24778,7 +24504,7 @@ type InterconnectAttachmentListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InterconnectAttachmentListWarningData `json:"data,omitempty"` + Data []*InstantSnapshotListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -24801,13 +24527,13 @@ type InterconnectAttachmentListWarning struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarning +func (s *InstantSnapshotListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectAttachmentListWarningData struct { +type InstantSnapshotListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -24838,35 +24564,18 @@ type InterconnectAttachmentListWarningData struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarningData +func (s *InstantSnapshotListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentPartnerMetadata: Informational metadata about -// Partner attachments from Partners to display to customers. These -// fields are propagated from PARTNER_PROVIDER attachments to their -// corresponding PARTNER attachments. -type InterconnectAttachmentPartnerMetadata struct { - // InterconnectName: Plain text name of the Interconnect this attachment - // is connected to, as displayed in the Partner's portal. For instance - // "Chicago 1". This value may be validated to match approved Partner - // values. - InterconnectName string `json:"interconnectName,omitempty"` - - // PartnerName: Plain text name of the Partner providing this - // attachment. This value may be validated to match approved Partner - // values. - PartnerName string `json:"partnerName,omitempty"` - - // PortalUrl: URL of the Partner's portal for this Attachment. Partners - // may customise this to be a deep link to the specific resource on the - // Partner portal. This value may be validated to match approved Partner - // values. - PortalUrl string `json:"portalUrl,omitempty"` +type InstantSnapshotResourceStatus struct { + // StorageSizeBytes: [Output Only] The storage size of this instant + // snapshot. + StorageSizeBytes int64 `json:"storageSizeBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "InterconnectName") to + // ForceSendFields is a list of field names (e.g. "StorageSizeBytes") 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 @@ -24874,7 +24583,7 @@ type InterconnectAttachmentPartnerMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InterconnectName") to + // NullFields is a list of field names (e.g. "StorageSizeBytes") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -24884,21 +24593,17 @@ type InterconnectAttachmentPartnerMetadata struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentPartnerMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPartnerMetadata +func (s *InstantSnapshotResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotResourceStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentPrivateInfo: Information for an interconnect -// attachment when this belongs to an interconnect of type DEDICATED. -type InterconnectAttachmentPrivateInfo struct { - // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for - // traffic between Google and the customer, going to and from this - // network and region. - Tag8021q int64 `json:"tag8021q,omitempty"` +type InstantSnapshotsExportRequest struct { + // ExportParams: Parameters to export the changed blocks. + ExportParams *InstantSnapshotExportParams `json:"exportParams,omitempty"` - // ForceSendFields is a list of field names (e.g. "Tag8021q") to + // ForceSendFields is a list of field names (e.g. "ExportParams") 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 @@ -24906,58 +24611,58 @@ type InterconnectAttachmentPrivateInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Tag8021q") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ExportParams") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPrivateInfo +func (s *InstantSnapshotsExportRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotsExportRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectAttachmentsScopedList struct { - // InterconnectAttachments: A list of interconnect attachments contained +type InstantSnapshotsScopedList struct { + // InstantSnapshots: [Output Only] A list of instantSnapshots contained // in this scope. - InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` + InstantSnapshots []*InstantSnapshot `json:"instantSnapshots,omitempty"` - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` + // Warning: [Output Only] Informational warning which replaces the list + // of instantSnapshots when the list is empty. + Warning *InstantSnapshotsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "InterconnectAttachments") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "InstantSnapshots") 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. "InterconnectAttachments") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "InstantSnapshots") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedList +func (s *InstantSnapshotsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentsScopedListWarning: Informational warning which -// replaces the list of addresses when the list is empty. -type InterconnectAttachmentsScopedListWarning struct { +// InstantSnapshotsScopedListWarning: [Output Only] Informational +// warning which replaces the list of instantSnapshots when the list is +// empty. +type InstantSnapshotsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -25025,7 +24730,7 @@ type InterconnectAttachmentsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InterconnectAttachmentsScopedListWarningData `json:"data,omitempty"` + Data []*InstantSnapshotsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -25048,13 +24753,13 @@ type InterconnectAttachmentsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedListWarning +func (s *InstantSnapshotsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectAttachmentsScopedListWarningData struct { +type InstantSnapshotsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -25085,28 +24790,24 @@ type InterconnectAttachmentsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedListWarningData +func (s *InstantSnapshotsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectCircuitInfo: Describes a single physical circuit between -// the Customer and Google. CircuitInfo objects are created by Google, -// so all fields are output only. -type InterconnectCircuitInfo struct { - // CustomerDemarcId: Customer-side demarc ID for this circuit. - CustomerDemarcId string `json:"customerDemarcId,omitempty"` - - // GoogleCircuitId: Google-assigned unique ID for this circuit. Assigned - // at circuit turn-up. - GoogleCircuitId string `json:"googleCircuitId,omitempty"` +// Int64RangeMatch: HttpRouteRuleMatch criteria for field values that +// must stay within the specified integer range. +type Int64RangeMatch struct { + // RangeEnd: The end of the range (exclusive) in signed long integer + // format. + RangeEnd int64 `json:"rangeEnd,omitempty,string"` - // GoogleDemarcId: Google-side demarc ID for this circuit. Assigned at - // circuit turn-up and provided by Google to the customer in the LOA. - GoogleDemarcId string `json:"googleDemarcId,omitempty"` + // RangeStart: The start of the range (inclusive) in signed long integer + // format. + RangeStart int64 `json:"rangeStart,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CustomerDemarcId") to + // ForceSendFields is a list of field names (e.g. "RangeEnd") 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 @@ -25114,93 +24815,200 @@ type InterconnectCircuitInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerDemarcId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "RangeEnd") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InterconnectCircuitInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectCircuitInfo +func (s *Int64RangeMatch) MarshalJSON() ([]byte, error) { + type NoMethod Int64RangeMatch raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectDiagnostics: Diagnostics information about interconnect, -// contains detailed and current technical information about Google's -// side of the connection. -type InterconnectDiagnostics struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing individual neighbors currently seen by the Google router - // in the ARP cache for the Interconnect. This will be empty when the - // Interconnect is not bundled. - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` +// Interconnect: Represents an Interconnect resource. An Interconnect +// resource is a dedicated connection between the Google Cloud network +// and your on-premises network. For more information, read the +// Dedicated Interconnect Overview. +type Interconnect struct { + // AdminEnabled: Administrative status of the interconnect. When this is + // set to true, the Interconnect is functional and can carry traffic. + // When set to false, no packets can be carried over the interconnect + // and no BGP routes are exchanged over it. By default, the status is + // set to true. + AdminEnabled bool `json:"adminEnabled,omitempty"` - // BundleAggregationType: The aggregation type of the bundle interface. + // CircuitInfos: [Output Only] A list of CircuitInfo objects, that + // describe the individual circuits in this LAG. + CircuitInfos []*InterconnectCircuitInfo `json:"circuitInfos,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // CustomerName: Customer name, to put in the Letter of Authorization as + // the party authorized to request a crossconnect. + CustomerName string `json:"customerName,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // ExpectedOutages: [Output Only] A list of outages expected for this + // Interconnect. + ExpectedOutages []*InterconnectOutageNotification `json:"expectedOutages,omitempty"` + + // GoogleIpAddress: [Output Only] IP address configured on the Google + // side of the Interconnect link. This can be used only for ping tests. + GoogleIpAddress string `json:"googleIpAddress,omitempty"` + + // GoogleReferenceId: [Output Only] Google reference ID to be used when + // raising support tickets with Google or otherwise to debug backend + // connectivity issues. + GoogleReferenceId string `json:"googleReferenceId,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // InterconnectAttachments: [Output Only] A list of the URLs of all + // InterconnectAttachments configured to use this Interconnect. + InterconnectAttachments []string `json:"interconnectAttachments,omitempty"` + + // InterconnectType: Type of interconnect, which can take one of the + // following values: - PARTNER: A partner-managed interconnection shared + // between customers though a partner. - DEDICATED: A dedicated physical + // interconnection with the customer. Note that a value IT_PRIVATE has + // been deprecated in favor of DEDICATED. // // Possible values: - // "BUNDLE_AGGREGATION_TYPE_LACP" - LACP is enabled. - // "BUNDLE_AGGREGATION_TYPE_STATIC" - LACP is disabled. - BundleAggregationType string `json:"bundleAggregationType,omitempty"` + // "DEDICATED" - A dedicated physical interconnection with the + // customer. + // "IT_PRIVATE" - [Deprecated] A private, physical interconnection + // with the customer. + // "PARTNER" - A partner-managed interconnection shared between + // customers via partner. + InterconnectType string `json:"interconnectType,omitempty"` - // BundleOperationalStatus: The operational status of the bundle - // interface. + // Kind: [Output Only] Type of the resource. Always compute#interconnect + // for interconnects. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // Interconnect, which is essentially a hash of the labels set used for + // optimistic locking. The fingerprint is initially generated by Compute + // Engine and changes after every request to modify or update labels. + // You must always provide an up-to-date fingerprint hash in order to + // update or change labels, otherwise the request will fail with error + // 412 conditionNotMet. To see the latest fingerprint, make a get() + // request to retrieve an Interconnect. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels for this resource. These can only be added or modified + // by the setLabels method. Each label key/value pair must comply with + // RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // LinkType: Type of link requested, which can take one of the following + // values: - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - + // LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. Note that + // this field indicates the speed of each of the links in the bundle, + // not the speed of the entire bundle. // // Possible values: - // "BUNDLE_OPERATIONAL_STATUS_DOWN" - If bundleAggregationType is - // LACP: LACP is not established and/or all links in the bundle have - // DOWN operational status. If bundleAggregationType is STATIC: one or - // more links in the bundle has DOWN operational status. - // "BUNDLE_OPERATIONAL_STATUS_UP" - If bundleAggregationType is LACP: - // LACP is established and at least one link in the bundle has UP - // operational status. If bundleAggregationType is STATIC: all links in - // the bundle (typically just one) have UP operational status. - BundleOperationalStatus string `json:"bundleOperationalStatus,omitempty"` + // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. + // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. [(rate_bps) + // = 10000000000]; + LinkType string `json:"linkType,omitempty"` - // Links: A list of InterconnectDiagnostics.LinkStatus objects, - // describing the status for each link on the Interconnect. - Links []*InterconnectDiagnosticsLinkStatus `json:"links,omitempty"` + // Location: URL of the InterconnectLocation object that represents + // where this connection is to be provisioned. + Location string `json:"location,omitempty"` - // MacAddress: The MAC address of the Interconnect's bundle interface. - MacAddress string `json:"macAddress,omitempty"` + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArpCaches") 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:"-"` + // NocContactEmail: Email address to contact the customer NOC for + // operations and maintenance notifications regarding this Interconnect. + // If specified, this will be used for notifications in addition to all + // other forms described, such as Cloud Monitoring logs alerting and + // Cloud Notifications. This field is required for users who sign up for + // Cloud Interconnect using workforce identity federation. + NocContactEmail string `json:"nocContactEmail,omitempty"` - // NullFields is a list of field names (e.g. "ArpCaches") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // OperationalStatus: [Output Only] The current status of this + // Interconnect's functionality, which can take one of the following + // values: - OS_ACTIVE: A valid Interconnect, which is turned up and is + // ready to use. Attachments may be provisioned on this Interconnect. - + // OS_UNPROVISIONED: An Interconnect that has not completed turnup. No + // attachments may be provisioned on this Interconnect. - + // OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal + // maintenance. No attachments may be provisioned or updated on this + // Interconnect. + // + // Possible values: + // "OS_ACTIVE" - The interconnect is valid, turned up, and ready to + // use. Attachments may be provisioned on this interconnect. + // "OS_UNPROVISIONED" - The interconnect has not completed turnup. No + // attachments may be provisioned on this interconnect. + OperationalStatus string `json:"operationalStatus,omitempty"` -func (s *InterconnectDiagnostics) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnostics - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // PeerIpAddress: [Output Only] IP address configured on the customer + // side of the Interconnect link. The customer should configure this IP + // address during turnup when prompted by Google NOC. This can be used + // only for ping tests. + PeerIpAddress string `json:"peerIpAddress,omitempty"` -// InterconnectDiagnosticsARPEntry: Describing the ARP neighbor entries -// seen on this link -type InterconnectDiagnosticsARPEntry struct { - // IpAddress: The IP address of this ARP neighbor. - IpAddress string `json:"ipAddress,omitempty"` + // ProvisionedLinkCount: [Output Only] Number of links actually + // provisioned in this interconnect. + ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"` - // MacAddress: The MAC address of this ARP neighbor. - MacAddress string `json:"macAddress,omitempty"` + // RemoteLocation: Indicates that this is a Cross-Cloud Interconnect. + // This field specifies the location outside of Google's network that + // the interconnect is connected to. + RemoteLocation string `json:"remoteLocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to + // RequestedLinkCount: Target number of physical links in the link + // bundle, as requested by the customer. + RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` + + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // State: [Output Only] The current state of Interconnect functionality, + // which can take one of the following values: - ACTIVE: The + // Interconnect is valid, turned up and ready to use. Attachments may be + // provisioned on this Interconnect. - UNPROVISIONED: The Interconnect + // has not completed turnup. No attachments may be provisioned on this + // Interconnect. - UNDER_MAINTENANCE: The Interconnect is undergoing + // internal maintenance. No attachments may be provisioned or updated on + // this Interconnect. + // + // Possible values: + // "ACTIVE" - The interconnect is valid, turned up, and ready to use. + // Attachments may be provisioned on this interconnect. + // "UNPROVISIONED" - The interconnect has not completed turnup. No + // attachments may be provisioned on this interconnect. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdminEnabled") 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 @@ -25208,168 +25016,361 @@ type InterconnectDiagnosticsARPEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AdminEnabled") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InterconnectDiagnosticsARPEntry) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsARPEntry +func (s *Interconnect) MarshalJSON() ([]byte, error) { + type NoMethod Interconnect raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectDiagnosticsLinkLACPStatus struct { - // GoogleSystemId: System ID of the port on Google's side of the LACP - // exchange. - GoogleSystemId string `json:"googleSystemId,omitempty"` - - // NeighborSystemId: System ID of the port on the neighbor's side of the - // LACP exchange. - NeighborSystemId string `json:"neighborSystemId,omitempty"` +// InterconnectAttachment: Represents an Interconnect Attachment (VLAN) +// resource. You can use Interconnect attachments (VLANS) to connect +// your Virtual Private Cloud networks to your on-premises networks +// through an Interconnect. For more information, read Creating VLAN +// Attachments. +type InterconnectAttachment struct { + // AdminEnabled: Determines whether this Attachment will carry packets. + // Not present for PARTNER_PROVIDER. + AdminEnabled bool `json:"adminEnabled,omitempty"` - // State: The state of a LACP link, which can take one of the following - // values: - ACTIVE: The link is configured and active within the - // bundle. - DETACHED: The link is not configured within the bundle. - // This means that the rest of the object should be empty. + // Bandwidth: Provisioned bandwidth capacity for the interconnect + // attachment. For attachments of type DEDICATED, the user can set the + // bandwidth. For attachments of type PARTNER, the Google Partner that + // is operating the interconnect must set the bandwidth. Output only for + // PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can + // take one of the following values: - BPS_50M: 50 Mbit/s - BPS_100M: + // 100 Mbit/s - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - BPS_400M: + // 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: 1 Gbit/s - BPS_2G: 2 + // Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - BPS_20G: 20 Gbit/s - + // BPS_50G: 50 Gbit/s // // Possible values: - // "ACTIVE" - The link is configured and active within the bundle. - // "DETACHED" - The link is not configured within the bundle, this - // means the rest of the object should be empty. - State string `json:"state,omitempty"` + // "BPS_100M" - 100 Mbit/s + // "BPS_10G" - 10 Gbit/s + // "BPS_1G" - 1 Gbit/s + // "BPS_200M" - 200 Mbit/s + // "BPS_20G" - 20 Gbit/s + // "BPS_2G" - 2 Gbit/s + // "BPS_300M" - 300 Mbit/s + // "BPS_400M" - 400 Mbit/s + // "BPS_500M" - 500 Mbit/s + // "BPS_50G" - 50 Gbit/s + // "BPS_50M" - 50 Mbit/s + // "BPS_5G" - 5 Gbit/s + Bandwidth string `json:"bandwidth,omitempty"` - // ForceSendFields is a list of field names (e.g. "GoogleSystemId") 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:"-"` + // CandidateIpv6Subnets: This field is not available. + CandidateIpv6Subnets []string `json:"candidateIpv6Subnets,omitempty"` - // NullFields is a list of field names (e.g. "GoogleSystemId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // CandidateSubnets: Up to 16 candidate prefixes that can be used to + // restrict the allocation of cloudRouterIpAddress and + // customerRouterIpAddress for this attachment. All prefixes must be + // within link-local address space (169.254.0.0/16) and must be /29 or + // shorter (/28, /27, etc). Google will attempt to select an unused /29 + // from the supplied candidate prefix(es). The request will fail if all + // possible /29s are in use on Google's edge. If not supplied, Google + // will randomly select an unused /29 from all of link-local space. + CandidateSubnets []string `json:"candidateSubnets,omitempty"` -func (s *InterconnectDiagnosticsLinkLACPStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkLACPStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // CloudRouterIpAddress: [Output Only] IPv4 address + prefix length to + // be configured on Cloud Router Interface for this interconnect + // attachment. + CloudRouterIpAddress string `json:"cloudRouterIpAddress,omitempty"` -type InterconnectDiagnosticsLinkOpticalPower struct { - // State: The status of the current value when compared to the warning - // and alarm levels for the receiving or transmitting transceiver. - // Possible states include: - OK: The value has not crossed a warning - // threshold. - LOW_WARNING: The value has crossed below the low warning - // threshold. - HIGH_WARNING: The value has crossed above the high - // warning threshold. - LOW_ALARM: The value has crossed below the low - // alarm threshold. - HIGH_ALARM: The value has crossed above the high - // alarm threshold. + // CloudRouterIpv6Address: [Output Only] IPv6 address + prefix length to + // be configured on Cloud Router Interface for this interconnect + // attachment. + CloudRouterIpv6Address string `json:"cloudRouterIpv6Address,omitempty"` + + // CloudRouterIpv6InterfaceId: This field is not available. + CloudRouterIpv6InterfaceId string `json:"cloudRouterIpv6InterfaceId,omitempty"` + + // ConfigurationConstraints: [Output Only] Constraints for this + // attachment, if any. The attachment does not work if these constraints + // are not met. + ConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"configurationConstraints,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // CustomerRouterIpAddress: [Output Only] IPv4 address + prefix length + // to be configured on the customer router subinterface for this + // interconnect attachment. + CustomerRouterIpAddress string `json:"customerRouterIpAddress,omitempty"` + + // CustomerRouterIpv6Address: [Output Only] IPv6 address + prefix length + // to be configured on the customer router subinterface for this + // interconnect attachment. + CustomerRouterIpv6Address string `json:"customerRouterIpv6Address,omitempty"` + + // CustomerRouterIpv6InterfaceId: This field is not available. + CustomerRouterIpv6InterfaceId string `json:"customerRouterIpv6InterfaceId,omitempty"` + + // DataplaneVersion: [Output Only] Dataplane version for this + // InterconnectAttachment. This field is only present for Dataplane + // version 2 and higher. Absence of this field in the API output + // indicates that the Dataplane is version 1. + DataplaneVersion int64 `json:"dataplaneVersion,omitempty"` + + // Description: An optional description of this resource. + Description string `json:"description,omitempty"` + + // EdgeAvailabilityDomain: Desired availability domain for the + // attachment. Only available for type PARTNER, at creation time, and + // can take one of the following values: - AVAILABILITY_DOMAIN_ANY - + // AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved + // reliability, customers should configure a pair of attachments, one + // per availability domain. The selected availability domain will be + // provided to the Partner via the pairing key, so that the provisioned + // circuit will lie in the specified domain. If not specified, the value + // will default to AVAILABILITY_DOMAIN_ANY. // // Possible values: - // "HIGH_ALARM" - The value has crossed above the high alarm - // threshold. - // "HIGH_WARNING" - The value of the current optical power has crossed - // above the high warning threshold. - // "LOW_ALARM" - The value of the current optical power has crossed - // below the low alarm threshold. - // "LOW_WARNING" - The value of the current optical power has crossed - // below the low warning threshold. - // "OK" - The value of the current optical power has not crossed a - // warning threshold. - State string `json:"state,omitempty"` + // "AVAILABILITY_DOMAIN_1" + // "AVAILABILITY_DOMAIN_2" + // "AVAILABILITY_DOMAIN_ANY" + EdgeAvailabilityDomain string `json:"edgeAvailabilityDomain,omitempty"` - // Value: Value of the current receiving or transmitting optical power, - // read in dBm. Take a known good optical value, give it a 10% margin - // and trigger warnings relative to that value. In general, a -7dBm - // warning and a -11dBm alarm are good optical value estimates for most - // links. - Value float64 `json:"value,omitempty"` + // Encryption: Indicates the user-supplied encryption option of this + // VLAN attachment (interconnectAttachment). Can only be specified at + // attachment creation for PARTNER or DEDICATED attachments. Possible + // values are: - NONE - This is the default value, which means that the + // VLAN attachment carries unencrypted traffic. VMs are able to send + // traffic to, or receive traffic from, such a VLAN attachment. - IPSEC + // - The VLAN attachment carries only encrypted traffic that is + // encrypted by an IPsec device, such as an HA VPN gateway or + // third-party IPsec VPN. VMs cannot directly send traffic to, or + // receive traffic from, such a VLAN attachment. To use *HA VPN over + // Cloud Interconnect*, the VLAN attachment must be created with this + // option. + // + // Possible values: + // "IPSEC" - The interconnect attachment will carry only encrypted + // traffic that is encrypted by an IPsec device such as HA VPN gateway; + // VMs cannot directly send traffic to or receive traffic from such an + // interconnect attachment. To use HA VPN over Cloud Interconnect, the + // interconnect attachment must be created with this option. + // "NONE" - This is the default value, which means the Interconnect + // Attachment will carry unencrypted traffic. VMs will be able to send + // traffic to or receive traffic from such interconnect attachment. + Encryption string `json:"encryption,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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:"-"` + // GoogleReferenceId: [Output Only] Google reference ID, to be used when + // raising support tickets with Google or otherwise to debug backend + // connectivity issues. [Deprecated] This field is not used. + GoogleReferenceId string `json:"googleReferenceId,omitempty"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` -func (s *InterconnectDiagnosticsLinkOpticalPower) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Interconnect: URL of the underlying Interconnect object that this + // attachment's traffic will traverse through. + Interconnect string `json:"interconnect,omitempty"` -func (s *InterconnectDiagnosticsLinkOpticalPower) UnmarshalJSON(data []byte) error { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} + // IpsecInternalAddresses: A list of URLs of addresses that have been + // reserved for the VLAN attachment. Used only for the VLAN attachment + // that has the encryption option as IPSEC. The addresses must be + // regional internal IP address ranges. When creating an HA VPN gateway + // over the VLAN attachment, if the attachment is configured to use a + // regional internal IP address, then the VPN gateway's IP address is + // allocated from the IP address range specified here. For example, if + // the HA VPN gateway's interface 0 is paired to this VLAN attachment, + // then a regional internal IP address for the VPN gateway interface 0 + // will be allocated from the IP address specified for this VLAN + // attachment. If this field is not specified when creating the VLAN + // attachment, then later on when creating an HA VPN gateway on this + // VLAN attachment, the HA VPN gateway's IP address is allocated from + // the regional external IP address pool. + IpsecInternalAddresses []string `json:"ipsecInternalAddresses,omitempty"` -type InterconnectDiagnosticsLinkStatus struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing the ARP neighbor entries seen on this link. This will be - // empty if the link is bundled - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` + // Kind: [Output Only] Type of the resource. Always + // compute#interconnectAttachment for interconnect attachments. + Kind string `json:"kind,omitempty"` - // CircuitId: The unique ID for this link assigned during turn up by - // Google. - CircuitId string `json:"circuitId,omitempty"` + // LabelFingerprint: A fingerprint for the labels being applied to this + // InterconnectAttachment, which is essentially a hash of the labels set + // used for optimistic locking. The fingerprint is initially generated + // by Compute Engine and changes after every request to modify or update + // labels. You must always provide an up-to-date fingerprint hash in + // order to update or change labels, otherwise the request will fail + // with error 412 conditionNotMet. To see the latest fingerprint, make a + // get() request to retrieve an InterconnectAttachment. + LabelFingerprint string `json:"labelFingerprint,omitempty"` - // GoogleDemarc: The Demarc address assigned by Google and provided in - // the LoA. - GoogleDemarc string `json:"googleDemarc,omitempty"` + // Labels: Labels for this resource. These can only be added or modified + // by the setLabels method. Each label key/value pair must comply with + // RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` - LacpStatus *InterconnectDiagnosticsLinkLACPStatus `json:"lacpStatus,omitempty"` + // Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing + // through this interconnect attachment. Only 1440 and 1500 are allowed. + // If not specified, the value will default to 1440. + Mtu int64 `json:"mtu,omitempty"` - // OperationalStatus: The operational status of the link. + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // OperationalStatus: [Output Only] The current status of whether or not + // this interconnect attachment is functional, which can take one of the + // following values: - OS_ACTIVE: The attachment has been turned up and + // is ready to use. - OS_UNPROVISIONED: The attachment is not ready to + // use yet, because turnup is not complete. // // Possible values: - // "LINK_OPERATIONAL_STATUS_DOWN" - The interface is unable to - // communicate with the remote end. - // "LINK_OPERATIONAL_STATUS_UP" - The interface has low level - // communication with the remote end. + // "OS_ACTIVE" - Indicates that attachment has been turned up and is + // ready to use. + // "OS_UNPROVISIONED" - Indicates that attachment is not ready to use + // yet, because turnup is not complete. OperationalStatus string `json:"operationalStatus,omitempty"` - // ReceivingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower - // object, describing the current value and status of the received light - // level. - ReceivingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"receivingOpticalPower,omitempty"` + // PairingKey: [Output only for type PARTNER. Input only for + // PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier + // of an PARTNER attachment used to initiate provisioning with a + // selected partner. Of the form "XXXXX/region/domain" + PairingKey string `json:"pairingKey,omitempty"` - // TransmittingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower - // object, describing the current value and status of the transmitted - // light level. - TransmittingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"transmittingOpticalPower,omitempty"` + // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 + // Partner if they configured BGP on behalf of the customer. Output only + // for PARTNER type, input only for PARTNER_PROVIDER, not available for + // DEDICATED. + PartnerAsn int64 `json:"partnerAsn,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ArpCaches") to + // PartnerMetadata: Informational metadata about Partner attachments + // from Partners to display to customers. Output only for for PARTNER + // type, mutable for PARTNER_PROVIDER, not available for DEDICATED. + PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` + + // PrivateInterconnectInfo: [Output Only] Information specific to an + // InterconnectAttachment. This property is populated if the + // interconnect that this is attached to is of type DEDICATED. + PrivateInterconnectInfo *InterconnectAttachmentPrivateInfo `json:"privateInterconnectInfo,omitempty"` + + // Region: [Output Only] URL of the region where the regional + // interconnect attachment resides. You must specify this field as part + // of the HTTP request URL. It is not settable as a field in the request + // body. + Region string `json:"region,omitempty"` + + // RemoteService: [Output Only] If the attachment is on a Cross-Cloud + // Interconnect connection, this field contains the interconnect's + // remote location service provider. Example values: "Amazon Web + // Services" "Microsoft Azure". The field is set only for attachments on + // Cross-Cloud Interconnect connections. Its value is copied from the + // InterconnectRemoteLocation remoteService field. + RemoteService string `json:"remoteService,omitempty"` + + // Router: URL of the Cloud Router to be used for dynamic routing. This + // router must be in the same region as this InterconnectAttachment. The + // InterconnectAttachment will automatically connect the Interconnect to + // the network & region within which the Cloud Router is configured. + Router string `json:"router,omitempty"` + + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // StackType: The stack type for this interconnect attachment to + // identify whether the IPv6 feature is enabled or not. If not + // specified, IPV4_ONLY will be used. This field can be both set at + // interconnect attachments creation and update interconnect attachment + // operations. + // + // Possible values: + // "IPV4_IPV6" - The interconnect attachment can have both IPv4 and + // IPv6 addresses. + // "IPV4_ONLY" - The interconnect attachment will only be assigned + // IPv4 addresses. + StackType string `json:"stackType,omitempty"` + + // State: [Output Only] The current state of this attachment's + // functionality. Enum values ACTIVE and UNPROVISIONED are shared by + // DEDICATED/PRIVATE, PARTNER, and PARTNER_PROVIDER interconnect + // attachments, while enum values PENDING_PARTNER, + // PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used for only + // PARTNER and PARTNER_PROVIDER interconnect attachments. This state can + // take one of the following values: - ACTIVE: The attachment has been + // turned up and is ready to use. - UNPROVISIONED: The attachment is not + // ready to use yet, because turnup is not complete. - PENDING_PARTNER: + // A newly-created PARTNER attachment that has not yet been configured + // on the Partner side. - PARTNER_REQUEST_RECEIVED: A PARTNER attachment + // is in the process of provisioning after a PARTNER_PROVIDER attachment + // was created that references it. - PENDING_CUSTOMER: A PARTNER or + // PARTNER_PROVIDER attachment that is waiting for a customer to + // activate it. - DEFUNCT: The attachment was deleted externally and is + // no longer functional. This could be because the associated + // Interconnect was removed, or because the other side of a Partner + // attachment was deleted. + // + // Possible values: + // "ACTIVE" - Indicates that attachment has been turned up and is + // ready to use. + // "DEFUNCT" - The attachment was deleted externally and is no longer + // functional. This could be because the associated Interconnect was + // wiped out, or because the other side of a Partner attachment was + // deleted. + // "PARTNER_REQUEST_RECEIVED" - A PARTNER attachment is in the process + // of provisioning after a PARTNER_PROVIDER attachment was created that + // references it. + // "PENDING_CUSTOMER" - PARTNER or PARTNER_PROVIDER attachment that is + // waiting for the customer to activate. + // "PENDING_PARTNER" - A newly created PARTNER attachment that has not + // yet been configured on the Partner side. + // "STATE_UNSPECIFIED" + // "UNPROVISIONED" - Indicates that attachment is not ready to use + // yet, because turnup is not complete. + State string `json:"state,omitempty"` + + // SubnetLength: Length of the IPv4 subnet mask. Allowed values: - 29 + // (default) - 30 The default value is 29, except for Cross-Cloud + // Interconnect connections that use an InterconnectRemoteLocation with + // a constraints.subnetLengthRange.min equal to 30. For example, + // connections that use an Azure remote location fall into this + // category. In these cases, the default value is 30, and requesting 29 + // returns an error. Where both 29 and 30 are allowed, 29 is preferred, + // because it gives Google Cloud Support more debugging visibility. + SubnetLength int64 `json:"subnetLength,omitempty"` + + // Type: The type of interconnect attachment this is, which can take one + // of the following values: - DEDICATED: an attachment to a Dedicated + // Interconnect. - PARTNER: an attachment to a Partner Interconnect, + // created by the customer. - PARTNER_PROVIDER: an attachment to a + // Partner Interconnect, created by the partner. + // + // Possible values: + // "DEDICATED" - Attachment to a dedicated interconnect. + // "PARTNER" - Attachment to a partner interconnect, created by the + // customer. + // "PARTNER_PROVIDER" - Attachment to a partner interconnect, created + // by the partner. + Type string `json:"type,omitempty"` + + // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the + // range 2-4093. Only specified at creation time. + VlanTag8021q int64 `json:"vlanTag8021q,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdminEnabled") 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 @@ -25377,33 +25378,32 @@ type InterconnectDiagnosticsLinkStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArpCaches") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AdminEnabled") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InterconnectDiagnosticsLinkStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkStatus +func (s *InterconnectAttachment) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectList: Response to the list request, and contains a list -// of interconnects. -type InterconnectList struct { +type InterconnectAttachmentAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of Interconnect resources. - Items []*Interconnect `json:"items,omitempty"` + // Items: A list of InterconnectAttachmentsScopedList resources. + Items map[string]InterconnectAttachmentsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#interconnectList - // for lists of interconnects. + // Kind: [Output Only] Type of resource. Always + // compute#interconnectAttachmentAggregatedList for aggregated lists of + // interconnect attachments. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -25417,8 +25417,11 @@ type InterconnectList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *InterconnectListWarning `json:"warning,omitempty"` + Warning *InterconnectAttachmentAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -25441,14 +25444,15 @@ type InterconnectList struct { NullFields []string `json:"-"` } -func (s *InterconnectList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectList +func (s *InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectListWarning: [Output Only] Informational warning message. -type InterconnectListWarning struct { +// InterconnectAttachmentAggregatedListWarning: [Output Only] +// Informational warning message. +type InterconnectAttachmentAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -25516,7 +25520,7 @@ type InterconnectListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InterconnectListWarningData `json:"data,omitempty"` + Data []*InterconnectAttachmentAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -25539,13 +25543,13 @@ type InterconnectListWarning struct { NullFields []string `json:"-"` } -func (s *InterconnectListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectListWarning +func (s *InterconnectAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectListWarningData struct { +type InterconnectAttachmentAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -25576,108 +25580,71 @@ type InterconnectListWarningData struct { NullFields []string `json:"-"` } -func (s *InterconnectListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectListWarningData +func (s *InterconnectAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectLocation: Represents an Interconnect Attachment (VLAN) -// Location resource. You can use this resource to find location details -// about an Interconnect attachment (VLAN). For more information about -// interconnect attachments, read Creating VLAN Attachments. -type InterconnectLocation struct { - // Address: [Output Only] The postal address of the Point of Presence, - // each line in the address is separated by a newline character. - Address string `json:"address,omitempty"` - - // AvailabilityZone: [Output Only] Availability zone for this - // InterconnectLocation. Within a metropolitan area (metro), maintenance - // will not be simultaneously scheduled in more than one availability - // zone. Example: "zone1" or "zone2". - AvailabilityZone string `json:"availabilityZone,omitempty"` - - // City: [Output Only] Metropolitan area designator that indicates which - // city an interconnect is located. For example: "Chicago, IL", - // "Amsterdam, Netherlands". - City string `json:"city,omitempty"` - - // Continent: [Output Only] Continent for this location, which can take - // one of the following values: - AFRICA - ASIA_PAC - EUROPE - - // NORTH_AMERICA - SOUTH_AMERICA +type InterconnectAttachmentConfigurationConstraints struct { + // BgpMd5: [Output Only] Whether the attachment's BGP session + // requires/allows/disallows BGP MD5 authentication. This can take one + // of the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. + // For example, a Cross-Cloud Interconnect connection to a remote cloud + // provider that requires BGP MD5 authentication has the + // interconnectRemoteLocation + // attachment_configuration_constraints.bgp_md5 field set to + // MD5_REQUIRED, and that property is propagated to the attachment. + // Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if MD5 + // is requested. // // Possible values: - // "AFRICA" - // "ASIA_PAC" - // "C_AFRICA" - // "C_ASIA_PAC" - // "C_EUROPE" - // "C_NORTH_AMERICA" - // "C_SOUTH_AMERICA" - // "EUROPE" - // "NORTH_AMERICA" - // "SOUTH_AMERICA" - Continent string `json:"continent,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] An optional description of the resource. - Description string `json:"description,omitempty"` - - // FacilityProvider: [Output Only] The name of the provider for this - // facility (e.g., EQUINIX). - FacilityProvider string `json:"facilityProvider,omitempty"` - - // FacilityProviderFacilityId: [Output Only] A provider-assigned - // Identifier for this facility (e.g., Ashburn-DC1). - FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#interconnectLocation for interconnect locations. - Kind string `json:"kind,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` + // "MD5_OPTIONAL" - MD5_OPTIONAL: BGP MD5 authentication is supported + // and can optionally be configured. + // "MD5_REQUIRED" - MD5_REQUIRED: BGP MD5 authentication must be + // configured. + // "MD5_UNSUPPORTED" - MD5_UNSUPPORTED: BGP MD5 authentication must + // not be configured + BgpMd5 string `json:"bgpMd5,omitempty"` - // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this - // facility (corresponding with a netfac type in peeringdb). - PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` + // BgpPeerAsnRanges: [Output Only] List of ASN ranges that the remote + // location is known to support. Formatted as an array of inclusive + // ranges {min: min-value, max: max-value}. For example, [{min: 123, + // max: 123}, {min: 64512, max: 65534}] allows the peer ASN to be 123 or + // anything in the range 64512-65534. This field is only advisory. + // Although the API accepts other ranges, these are the ranges that we + // recommend. + BgpPeerAsnRanges []*InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange `json:"bgpPeerAsnRanges,omitempty"` - // RegionInfos: [Output Only] A list of InterconnectLocation.RegionInfo - // objects, that describe parameters pertaining to the relation between - // this InterconnectLocation and various Google Cloud regions. - RegionInfos []*InterconnectLocationRegionInfo `json:"regionInfos,omitempty"` + // ForceSendFields is a list of field names (e.g. "BgpMd5") 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:"-"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // NullFields is a list of field names (e.g. "BgpMd5") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Status: [Output Only] The status of this InterconnectLocation, which - // can take one of the following values: - CLOSED: The - // InterconnectLocation is closed and is unavailable for provisioning - // new Interconnects. - AVAILABLE: The InterconnectLocation is available - // for provisioning new Interconnects. - // - // Possible values: - // "AVAILABLE" - The InterconnectLocation is available for - // provisioning new Interconnects. - // "CLOSED" - The InterconnectLocation is closed for provisioning new - // Interconnects. - Status string `json:"status,omitempty"` +func (s *InterconnectAttachmentConfigurationConstraints) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentConfigurationConstraints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` +type InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange struct { + Max int64 `json:"max,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + Min int64 `json:"min,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to + // ForceSendFields is a list of field names (e.g. "Max") 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 @@ -25685,8 +25652,8 @@ type InterconnectLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Max") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -25694,24 +25661,25 @@ type InterconnectLocation struct { NullFields []string `json:"-"` } -func (s *InterconnectLocation) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocation +func (s *InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectLocationList: Response to the list request, and contains -// a list of interconnect locations. -type InterconnectLocationList struct { +// InterconnectAttachmentList: Response to the list request, and +// contains a list of interconnect attachments. +type InterconnectAttachmentList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InterconnectLocation resources. - Items []*InterconnectLocation `json:"items,omitempty"` + // Items: A list of InterconnectAttachment resources. + Items []*InterconnectAttachment `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always - // compute#interconnectLocationList for lists of interconnect locations. + // compute#interconnectAttachmentList for lists of interconnect + // attachments. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -25726,7 +25694,7 @@ type InterconnectLocationList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *InterconnectLocationListWarning `json:"warning,omitempty"` + Warning *InterconnectAttachmentListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -25749,15 +25717,15 @@ type InterconnectLocationList struct { NullFields []string `json:"-"` } -func (s *InterconnectLocationList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationList +func (s *InterconnectAttachmentList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectLocationListWarning: [Output Only] Informational warning -// message. -type InterconnectLocationListWarning struct { +// InterconnectAttachmentListWarning: [Output Only] Informational +// warning message. +type InterconnectAttachmentListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -25825,7 +25793,7 @@ type InterconnectLocationListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InterconnectLocationListWarningData `json:"data,omitempty"` + Data []*InterconnectAttachmentListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -25848,13 +25816,13 @@ type InterconnectLocationListWarning struct { NullFields []string `json:"-"` } -func (s *InterconnectLocationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationListWarning +func (s *InterconnectAttachmentListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectLocationListWarningData struct { +type InterconnectAttachmentListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -25885,37 +25853,35 @@ type InterconnectLocationListWarningData struct { NullFields []string `json:"-"` } -func (s *InterconnectLocationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationListWarningData +func (s *InterconnectAttachmentListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectLocationRegionInfo: Information about any potential -// InterconnectAttachments between an Interconnect at a specific -// InterconnectLocation, and a specific Cloud Region. -type InterconnectLocationRegionInfo struct { - // ExpectedRttMs: Expected round-trip time in milliseconds, from this - // InterconnectLocation to a VM in this region. - ExpectedRttMs int64 `json:"expectedRttMs,omitempty,string"` +// InterconnectAttachmentPartnerMetadata: Informational metadata about +// Partner attachments from Partners to display to customers. These +// fields are propagated from PARTNER_PROVIDER attachments to their +// corresponding PARTNER attachments. +type InterconnectAttachmentPartnerMetadata struct { + // InterconnectName: Plain text name of the Interconnect this attachment + // is connected to, as displayed in the Partner's portal. For instance + // "Chicago 1". This value may be validated to match approved Partner + // values. + InterconnectName string `json:"interconnectName,omitempty"` - // LocationPresence: Identifies the network presence of this location. - // - // Possible values: - // "GLOBAL" - This region is not in any common network presence with - // this InterconnectLocation. - // "LOCAL_REGION" - This region shares the same regional network - // presence as this InterconnectLocation. - // "LP_GLOBAL" - [Deprecated] This region is not in any common network - // presence with this InterconnectLocation. - // "LP_LOCAL_REGION" - [Deprecated] This region shares the same - // regional network presence as this InterconnectLocation. - LocationPresence string `json:"locationPresence,omitempty"` + // PartnerName: Plain text name of the Partner providing this + // attachment. This value may be validated to match approved Partner + // values. + PartnerName string `json:"partnerName,omitempty"` - // Region: URL for the region of this location. - Region string `json:"region,omitempty"` + // PortalUrl: URL of the Partner's portal for this Attachment. Partners + // may customise this to be a deep link to the specific resource on the + // Partner portal. This value may be validated to match approved Partner + // values. + PortalUrl string `json:"portalUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpectedRttMs") to + // ForceSendFields is a list of field names (e.g. "InterconnectName") 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 @@ -25923,100 +25889,164 @@ type InterconnectLocationRegionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpectedRttMs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "InterconnectName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentPartnerMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentPartnerMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentPrivateInfo: Information for an interconnect +// attachment when this belongs to an interconnect of type DEDICATED. +type InterconnectAttachmentPrivateInfo struct { + // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for + // traffic between Google and the customer, going to and from this + // network and region. + Tag8021q int64 `json:"tag8021q,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Tag8021q") 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. "Tag8021q") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InterconnectLocationRegionInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationRegionInfo +func (s *InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentPrivateInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectOutageNotification: Description of a planned outage on -// this Interconnect. -type InterconnectOutageNotification struct { - // AffectedCircuits: If issue_type is IT_PARTIAL_OUTAGE, a list of the - // Google-side circuit IDs that will be affected. - AffectedCircuits []string `json:"affectedCircuits,omitempty"` +type InterconnectAttachmentsScopedList struct { + // InterconnectAttachments: A list of interconnect attachments contained + // in this scope. + InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` - // Description: A description about the purpose of the outage. - Description string `json:"description,omitempty"` + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` - // EndTime: Scheduled end time for the outage (milliseconds since Unix - // epoch). - EndTime int64 `json:"endTime,omitempty,string"` + // ForceSendFields is a list of field names (e.g. + // "InterconnectAttachments") 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:"-"` - // IssueType: Form this outage is expected to take, which can take one - // of the following values: - OUTAGE: The Interconnect may be completely - // out of service for some or all of the specified window. - - // PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole - // should remain up, but with reduced bandwidth. Note that the versions - // of this enum prefixed with "IT_" have been deprecated in favor of the - // unprefixed values. - // - // Possible values: - // "IT_OUTAGE" - [Deprecated] The Interconnect may be completely out - // of service for some or all of the specified window. - // "IT_PARTIAL_OUTAGE" - [Deprecated] Some circuits comprising the - // Interconnect will be out of service during the expected window. The - // interconnect as a whole should remain up, albeit with reduced - // bandwidth. - // "OUTAGE" - The Interconnect may be completely out of service for - // some or all of the specified window. - // "PARTIAL_OUTAGE" - Some circuits comprising the Interconnect will - // be out of service during the expected window. The interconnect as a - // whole should remain up, albeit with reduced bandwidth. - IssueType string `json:"issueType,omitempty"` + // NullFields is a list of field names (e.g. "InterconnectAttachments") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // Name: Unique identifier for this outage notification. - Name string `json:"name,omitempty"` +func (s *InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Source: The party that generated this notification, which can take - // the following value: - GOOGLE: this notification as generated by - // Google. Note that the value of NSRC_GOOGLE has been deprecated in - // favor of GOOGLE. +// InterconnectAttachmentsScopedListWarning: Informational warning which +// replaces the list of addresses when the list is empty. +type InterconnectAttachmentsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. // // Possible values: - // "GOOGLE" - This notification was generated by Google. - // "NSRC_GOOGLE" - [Deprecated] This notification was generated by - // Google. - Source string `json:"source,omitempty"` + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // StartTime: Scheduled start time for the outage (milliseconds since - // Unix epoch). - StartTime int64 `json:"startTime,omitempty,string"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*InterconnectAttachmentsScopedListWarningData `json:"data,omitempty"` - // State: State of this notification, which can take one of the - // following values: - ACTIVE: This outage notification is active. The - // event could be in the past, present, or future. See start_time and - // end_time for scheduling. - CANCELLED: The outage associated with this - // notification was cancelled before the outage was due to start. - - // COMPLETED: The outage associated with this notification is complete. - // Note that the versions of this enum prefixed with "NS_" have been - // deprecated in favor of the unprefixed values. - // - // Possible values: - // "ACTIVE" - This outage notification is active. The event could be - // in the future, present, or past. See start_time and end_time for - // scheduling. - // "CANCELLED" - The outage associated with this notification was - // cancelled before the outage was due to start. - // "COMPLETED" - The outage associated with this notification is - // complete. - // "NS_ACTIVE" - [Deprecated] This outage notification is active. The - // event could be in the future, present, or past. See start_time and - // end_time for scheduling. - // "NS_CANCELED" - [Deprecated] The outage associated with this - // notification was canceled before the outage was due to start. - State string `json:"state,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "AffectedCircuits") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -26024,32 +26054,36 @@ type InterconnectOutageNotification struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AffectedCircuits") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectOutageNotification +func (s *InterconnectAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectsGetDiagnosticsResponse: Response for the -// InterconnectsGetDiagnosticsRequest. -type InterconnectsGetDiagnosticsResponse struct { - Result *InterconnectDiagnostics `json:"result,omitempty"` +type InterconnectAttachmentsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Result") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -26057,7 +26091,7 @@ type InterconnectsGetDiagnosticsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API + // NullFields is a list of field names (e.g. "Key") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -26066,60 +26100,90 @@ type InterconnectsGetDiagnosticsResponse struct { NullFields []string `json:"-"` } -func (s *InterconnectsGetDiagnosticsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectsGetDiagnosticsResponse +func (s *InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// License: Represents a License resource. A License represents billing -// and aggregate usage data for public and marketplace images. *Caution* -// This resource is intended for use only by third-party partners who -// are creating Cloud Marketplace images. -type License struct { - // ChargesUseFee: [Output Only] Deprecated. This field no longer - // reflects whether a license charges a usage fee. - ChargesUseFee bool `json:"chargesUseFee,omitempty"` +// InterconnectCircuitInfo: Describes a single physical circuit between +// the Customer and Google. CircuitInfo objects are created by Google, +// so all fields are output only. +type InterconnectCircuitInfo struct { + // CustomerDemarcId: Customer-side demarc ID for this circuit. + CustomerDemarcId string `json:"customerDemarcId,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` + // GoogleCircuitId: Google-assigned unique ID for this circuit. Assigned + // at circuit turn-up. + GoogleCircuitId string `json:"googleCircuitId,omitempty"` - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. - Description string `json:"description,omitempty"` + // GoogleDemarcId: Google-side demarc ID for this circuit. Assigned at + // circuit turn-up and provided by Google to the customer in the LOA. + GoogleDemarcId string `json:"googleDemarcId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CustomerDemarcId") 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:"-"` - // Kind: [Output Only] Type of resource. Always compute#license for - // licenses. - Kind string `json:"kind,omitempty"` + // NullFields is a list of field names (e.g. "CustomerDemarcId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // LicenseCode: [Output Only] The unique code used to attach this - // license to images, snapshots, and disks. - LicenseCode uint64 `json:"licenseCode,omitempty,string"` +func (s *InterconnectCircuitInfo) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectCircuitInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Name: Name of the resource. The name must be 1-63 characters long and - // comply with RFC1035. - Name string `json:"name,omitempty"` +// InterconnectDiagnostics: Diagnostics information about interconnect, +// contains detailed and current technical information about Google's +// side of the connection. +type InterconnectDiagnostics struct { + // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, + // describing individual neighbors currently seen by the Google router + // in the ARP cache for the Interconnect. This will be empty when the + // Interconnect is not bundled. + ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` + // BundleAggregationType: The aggregation type of the bundle interface. + // + // Possible values: + // "BUNDLE_AGGREGATION_TYPE_LACP" - LACP is enabled. + // "BUNDLE_AGGREGATION_TYPE_STATIC" - LACP is disabled. + BundleAggregationType string `json:"bundleAggregationType,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // BundleOperationalStatus: The operational status of the bundle + // interface. + // + // Possible values: + // "BUNDLE_OPERATIONAL_STATUS_DOWN" - If bundleAggregationType is + // LACP: LACP is not established and/or all links in the bundle have + // DOWN operational status. If bundleAggregationType is STATIC: one or + // more links in the bundle has DOWN operational status. + // "BUNDLE_OPERATIONAL_STATUS_UP" - If bundleAggregationType is LACP: + // LACP is established and at least one link in the bundle has UP + // operational status. If bundleAggregationType is STATIC: all links in + // the bundle (typically just one) have UP operational status. + BundleOperationalStatus string `json:"bundleOperationalStatus,omitempty"` - // Transferable: If false, licenses will not be copied from the source - // resource when creating an image from a disk, disk from snapshot, or - // snapshot from disk. - Transferable bool `json:"transferable,omitempty"` + // Links: A list of InterconnectDiagnostics.LinkStatus objects, + // describing the status for each link on the Interconnect. + Links []*InterconnectDiagnosticsLinkStatus `json:"links,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // MacAddress: The MAC address of the Interconnect's bundle interface. + MacAddress string `json:"macAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChargesUseFee") to + // ForceSendFields is a list of field names (e.g. "ArpCaches") 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 @@ -26127,84 +26191,82 @@ type License struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChargesUseFee") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ArpCaches") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *License) MarshalJSON() ([]byte, error) { - type NoMethod License +func (s *InterconnectDiagnostics) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectDiagnostics raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LicenseCode: Represents a License Code resource. A License Code is a -// unique identifier used to represent a license resource. *Caution* -// This resource is intended for use only by third-party partners who -// are creating Cloud Marketplace images. -type LicenseCode struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` +// InterconnectDiagnosticsARPEntry: Describing the ARP neighbor entries +// seen on this link +type InterconnectDiagnosticsARPEntry struct { + // IpAddress: The IP address of this ARP neighbor. + IpAddress string `json:"ipAddress,omitempty"` - // Description: [Output Only] Description of this License Code. - Description string `json:"description,omitempty"` + // MacAddress: The MAC address of this ARP neighbor. + MacAddress string `json:"macAddress,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "IpAddress") 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:"-"` - // Kind: [Output Only] Type of resource. Always compute#licenseCode for - // licenses. - Kind string `json:"kind,omitempty"` + // NullFields is a list of field names (e.g. "IpAddress") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // LicenseAlias: [Output Only] URL and description aliases of Licenses - // with the same License Code. - LicenseAlias []*LicenseCodeLicenseAlias `json:"licenseAlias,omitempty"` +func (s *InterconnectDiagnosticsARPEntry) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectDiagnosticsARPEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Name: [Output Only] Name of the resource. The name is 1-20 characters - // long and must be a valid 64 bit integer. - Name string `json:"name,omitempty"` +type InterconnectDiagnosticsLinkLACPStatus struct { + // GoogleSystemId: System ID of the port on Google's side of the LACP + // exchange. + GoogleSystemId string `json:"googleSystemId,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // NeighborSystemId: System ID of the port on the neighbor's side of the + // LACP exchange. + NeighborSystemId string `json:"neighborSystemId,omitempty"` - // State: [Output Only] Current state of this License Code. + // State: The state of a LACP link, which can take one of the following + // values: - ACTIVE: The link is configured and active within the + // bundle. - DETACHED: The link is not configured within the bundle. + // This means that the rest of the object should be empty. // // Possible values: - // "DISABLED" - Machines are not allowed to attach boot disks with - // this License Code. Requests to create new resources with this license - // will be rejected. - // "ENABLED" - Use is allowed for anyone with USE_READ_ONLY access to - // this License Code. - // "RESTRICTED" - Use of this license is limited to a project - // whitelist. - // "STATE_UNSPECIFIED" - // "TERMINATED" - Reserved state. + // "ACTIVE" - The link is configured and active within the bundle. + // "DETACHED" - The link is not configured within the bundle, this + // means the rest of the object should be empty. State string `json:"state,omitempty"` - // Transferable: [Output Only] If true, the license will remain attached - // when creating images or snapshots from disks. Otherwise, the license - // is not transferred. - Transferable bool `json:"transferable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "GoogleSystemId") 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. "CreationTimestamp") to + // NullFields is a list of field names (e.g. "GoogleSystemId") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -26214,21 +26276,43 @@ type LicenseCode struct { NullFields []string `json:"-"` } -func (s *LicenseCode) MarshalJSON() ([]byte, error) { - type NoMethod LicenseCode +func (s *InterconnectDiagnosticsLinkLACPStatus) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectDiagnosticsLinkLACPStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LicenseCodeLicenseAlias struct { - // Description: [Output Only] Description of this License Code. - Description string `json:"description,omitempty"` +type InterconnectDiagnosticsLinkOpticalPower struct { + // State: The status of the current value when compared to the warning + // and alarm levels for the receiving or transmitting transceiver. + // Possible states include: - OK: The value has not crossed a warning + // threshold. - LOW_WARNING: The value has crossed below the low warning + // threshold. - HIGH_WARNING: The value has crossed above the high + // warning threshold. - LOW_ALARM: The value has crossed below the low + // alarm threshold. - HIGH_ALARM: The value has crossed above the high + // alarm threshold. + // + // Possible values: + // "HIGH_ALARM" - The value has crossed above the high alarm + // threshold. + // "HIGH_WARNING" - The value of the current optical power has crossed + // above the high warning threshold. + // "LOW_ALARM" - The value of the current optical power has crossed + // below the low alarm threshold. + // "LOW_WARNING" - The value of the current optical power has crossed + // below the low warning threshold. + // "OK" - The value of the current optical power has not crossed a + // warning threshold. + State string `json:"state,omitempty"` - // SelfLink: [Output Only] URL of license corresponding to this License - // Code. - SelfLink string `json:"selfLink,omitempty"` + // Value: Value of the current receiving or transmitting optical power, + // read in dBm. Take a known good optical value, give it a 10% margin + // and trigger warnings relative to that value. In general, a -7dBm + // warning and a -11dBm alarm are good optical value estimates for most + // links. + Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "State") 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 @@ -26236,67 +26320,71 @@ type LicenseCodeLicenseAlias struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *LicenseCodeLicenseAlias) MarshalJSON() ([]byte, error) { - type NoMethod LicenseCodeLicenseAlias +func (s *InterconnectDiagnosticsLinkOpticalPower) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectDiagnosticsLinkOpticalPower raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LicenseResourceCommitment: Commitment for a particular license -// resource. -type LicenseResourceCommitment struct { - // Amount: The number of licenses purchased. - Amount int64 `json:"amount,omitempty,string"` +func (s *InterconnectDiagnosticsLinkOpticalPower) UnmarshalJSON(data []byte) error { + type NoMethod InterconnectDiagnosticsLinkOpticalPower + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil +} - // CoresPerLicense: Specifies the core range of the instance for which - // this license applies. - CoresPerLicense string `json:"coresPerLicense,omitempty"` +type InterconnectDiagnosticsLinkStatus struct { + // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, + // describing the ARP neighbor entries seen on this link. This will be + // empty if the link is bundled + ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - // License: Any applicable license URI. - License string `json:"license,omitempty"` + // CircuitId: The unique ID for this link assigned during turn up by + // Google. + CircuitId string `json:"circuitId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") 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:"-"` + // GoogleDemarc: The Demarc address assigned by Google and provided in + // the LoA. + GoogleDemarc string `json:"googleDemarc,omitempty"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + LacpStatus *InterconnectDiagnosticsLinkLACPStatus `json:"lacpStatus,omitempty"` -func (s *LicenseResourceCommitment) MarshalJSON() ([]byte, error) { - type NoMethod LicenseResourceCommitment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // OperationalStatus: The operational status of the link. + // + // Possible values: + // "LINK_OPERATIONAL_STATUS_DOWN" - The interface is unable to + // communicate with the remote end. + // "LINK_OPERATIONAL_STATUS_UP" - The interface has low level + // communication with the remote end. + OperationalStatus string `json:"operationalStatus,omitempty"` -type LicenseResourceRequirements struct { - // MinGuestCpuCount: Minimum number of guest cpus required to use the - // Instance. Enforced at Instance creation and Instance start. - MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` + // ReceivingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower + // object, describing the current value and status of the received light + // level. + ReceivingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"receivingOpticalPower,omitempty"` - // MinMemoryMb: Minimum memory required to use the Instance. Enforced at - // Instance creation and Instance start. - MinMemoryMb int64 `json:"minMemoryMb,omitempty"` + // TransmittingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower + // object, describing the current value and status of the transmitted + // light level. + TransmittingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"transmittingOpticalPower,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") to + // ForceSendFields is a list of field names (e.g. "ArpCaches") 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 @@ -26304,29 +26392,34 @@ type LicenseResourceRequirements struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinGuestCpuCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "ArpCaches") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *LicenseResourceRequirements) MarshalJSON() ([]byte, error) { - type NoMethod LicenseResourceRequirements +func (s *InterconnectDiagnosticsLinkStatus) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectDiagnosticsLinkStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LicensesListResponse struct { +// InterconnectList: Response to the list request, and contains a list +// of interconnects. +type InterconnectList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of License resources. - Items []*License `json:"items,omitempty"` + // Items: A list of Interconnect resources. + Items []*Interconnect `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#interconnectList + // for lists of interconnects. + Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next // page of results for list requests. If the number of results is larger @@ -26340,7 +26433,7 @@ type LicensesListResponse struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *LicensesListResponseWarning `json:"warning,omitempty"` + Warning *InterconnectListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -26363,15 +26456,14 @@ type LicensesListResponse struct { NullFields []string `json:"-"` } -func (s *LicensesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponse +func (s *InterconnectList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LicensesListResponseWarning: [Output Only] Informational warning -// message. -type LicensesListResponseWarning struct { +// InterconnectListWarning: [Output Only] Informational warning message. +type InterconnectListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -26439,7 +26531,7 @@ type LicensesListResponseWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*LicensesListResponseWarningData `json:"data,omitempty"` + Data []*InterconnectListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -26462,13 +26554,13 @@ type LicensesListResponseWarning struct { NullFields []string `json:"-"` } -func (s *LicensesListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponseWarning +func (s *InterconnectListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LicensesListResponseWarningData struct { +type InterconnectListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -26499,26 +26591,108 @@ type LicensesListResponseWarningData struct { NullFields []string `json:"-"` } -func (s *LicensesListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponseWarningData +func (s *InterconnectListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LocalDisk struct { - // DiskCount: Specifies the number of such disks. - DiskCount int64 `json:"diskCount,omitempty"` +// InterconnectLocation: Represents an Interconnect Attachment (VLAN) +// Location resource. You can use this resource to find location details +// about an Interconnect attachment (VLAN). For more information about +// interconnect attachments, read Creating VLAN Attachments. +type InterconnectLocation struct { + // Address: [Output Only] The postal address of the Point of Presence, + // each line in the address is separated by a newline character. + Address string `json:"address,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` + // AvailabilityZone: [Output Only] Availability zone for this + // InterconnectLocation. Within a metropolitan area (metro), maintenance + // will not be simultaneously scheduled in more than one availability + // zone. Example: "zone1" or "zone2". + AvailabilityZone string `json:"availabilityZone,omitempty"` - // DiskType: Specifies the desired disk type on the node. This disk type - // must be a local storage type (e.g.: local-ssd). Note that for - // nodeTemplates, this should be the name of the disk type and not its - // URL. - DiskType string `json:"diskType,omitempty"` + // City: [Output Only] Metropolitan area designator that indicates which + // city an interconnect is located. For example: "Chicago, IL", + // "Amsterdam, Netherlands". + City string `json:"city,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskCount") to + // Continent: [Output Only] Continent for this location, which can take + // one of the following values: - AFRICA - ASIA_PAC - EUROPE - + // NORTH_AMERICA - SOUTH_AMERICA + // + // Possible values: + // "AFRICA" + // "ASIA_PAC" + // "C_AFRICA" + // "C_ASIA_PAC" + // "C_EUROPE" + // "C_NORTH_AMERICA" + // "C_SOUTH_AMERICA" + // "EUROPE" + // "NORTH_AMERICA" + // "SOUTH_AMERICA" + Continent string `json:"continent,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: [Output Only] An optional description of the resource. + Description string `json:"description,omitempty"` + + // FacilityProvider: [Output Only] The name of the provider for this + // facility (e.g., EQUINIX). + FacilityProvider string `json:"facilityProvider,omitempty"` + + // FacilityProviderFacilityId: [Output Only] A provider-assigned + // Identifier for this facility (e.g., Ashburn-DC1). + FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#interconnectLocation for interconnect locations. + Kind string `json:"kind,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this + // facility (corresponding with a netfac type in peeringdb). + PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` + + // RegionInfos: [Output Only] A list of InterconnectLocation.RegionInfo + // objects, that describe parameters pertaining to the relation between + // this InterconnectLocation and various Google Cloud regions. + RegionInfos []*InterconnectLocationRegionInfo `json:"regionInfos,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: [Output Only] The status of this InterconnectLocation, which + // can take one of the following values: - CLOSED: The + // InterconnectLocation is closed and is unavailable for provisioning + // new Interconnects. - AVAILABLE: The InterconnectLocation is available + // for provisioning new Interconnects. + // + // Possible values: + // "AVAILABLE" - The InterconnectLocation is available for + // provisioning new Interconnects. + // "CLOSED" - The InterconnectLocation is closed for provisioning new + // Interconnects. + Status string `json:"status,omitempty"` + + // SupportsPzs: [Output Only] Reserved for future use. + SupportsPzs bool `json:"supportsPzs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Address") 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 @@ -26526,7 +26700,7 @@ type LocalDisk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskCount") to include in + // NullFields is a list of field names (e.g. "Address") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -26535,74 +26709,45 @@ type LocalDisk struct { NullFields []string `json:"-"` } -func (s *LocalDisk) MarshalJSON() ([]byte, error) { - type NoMethod LocalDisk +func (s *InterconnectLocation) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LocalizedMessage: Provides a localized error message that is safe to -// return to the user which can be attached to an RPC error. -type LocalizedMessage struct { - // Locale: The locale used following the specification defined at - // https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", - // "fr-CH", "es-MX" - Locale string `json:"locale,omitempty"` +// InterconnectLocationList: Response to the list request, and contains +// a list of interconnect locations. +type InterconnectLocationList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Message: The localized error message in the above locale. - Message string `json:"message,omitempty"` + // Items: A list of InterconnectLocation resources. + Items []*InterconnectLocation `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locale") 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:"-"` + // Kind: [Output Only] Type of resource. Always + // compute#interconnectLocationList for lists of interconnect locations. + Kind string `json:"kind,omitempty"` - // NullFields is a list of field names (e.g. "Locale") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` -func (s *LocalizedMessage) MarshalJSON() ([]byte, error) { - type NoMethod LocalizedMessage - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` -// LocationPolicy: Configuration for location policy among multiple -// possible locations (e.g. preferences for zone selection among zones -// in a single region). -type LocationPolicy struct { - // Locations: Location configurations mapped by location name. Currently - // only zone names are supported and must be represented as valid - // internal URLs, such as zones/us-central1-a. - Locations map[string]LocationPolicyLocation `json:"locations,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *InterconnectLocationListWarning `json:"warning,omitempty"` - // TargetShape: Strategy for distributing VMs across zones in a region. - // - // Possible values: - // "ANY" - GCE picks zones for creating VM instances to fulfill the - // requested number of VMs within present resource constraints and to - // maximize utilization of unused zonal reservations. Recommended for - // batch workloads that do not require high availability. - // "ANY_SINGLE_ZONE" - GCE always selects a single zone for all the - // VMs, optimizing for resource quotas, available reservations and - // general capacity. Recommended for batch workloads that cannot - // tollerate distribution over multiple zones. This the default shape in - // Bulk Insert and Capacity Advisor APIs. - // "BALANCED" - GCE prioritizes acquisition of resources, scheduling - // VMs in zones where resources are available while distributing VMs as - // evenly as possible across allowed zones to minimize the impact of - // zonal failure. Recommended for highly available serving workloads. - TargetShape string `json:"targetShape,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Locations") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -26610,8 +26755,8 @@ type LocationPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -26619,27 +26764,89 @@ type LocationPolicy struct { NullFields []string `json:"-"` } -func (s *LocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicy +func (s *InterconnectLocationList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectLocationList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type LocationPolicyLocation struct { - // Constraints: Constraints that the caller requires on the result - // distribution in this zone. - Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` - - // Preference: Preference for a given location. Set to either ALLOW or - // DENY. +// InterconnectLocationListWarning: [Output Only] Informational warning +// message. +type InterconnectLocationListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. // // Possible values: - // "ALLOW" - Location is allowed for use. - // "DENY" - Location is prohibited. - // "PREFERENCE_UNSPECIFIED" - Default value, unused. - Preference string `json:"preference,omitempty"` + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // ForceSendFields is a list of field names (e.g. "Constraints") to + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*InterconnectLocationListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -26647,29 +26854,36 @@ type LocationPolicyLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Constraints") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *LocationPolicyLocation) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicyLocation +func (s *InterconnectLocationListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectLocationListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LocationPolicyLocationConstraints: Per-zone constraints on location -// policy for this zone. -type LocationPolicyLocationConstraints struct { - // MaxCount: Maximum number of items that are allowed to be placed in - // this zone. The value must be non-negative. - MaxCount int64 `json:"maxCount,omitempty"` +type InterconnectLocationListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxCount") to + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -26677,8 +26891,8 @@ type LocationPolicyLocationConstraints struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxCount") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -26686,24 +26900,37 @@ type LocationPolicyLocationConstraints struct { NullFields []string `json:"-"` } -func (s *LocationPolicyLocationConstraints) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicyLocationConstraints +func (s *InterconnectLocationListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectLocationListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfig: This is deprecated and has no effect. Do not use. -type LogConfig struct { - // CloudAudit: This is deprecated and has no effect. Do not use. - CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"` +// InterconnectLocationRegionInfo: Information about any potential +// InterconnectAttachments between an Interconnect at a specific +// InterconnectLocation, and a specific Cloud Region. +type InterconnectLocationRegionInfo struct { + // ExpectedRttMs: Expected round-trip time in milliseconds, from this + // InterconnectLocation to a VM in this region. + ExpectedRttMs int64 `json:"expectedRttMs,omitempty,string"` - // Counter: This is deprecated and has no effect. Do not use. - Counter *LogConfigCounterOptions `json:"counter,omitempty"` + // LocationPresence: Identifies the network presence of this location. + // + // Possible values: + // "GLOBAL" - This region is not in any common network presence with + // this InterconnectLocation. + // "LOCAL_REGION" - This region shares the same regional network + // presence as this InterconnectLocation. + // "LP_GLOBAL" - [Deprecated] This region is not in any common network + // presence with this InterconnectLocation. + // "LP_LOCAL_REGION" - [Deprecated] This region shares the same + // regional network presence as this InterconnectLocation. + LocationPresence string `json:"locationPresence,omitempty"` - // DataAccess: This is deprecated and has no effect. Do not use. - DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` + // Region: URL for the region of this location. + Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "CloudAudit") to + // ForceSendFields is a list of field names (e.g. "ExpectedRttMs") 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 @@ -26711,76 +26938,100 @@ type LogConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudAudit") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ExpectedRttMs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type NoMethod LogConfig +func (s *InterconnectLocationRegionInfo) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectLocationRegionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigCloudAuditOptions: This is deprecated and has no effect. Do -// not use. -type LogConfigCloudAuditOptions struct { - // AuthorizationLoggingOptions: This is deprecated and has no effect. Do - // not use. - AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` +// InterconnectOutageNotification: Description of a planned outage on +// this Interconnect. +type InterconnectOutageNotification struct { + // AffectedCircuits: If issue_type is IT_PARTIAL_OUTAGE, a list of the + // Google-side circuit IDs that will be affected. + AffectedCircuits []string `json:"affectedCircuits,omitempty"` - // LogName: This is deprecated and has no effect. Do not use. - // - // Possible values: - // "ADMIN_ACTIVITY" - This is deprecated and has no effect. Do not - // use. - // "DATA_ACCESS" - This is deprecated and has no effect. Do not use. - // "UNSPECIFIED_LOG_NAME" - This is deprecated and has no effect. Do - // not use. - LogName string `json:"logName,omitempty"` + // Description: A description about the purpose of the outage. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AuthorizationLoggingOptions") 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:"-"` + // EndTime: Scheduled end time for the outage (milliseconds since Unix + // epoch). + EndTime int64 `json:"endTime,omitempty,string"` - // NullFields is a list of field names (e.g. - // "AuthorizationLoggingOptions") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} + // IssueType: Form this outage is expected to take, which can take one + // of the following values: - OUTAGE: The Interconnect may be completely + // out of service for some or all of the specified window. - + // PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole + // should remain up, but with reduced bandwidth. Note that the versions + // of this enum prefixed with "IT_" have been deprecated in favor of the + // unprefixed values. + // + // Possible values: + // "IT_OUTAGE" - [Deprecated] The Interconnect may be completely out + // of service for some or all of the specified window. + // "IT_PARTIAL_OUTAGE" - [Deprecated] Some circuits comprising the + // Interconnect will be out of service during the expected window. The + // interconnect as a whole should remain up, albeit with reduced + // bandwidth. + // "OUTAGE" - The Interconnect may be completely out of service for + // some or all of the specified window. + // "PARTIAL_OUTAGE" - Some circuits comprising the Interconnect will + // be out of service during the expected window. The interconnect as a + // whole should remain up, albeit with reduced bandwidth. + IssueType string `json:"issueType,omitempty"` -func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCloudAuditOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Name: Unique identifier for this outage notification. + Name string `json:"name,omitempty"` -// LogConfigCounterOptions: This is deprecated and has no effect. Do not -// use. -type LogConfigCounterOptions struct { - // CustomFields: This is deprecated and has no effect. Do not use. - CustomFields []*LogConfigCounterOptionsCustomField `json:"customFields,omitempty"` + // Source: The party that generated this notification, which can take + // the following value: - GOOGLE: this notification as generated by + // Google. Note that the value of NSRC_GOOGLE has been deprecated in + // favor of GOOGLE. + // + // Possible values: + // "GOOGLE" - This notification was generated by Google. + // "NSRC_GOOGLE" - [Deprecated] This notification was generated by + // Google. + Source string `json:"source,omitempty"` - // Field: This is deprecated and has no effect. Do not use. - Field string `json:"field,omitempty"` + // StartTime: Scheduled start time for the outage (milliseconds since + // Unix epoch). + StartTime int64 `json:"startTime,omitempty,string"` - // Metric: This is deprecated and has no effect. Do not use. - Metric string `json:"metric,omitempty"` + // State: State of this notification, which can take one of the + // following values: - ACTIVE: This outage notification is active. The + // event could be in the past, present, or future. See start_time and + // end_time for scheduling. - CANCELLED: The outage associated with this + // notification was cancelled before the outage was due to start. - + // COMPLETED: The outage associated with this notification is complete. + // Note that the versions of this enum prefixed with "NS_" have been + // deprecated in favor of the unprefixed values. + // + // Possible values: + // "ACTIVE" - This outage notification is active. The event could be + // in the future, present, or past. See start_time and end_time for + // scheduling. + // "CANCELLED" - The outage associated with this notification was + // cancelled before the outage was due to start. + // "COMPLETED" - The outage associated with this notification is + // complete. + // "NS_ACTIVE" - [Deprecated] This outage notification is active. The + // event could be in the future, present, or past. See start_time and + // end_time for scheduling. + // "NS_CANCELED" - [Deprecated] The outage associated with this + // notification was canceled before the outage was due to start. + State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomFields") to + // ForceSendFields is a list of field names (e.g. "AffectedCircuits") 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 @@ -26788,31 +27039,139 @@ type LogConfigCounterOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomFields") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AffectedCircuits") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCounterOptions +func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectOutageNotification raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigCounterOptionsCustomField: This is deprecated and has no -// effect. Do not use. -type LogConfigCounterOptionsCustomField struct { - // Name: This is deprecated and has no effect. Do not use. +// InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect +// Remote Location resource. You can use this resource to find remote +// location details about an Interconnect attachment (VLAN). +type InterconnectRemoteLocation struct { + // Address: [Output Only] The postal address of the Point of Presence, + // each line in the address is separated by a newline character. + Address string `json:"address,omitempty"` + + // AttachmentConfigurationConstraints: [Output Only] Subset of fields + // from InterconnectAttachment's |configurationConstraints| field that + // apply to all attachments for this remote location. + AttachmentConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"attachmentConfigurationConstraints,omitempty"` + + // City: [Output Only] Metropolitan area designator that indicates which + // city an interconnect is located. For example: "Chicago, IL", + // "Amsterdam, Netherlands". + City string `json:"city,omitempty"` + + // Constraints: [Output Only] Constraints on the parameters for creating + // Cross-Cloud Interconnect and associated InterconnectAttachments. + Constraints *InterconnectRemoteLocationConstraints `json:"constraints,omitempty"` + + // Continent: [Output Only] Continent for this location, which can take + // one of the following values: - AFRICA - ASIA_PAC - EUROPE - + // NORTH_AMERICA - SOUTH_AMERICA + // + // Possible values: + // "AFRICA" + // "ASIA_PAC" + // "EUROPE" + // "NORTH_AMERICA" + // "SOUTH_AMERICA" + Continent string `json:"continent,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: [Output Only] An optional description of the resource. + Description string `json:"description,omitempty"` + + // FacilityProvider: [Output Only] The name of the provider for this + // facility (e.g., EQUINIX). + FacilityProvider string `json:"facilityProvider,omitempty"` + + // FacilityProviderFacilityId: [Output Only] A provider-assigned + // Identifier for this facility (e.g., Ashburn-DC1). + FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#interconnectRemoteLocation for interconnect remote locations. + Kind string `json:"kind,omitempty"` + + // Lacp: [Output Only] Link Aggregation Control Protocol (LACP) + // constraints, which can take one of the following values: + // LACP_SUPPORTED, LACP_UNSUPPORTED + // + // Possible values: + // "LACP_SUPPORTED" - LACP_SUPPORTED: LACP is supported, and enabled + // by default on the Cross-Cloud Interconnect. + // "LACP_UNSUPPORTED" - LACP_UNSUPPORTED: LACP is not supported and is + // not be enabled on this port. GetDiagnostics shows + // bundleAggregationType as "static". GCP does not support LAGs without + // LACP, so requestedLinkCount must be 1. + Lacp string `json:"lacp,omitempty"` + + // MaxLagSize100Gbps: [Output Only] The maximum number of 100 Gbps ports + // supported in a link aggregation group (LAG). When linkType is 100 + // Gbps, requestedLinkCount cannot exceed max_lag_size_100_gbps. + MaxLagSize100Gbps int64 `json:"maxLagSize100Gbps,omitempty"` + + // MaxLagSize10Gbps: [Output Only] The maximum number of 10 Gbps ports + // supported in a link aggregation group (LAG). When linkType is 10 + // Gbps, requestedLinkCount cannot exceed max_lag_size_10_gbps. + MaxLagSize10Gbps int64 `json:"maxLagSize10Gbps,omitempty"` + + // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` - // Value: This is deprecated and has no effect. Do not use. - Value string `json:"value,omitempty"` + // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this + // facility (corresponding with a netfac type in peeringdb). + PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // PermittedConnections: [Output Only] Permitted connections. + PermittedConnections []*InterconnectRemoteLocationPermittedConnections `json:"permittedConnections,omitempty"` + + // RemoteService: [Output Only] Indicates the service provider present + // at the remote location. Example values: "Amazon Web Services", + // "Microsoft Azure". + RemoteService string `json:"remoteService,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: [Output Only] The status of this InterconnectRemoteLocation, + // which can take one of the following values: - CLOSED: The + // InterconnectRemoteLocation is closed and is unavailable for + // provisioning new Cross-Cloud Interconnects. - AVAILABLE: The + // InterconnectRemoteLocation is available for provisioning new + // Cross-Cloud Interconnects. + // + // Possible values: + // "AVAILABLE" - The InterconnectRemoteLocation is available for + // provisioning new Cross-Cloud Interconnects. + // "CLOSED" - The InterconnectRemoteLocation is closed for + // provisioning new Cross-Cloud Interconnects. + Status string `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Address") 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 @@ -26820,8 +27179,8 @@ type LogConfigCounterOptionsCustomField struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -26829,200 +27188,141 @@ type LogConfigCounterOptionsCustomField struct { NullFields []string `json:"-"` } -func (s *LogConfigCounterOptionsCustomField) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCounterOptionsCustomField +func (s *InterconnectRemoteLocation) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LogConfigDataAccessOptions: This is deprecated and has no effect. Do -// not use. -type LogConfigDataAccessOptions struct { - // LogMode: This is deprecated and has no effect. Do not use. +type InterconnectRemoteLocationConstraints struct { + // PortPairRemoteLocation: [Output Only] Port pair remote location + // constraints, which can take one of the following values: + // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, + // PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to + // individual ports, but the UI uses this field when ordering a pair of + // ports, to prevent users from accidentally ordering something that is + // incompatible with their cloud provider. Specifically, when ordering a + // redundant pair of Cross-Cloud Interconnect ports, and one of them + // uses a remote location with portPairMatchingRemoteLocation set to + // matching, the UI requires that both ports use the same remote + // location. // // Possible values: - // "LOG_FAIL_CLOSED" - This is deprecated and has no effect. Do not - // use. - // "LOG_MODE_UNSPECIFIED" - This is deprecated and has no effect. Do - // not use. - LogMode string `json:"logMode,omitempty"` + // "PORT_PAIR_MATCHING_REMOTE_LOCATION" - If + // PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider + // allocates ports in pairs, and the user should choose the same remote + // location for both ports. + // "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" - If + // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision + // a redundant pair of Cross-Cloud Interconnects using two different + // remote locations in the same city. + PortPairRemoteLocation string `json:"portPairRemoteLocation,omitempty"` + + // PortPairVlan: [Output Only] Port pair VLAN constraints, which can + // take one of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, + // PORT_PAIR_MATCHING_VLAN + // + // Possible values: + // "PORT_PAIR_MATCHING_VLAN" - If PORT_PAIR_MATCHING_VLAN, the + // Interconnect for this attachment is part of a pair of ports that + // should have matching VLAN allocations. This occurs with Cross-Cloud + // Interconnect to Azure remote locations. While GCP's API does not + // explicitly group pairs of ports, the UI uses this field to ensure + // matching VLAN ids when configuring a redundant VLAN pair. + // "PORT_PAIR_UNCONSTRAINED_VLAN" - PORT_PAIR_UNCONSTRAINED_VLAN means + // there is no constraint. + PortPairVlan string `json:"portPairVlan,omitempty"` + + // SubnetLengthRange: [Output Only] [min-length, max-length] The minimum + // and maximum value (inclusive) for the IPv4 subnet length. For + // example, an interconnectRemoteLocation for Azure has {min: 30, max: + // 30} because Azure requires /30 subnets. This range specifies the + // values supported by both cloud providers. Interconnect currently + // supports /29 and /30 IPv4 subnet lengths. If a remote cloud has no + // constraint on IPv4 subnet length, the range would thus be {min: 29, + // max: 30}. + SubnetLengthRange *InterconnectRemoteLocationConstraintsSubnetLengthRange `json:"subnetLengthRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogMode") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "PortPairRemoteLocation") 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. "LogMode") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "PortPairRemoteLocation") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigDataAccessOptions +func (s *InterconnectRemoteLocationConstraints) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationConstraints raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineImage: Represents a machine image resource. A machine image is -// a Compute Engine resource that stores all the configuration, -// metadata, permissions, and data from one or more disks required to -// create a Virtual machine (VM) instance. For more information, see -// Machine images. -type MachineImage struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // machine image in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // GuestFlush: [Input Only] Whether to attempt an application consistent - // machine image by informing the OS to prepare for the snapshot - // process. - GuestFlush bool `json:"guestFlush,omitempty"` - - // Id: [Output Only] A unique identifier for this machine image. The - // server defines this identifier. - Id uint64 `json:"id,omitempty,string"` - - // InstanceProperties: [Output Only] Properties of source instance - InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#machineImage for machine image. - Kind string `json:"kind,omitempty"` - - // MachineImageEncryptionKey: Encrypts the machine image using a - // customer-supplied encryption key. After you encrypt a machine image - // using a customer-supplied key, you must provide the same key if you - // use the machine image later. For example, you must provide the - // encryption key when you create an instance from the encrypted machine - // image in a future request. Customer-supplied encryption keys do not - // protect access to metadata of the machine image. If you do not - // provide an encryption key when creating the machine image, then the - // machine image will be encrypted using an automatically generated key - // and you do not need to provide a key to use the machine image later. - MachineImageEncryptionKey *CustomerEncryptionKey `json:"machineImageEncryptionKey,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - - // SavedDisks: An array of Machine Image specific properties for disks - // attached to the source instance - SavedDisks []*SavedDisk `json:"savedDisks,omitempty"` - - // SelfLink: [Output Only] The URL for this machine image. The server - // defines this URL. - SelfLink string `json:"selfLink,omitempty"` - - // SourceDiskEncryptionKeys: [Input Only] The customer-supplied - // encryption key of the disks attached to the source instance. Required - // if the source disk is protected by a customer-supplied encryption - // key. - SourceDiskEncryptionKeys []*SourceDiskEncryptionKey `json:"sourceDiskEncryptionKeys,omitempty"` - - // SourceInstance: The source instance used to create the machine image. - // You can provide this as a partial or full URL to the resource. For - // example, the following are valid values: - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone - // /instances/instance - projects/project/zones/zone/instances/instance - SourceInstance string `json:"sourceInstance,omitempty"` - - // SourceInstanceProperties: [Output Only] DEPRECATED: Please use - // instance_properties instead for source instance related properties. - // New properties will not be added to this field. - SourceInstanceProperties *SourceInstanceProperties `json:"sourceInstanceProperties,omitempty"` - - // Status: [Output Only] The status of the machine image. One of the - // following values: INVALID, CREATING, READY, DELETING, and UPLOADING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - // "UPLOADING" - Status string `json:"status,omitempty"` - - // StorageLocations: The regional or multi-regional Cloud Storage bucket - // location where the machine image is stored. - StorageLocations []string `json:"storageLocations,omitempty"` - - // TotalStorageBytes: [Output Only] Total size of the storage used by - // the machine image. - TotalStorageBytes int64 `json:"totalStorageBytes,omitempty,string"` +type InterconnectRemoteLocationConstraintsSubnetLengthRange struct { + Max int64 `json:"max,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + Min int64 `json:"min,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Max") 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Max") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *MachineImage) MarshalJSON() ([]byte, error) { - type NoMethod MachineImage +func (s *InterconnectRemoteLocationConstraintsSubnetLengthRange) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationConstraintsSubnetLengthRange raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineImageList: A list of machine images. -type MachineImageList struct { +// InterconnectRemoteLocationList: Response to the list request, and +// contains a list of interconnect remote locations. +type InterconnectRemoteLocationList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of MachineImage resources. - Items []*MachineImage `json:"items,omitempty"` + // Items: A list of InterconnectRemoteLocation resources. + Items []*InterconnectRemoteLocation `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is always - // compute#machineImagesListResponse for machine image lists. + // Kind: [Output Only] Type of resource. Always + // compute#interconnectRemoteLocationList for lists of interconnect + // remote locations. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. + // NextPageToken: [Output Only] This token lets you get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will + // have their own nextPageToken to continue paging through the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *MachineImageListWarning `json:"warning,omitempty"` + Warning *InterconnectRemoteLocationListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -27045,14 +27345,15 @@ type MachineImageList struct { NullFields []string `json:"-"` } -func (s *MachineImageList) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageList +func (s *InterconnectRemoteLocationList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineImageListWarning: [Output Only] Informational warning message. -type MachineImageListWarning struct { +// InterconnectRemoteLocationListWarning: [Output Only] Informational +// warning message. +type InterconnectRemoteLocationListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -27120,7 +27421,7 @@ type MachineImageListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*MachineImageListWarningData `json:"data,omitempty"` + Data []*InterconnectRemoteLocationListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -27143,13 +27444,13 @@ type MachineImageListWarning struct { NullFields []string `json:"-"` } -func (s *MachineImageListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageListWarning +func (s *InterconnectRemoteLocationListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type MachineImageListWarningData struct { +type InterconnectRemoteLocationListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -27180,80 +27481,122 @@ type MachineImageListWarningData struct { NullFields []string `json:"-"` } -func (s *MachineImageListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageListWarningData +func (s *InterconnectRemoteLocationListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineType: Represents a Machine Type resource. You can use specific -// machine types for your VM instances based on performance and pricing -// requirements. For more information, read Machine Types. -type MachineType struct { - // Accelerators: [Output Only] A list of accelerator configurations - // assigned to this machine type. - Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` +type InterconnectRemoteLocationPermittedConnections struct { + // InterconnectLocation: [Output Only] URL of an Interconnect location + // that is permitted to connect to this Interconnect remote location. + InterconnectLocation string `json:"interconnectLocation,omitempty"` - // BundledLocalSsds: [Output Only] The configuration of bundled local - // SSD for the machine type. - BundledLocalSsds *BundledLocalSsds `json:"bundledLocalSsds,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "InterconnectLocation") 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. "InterconnectLocation") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocationPermittedConnections) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationPermittedConnections + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectsGetDiagnosticsResponse: Response for the +// InterconnectsGetDiagnosticsRequest. +type InterconnectsGetDiagnosticsResponse struct { + Result *InterconnectDiagnostics `json:"result,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectsGetDiagnosticsResponse) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectsGetDiagnosticsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// License: Represents a License resource. A License represents billing +// and aggregate usage data for public and marketplace images. *Caution* +// This resource is intended for use only by third-party partners who +// are creating Cloud Marketplace images. +type License struct { + // ChargesUseFee: [Output Only] Deprecated. This field no longer + // reflects whether a license charges a usage fee. + ChargesUseFee bool `json:"chargesUseFee,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with - // this machine type. Only applicable if the machine type is - // unavailable. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. Description string `json:"description,omitempty"` - // GuestCpus: [Output Only] The number of virtual CPUs that are - // available to the instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // IsSharedCpu: [Output Only] Whether this machine type has a shared - // CPU. See Shared-core machine types for more information. - IsSharedCpu bool `json:"isSharedCpu,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#machineType for machine types. + // Kind: [Output Only] Type of resource. Always compute#license for + // licenses. Kind string `json:"kind,omitempty"` - // MaximumPersistentDisks: [Output Only] Maximum persistent disks - // allowed. - MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` - - // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent - // disks size (GB) allowed. - MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` - - // MemoryMb: [Output Only] The amount of physical memory available to - // the instance, defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` + // LicenseCode: [Output Only] The unique code used to attach this + // license to images, snapshots, and disks. + LicenseCode uint64 `json:"licenseCode,omitempty,string"` - // Name: [Output Only] Name of the resource. + // Name: Name of the resource. The name must be 1-63 characters long and + // comply with RFC1035. Name string `json:"name,omitempty"` + ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Zone: [Output Only] The name of the zone where the machine type - // resides, such as us-central1-a. - Zone string `json:"zone,omitempty"` + // Transferable: If false, licenses will not be copied from the source + // resource when creating an image from a disk, disk from snapshot, or + // snapshot from disk. + Transferable bool `json:"transferable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to + // ForceSendFields is a list of field names (e.g. "ChargesUseFee") 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 @@ -27261,7 +27604,7 @@ type MachineType struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include + // NullFields is a list of field names (e.g. "ChargesUseFee") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -27270,31 +27613,75 @@ type MachineType struct { NullFields []string `json:"-"` } -func (s *MachineType) MarshalJSON() ([]byte, error) { - type NoMethod MachineType +func (s *License) MarshalJSON() ([]byte, error) { + type NoMethod License raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type MachineTypeAccelerators struct { - // GuestAcceleratorCount: Number of accelerator cards exposed to the - // guest. - GuestAcceleratorCount int64 `json:"guestAcceleratorCount,omitempty"` +// LicenseCode: Represents a License Code resource. A License Code is a +// unique identifier used to represent a license resource. *Caution* +// This resource is intended for use only by third-party partners who +// are creating Cloud Marketplace images. +type LicenseCode struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // GuestAcceleratorType: The accelerator type resource name, not a full - // URL, e.g. 'nvidia-tesla-k80'. - GuestAcceleratorType string `json:"guestAcceleratorType,omitempty"` + // Description: [Output Only] Description of this License Code. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "GuestAcceleratorCount") 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. + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of resource. Always compute#licenseCode for + // licenses. + Kind string `json:"kind,omitempty"` + + // LicenseAlias: [Output Only] URL and description aliases of Licenses + // with the same License Code. + LicenseAlias []*LicenseCodeLicenseAlias `json:"licenseAlias,omitempty"` + + // Name: [Output Only] Name of the resource. The name is 1-20 characters + // long and must be a valid 64 bit integer. + Name string `json:"name,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // State: [Output Only] Current state of this License Code. + // + // Possible values: + // "DISABLED" - Machines are not allowed to attach boot disks with + // this License Code. Requests to create new resources with this license + // will be rejected. + // "ENABLED" - Use is allowed for anyone with USE_READ_ONLY access to + // this License Code. + // "RESTRICTED" - Use of this license is limited to a project + // whitelist. + // "STATE_UNSPECIFIED" + // "TERMINATED" - Reserved state. + State string `json:"state,omitempty"` + + // Transferable: [Output Only] If true, the license will remain attached + // when creating images or snapshots from disks. Otherwise, the license + // is not transferred. + Transferable bool `json:"transferable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty 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. "GuestAcceleratorCount") to + // NullFields is a list of field names (e.g. "CreationTimestamp") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -27304,47 +27691,21 @@ type MachineTypeAccelerators struct { NullFields []string `json:"-"` } -func (s *MachineTypeAccelerators) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAccelerators +func (s *LicenseCode) MarshalJSON() ([]byte, error) { + type NoMethod LicenseCode raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type MachineTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of MachineTypesScopedList resources. - Items map[string]MachineTypesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#machineTypeAggregatedList for aggregated lists of machine - // types. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` +type LicenseCodeLicenseAlias struct { + // Description: [Output Only] Description of this License Code. + Description string `json:"description,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. + // SelfLink: [Output Only] URL of license corresponding to this License + // Code. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *MachineTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -27352,98 +27713,35 @@ type MachineTypeAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedList +func (s *LicenseCodeLicenseAlias) MarshalJSON() ([]byte, error) { + type NoMethod LicenseCodeLicenseAlias raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type MachineTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` +// LicenseResourceCommitment: Commitment for a particular license +// resource. +type LicenseResourceCommitment struct { + // Amount: The number of licenses purchased. + Amount int64 `json:"amount,omitempty,string"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*MachineTypeAggregatedListWarningData `json:"data,omitempty"` + // CoresPerLicense: Specifies the core range of the instance for which + // this license applies. + CoresPerLicense string `json:"coresPerLicense,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // License: Any applicable license URI. + License string `json:"license,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Amount") 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 @@ -27451,7 +27749,7 @@ type MachineTypeAggregatedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Amount") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -27460,27 +27758,22 @@ type MachineTypeAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *MachineTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedListWarning +func (s *LicenseResourceCommitment) MarshalJSON() ([]byte, error) { + type NoMethod LicenseResourceCommitment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type MachineTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type LicenseResourceRequirements struct { + // MinGuestCpuCount: Minimum number of guest cpus required to use the + // Instance. Enforced at Instance creation and Instance start. + MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // MinMemoryMb: Minimum memory required to use the Instance. Enforced at + // Instance creation and Instance start. + MinMemoryMb int64 `json:"minMemoryMb,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") 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 @@ -27488,33 +27781,29 @@ type MachineTypeAggregatedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "MinGuestCpuCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *MachineTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedListWarningData +func (s *LicenseResourceRequirements) MarshalJSON() ([]byte, error) { + type NoMethod LicenseResourceRequirements raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineTypeList: Contains a list of machine types. -type MachineTypeList struct { +type LicensesListResponse struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of MachineType resources. - Items []*MachineType `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#machineTypeList - // for lists of machine types. - Kind string `json:"kind,omitempty"` + // Items: A list of License resources. + Items []*License `json:"items,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next // page of results for list requests. If the number of results is larger @@ -27528,7 +27817,7 @@ type MachineTypeList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *MachineTypeListWarning `json:"warning,omitempty"` + Warning *LicensesListResponseWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -27551,14 +27840,15 @@ type MachineTypeList struct { NullFields []string `json:"-"` } -func (s *MachineTypeList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeList +func (s *LicensesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod LicensesListResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineTypeListWarning: [Output Only] Informational warning message. -type MachineTypeListWarning struct { +// LicensesListResponseWarning: [Output Only] Informational warning +// message. +type LicensesListResponseWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -27626,7 +27916,7 @@ type MachineTypeListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*MachineTypeListWarningData `json:"data,omitempty"` + Data []*LicensesListResponseWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -27649,13 +27939,13 @@ type MachineTypeListWarning struct { NullFields []string `json:"-"` } -func (s *MachineTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeListWarning +func (s *LicensesListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod LicensesListResponseWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type MachineTypeListWarningData struct { +type LicensesListResponseWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -27686,22 +27976,26 @@ type MachineTypeListWarningData struct { NullFields []string `json:"-"` } -func (s *MachineTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeListWarningData +func (s *LicensesListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod LicensesListResponseWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type MachineTypesScopedList struct { - // MachineTypes: [Output Only] A list of machine types contained in this - // scope. - MachineTypes []*MachineType `json:"machineTypes,omitempty"` +type LocalDisk struct { + // DiskCount: Specifies the number of such disks. + DiskCount int64 `json:"diskCount,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // machine types list is empty. - Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` + // DiskSizeGb: Specifies the size of the disk in base-2 GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineTypes") to + // DiskType: Specifies the desired disk type on the node. This disk type + // must be a local storage type (e.g.: local-ssd). Note that for + // nodeTemplates, this should be the name of the disk type and not its + // URL. + DiskType string `json:"diskType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskCount") 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 @@ -27709,98 +28003,33 @@ type MachineTypesScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineTypes") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DiskCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedList +func (s *LocalDisk) MarshalJSON() ([]byte, error) { + type NoMethod LocalDisk raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineTypesScopedListWarning: [Output Only] An informational warning -// that appears when the machine types list is empty. -type MachineTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` +// LocalizedMessage: Provides a localized error message that is safe to +// return to the user which can be attached to an RPC error. +type LocalizedMessage struct { + // Locale: The locale used following the specification defined at + // https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", + // "fr-CH", "es-MX" + Locale string `json:"locale,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. + // Message: The localized error message in the above locale. Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Locale") 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 @@ -27808,7 +28037,7 @@ type MachineTypesScopedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Locale") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -27817,27 +28046,40 @@ type MachineTypesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedListWarning +func (s *LocalizedMessage) MarshalJSON() ([]byte, error) { + type NoMethod LocalizedMessage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type MachineTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +// LocationPolicy: Configuration for location policy among multiple +// possible locations (e.g. preferences for zone selection among zones +// in a single region). +type LocationPolicy struct { + // Locations: Location configurations mapped by location name. Currently + // only zone names are supported and must be represented as valid + // internal URLs, such as zones/us-central1-a. + Locations map[string]LocationPolicyLocation `json:"locations,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // TargetShape: Strategy for distributing VMs across zones in a region. + // + // Possible values: + // "ANY" - GCE picks zones for creating VM instances to fulfill the + // requested number of VMs within present resource constraints and to + // maximize utilization of unused zonal reservations. Recommended for + // batch workloads that do not require high availability. + // "ANY_SINGLE_ZONE" - GCE always selects a single zone for all the + // VMs, optimizing for resource quotas, available reservations and + // general capacity. Recommended for batch workloads that cannot + // tollerate distribution over multiple zones. This the default shape in + // Bulk Insert and Capacity Advisor APIs. + // "BALANCED" - GCE prioritizes acquisition of resources, scheduling + // VMs in zones where resources are available while distributing VMs as + // evenly as possible across allowed zones to minimize the impact of + // zonal failure. Recommended for highly available serving workloads. + TargetShape string `json:"targetShape,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Locations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -27845,8 +28087,8 @@ type MachineTypesScopedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -27854,261 +28096,27 @@ type MachineTypesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedListWarningData +func (s *LocationPolicy) MarshalJSON() ([]byte, error) { + type NoMethod LocationPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ManagedInstance: A Managed Instance resource. -type ManagedInstance struct { - // AllInstancesConfig: [Output Only] Current all-instances configuration - // revision applied to this instance. - AllInstancesConfig *ManagedInstanceAllInstancesConfig `json:"allInstancesConfig,omitempty"` - - // CurrentAction: [Output Only] The current action that the managed - // instance group has scheduled for the instance. Possible values: - - // NONE The instance is running, and the managed instance group does not - // have any scheduled actions for this instance. - CREATING The managed - // instance group is creating this instance. If the group fails to - // create this instance, it will try again until it is successful. - - // CREATING_WITHOUT_RETRIES The managed instance group is attempting to - // create this instance only once. If the group fails to create this - // instance, it does not try again and the group's targetSize value is - // decreased instead. - RECREATING The managed instance group is - // recreating this instance. - DELETING The managed instance group is - // permanently deleting this instance. - ABANDONING The managed instance - // group is abandoning this instance. The instance will be removed from - // the instance group and from any target pools that are associated with - // this group. - RESTARTING The managed instance group is restarting the - // instance. - REFRESHING The managed instance group is applying - // configuration changes to the instance without stopping it. For - // example, the group can update the target pool list for an instance - // without stopping that instance. - VERIFYING The managed instance - // group has created the instance and it is in the process of being - // verified. - // - // Possible values: - // "ABANDONING" - The managed instance group is abandoning this - // instance. The instance will be removed from the instance group and - // from any target pools that are associated with this group. - // "CREATING" - The managed instance group is creating this instance. - // If the group fails to create this instance, it will try again until - // it is successful. - // "CREATING_WITHOUT_RETRIES" - The managed instance group is - // attempting to create this instance only once. If the group fails to - // create this instance, it does not try again and the group's - // targetSize value is decreased. - // "DELETING" - The managed instance group is permanently deleting - // this instance. - // "NONE" - The managed instance group has not scheduled any actions - // for this instance. - // "RECREATING" - The managed instance group is recreating this - // instance. - // "REFRESHING" - The managed instance group is applying configuration - // changes to the instance without stopping it. For example, the group - // can update the target pool list for an instance without stopping that - // instance. - // "RESTARTING" - The managed instance group is restarting this - // instance. - // "RESUMING" - The managed instance group is resuming this instance. - // "STARTING" - The managed instance group is starting this instance. - // "STOPPING" - The managed instance group is stopping this instance. - // "SUSPENDING" - The managed instance group is suspending this - // instance. - // "VERIFYING" - The managed instance group is verifying this already - // created instance. Verification happens every time the instance is - // (re)created or restarted and consists of: 1. Waiting until health - // check specified as part of this managed instance group's autohealing - // policy reports HEALTHY. Note: Applies only if autohealing policy has - // a health check specified 2. Waiting for addition verification steps - // performed as post-instance creation (subject to future extensions). - CurrentAction string `json:"currentAction,omitempty"` - - // Id: [Output only] The unique identifier for this resource. This field - // is empty when instance does not exist. - Id uint64 `json:"id,omitempty,string"` - - // Instance: [Output Only] The URL of the instance. The URL can exist - // even if the instance has not yet been created. - Instance string `json:"instance,omitempty"` - - // InstanceHealth: [Output Only] Health state of the instance per - // health-check. - InstanceHealth []*ManagedInstanceInstanceHealth `json:"instanceHealth,omitempty"` - - // InstanceStatus: [Output Only] The status of the instance. This field - // is empty when the instance does not exist. - // - // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing - // tear down tasks like network deprogramming, releasing quota, IP, - // tearing down disks etc. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the - // instance is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being - // deleted or killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action - // or underlying failure). - InstanceStatus string `json:"instanceStatus,omitempty"` - - // LastAttempt: [Output Only] Information about the last attempt to - // create or delete the instance. - LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - - // PreservedStateFromConfig: [Output Only] Preserved state applied from - // per-instance config for this instance. - PreservedStateFromConfig *PreservedState `json:"preservedStateFromConfig,omitempty"` - - // PreservedStateFromPolicy: [Output Only] Preserved state generated - // based on stateful policy for this instance. - PreservedStateFromPolicy *PreservedState `json:"preservedStateFromPolicy,omitempty"` - - // Version: [Output Only] Intended version of this instance. - Version *ManagedInstanceVersion `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") - // 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. "AllInstancesConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstance) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstance - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceAllInstancesConfig struct { - // Revision: [Output Only] Current all-instances configuration revision. - // This value is in RFC3339 text format. - Revision string `json:"revision,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Revision") 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. "Revision") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceAllInstancesConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceAllInstancesConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +type LocationPolicyLocation struct { + // Constraints: Constraints that the caller requires on the result + // distribution in this zone. + Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` -type ManagedInstanceInstanceHealth struct { - // DetailedHealthState: [Output Only] The current detailed instance - // health state. + // Preference: Preference for a given location. Set to either ALLOW or + // DENY. // // Possible values: - // "DRAINING" - The instance is being drained. The existing - // connections to the instance have time to complete, but the new ones - // are being refused. - // "HEALTHY" - The instance is reachable i.e. a connection to the - // application health checking endpoint can be established, and conforms - // to the requirements defined by the health check. - // "TIMEOUT" - The instance is unreachable i.e. a connection to the - // application health checking endpoint cannot be established, or the - // server does not respond within the specified timeout. - // "UNHEALTHY" - The instance is reachable, but does not conform to - // the requirements defined by the health check. - // "UNKNOWN" - The health checking system is aware of the instance but - // its health is not known at the moment. - DetailedHealthState string `json:"detailedHealthState,omitempty"` - - // HealthCheck: [Output Only] The URL for the health check that verifies - // whether the instance is healthy. - HealthCheck string `json:"healthCheck,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DetailedHealthState") - // 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. "DetailedHealthState") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceInstanceHealth) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceInstanceHealth - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttempt struct { - // Errors: [Output Only] Encountered errors during the last attempt to - // create or delete the instance. - Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttempt - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors -// during the last attempt to create or delete the instance. -type ManagedInstanceLastAttemptErrors struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"` + // "ALLOW" - Location is allowed for use. + // "DENY" - Location is prohibited. + // "PREFERENCE_UNSPECIFIED" - Default value, unused. + Preference string `json:"preference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to + // ForceSendFields is a list of field names (e.g. "Constraints") 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 @@ -28116,40 +28124,29 @@ type ManagedInstanceLastAttemptErrors struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Constraints") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrors +func (s *LocationPolicyLocation) MarshalJSON() ([]byte, error) { + type NoMethod LocationPolicyLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ManagedInstanceLastAttemptErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // ErrorDetails: [Output Only] An optional list of messages that contain - // the error details. There is a set of defined message types to use for - // providing details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*ManagedInstanceLastAttemptErrorsErrorsErrorDetails `json:"errorDetails,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` +// LocationPolicyLocationConstraints: Per-zone constraints on location +// policy for this zone. +type LocationPolicyLocationConstraints struct { + // MaxCount: Maximum number of items that are allowed to be placed in + // this zone. The value must be non-negative. + MaxCount int64 `json:"maxCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "MaxCount") 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 @@ -28157,8 +28154,8 @@ type ManagedInstanceLastAttemptErrorsErrors struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "MaxCount") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -28166,22 +28163,24 @@ type ManagedInstanceLastAttemptErrorsErrors struct { NullFields []string `json:"-"` } -func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrorsErrors +func (s *LocationPolicyLocationConstraints) MarshalJSON() ([]byte, error) { + type NoMethod LocationPolicyLocationConstraints raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - - Help *Help `json:"help,omitempty"` +// LogConfig: This is deprecated and has no effect. Do not use. +type LogConfig struct { + // CloudAudit: This is deprecated and has no effect. Do not use. + CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` + // Counter: This is deprecated and has no effect. Do not use. + Counter *LogConfigCounterOptions `json:"counter,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` + // DataAccess: This is deprecated and has no effect. Do not use. + DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to + // ForceSendFields is a list of field names (e.g. "CloudAudit") 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 @@ -28189,7 +28188,7 @@ type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in + // NullFields is a list of field names (e.g. "CloudAudit") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -28198,164 +28197,67 @@ type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { NullFields []string `json:"-"` } -func (s *ManagedInstanceLastAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrorsErrorsErrorDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceVersion struct { - // InstanceTemplate: [Output Only] The intended template of the - // instance. This field is empty when current_action is one of { - // DELETING, ABANDONING }. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // Name: [Output Only] Name of the version. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") 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. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceVersion) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceVersion +func (s *LogConfig) MarshalJSON() ([]byte, error) { + type NoMethod LogConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Metadata: A metadata key/value entry. -type Metadata struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata, otherwise the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve the resource. - Fingerprint string `json:"fingerprint,omitempty"` - - // Items: Array of key/value pairs. The total size of all keys and - // values must be less than 512 KB. - Items []*MetadataItems `json:"items,omitempty"` +// LogConfigCloudAuditOptions: This is deprecated and has no effect. Do +// not use. +type LogConfigCloudAuditOptions struct { + // AuthorizationLoggingOptions: This is deprecated and has no effect. Do + // not use. + AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#metadata for - // metadata. - Kind string `json:"kind,omitempty"` + // LogName: This is deprecated and has no effect. Do not use. + // + // Possible values: + // "ADMIN_ACTIVITY" - This is deprecated and has no effect. Do not + // use. + // "DATA_ACCESS" - This is deprecated and has no effect. Do not use. + // "UNSPECIFIED_LOG_NAME" - This is deprecated and has no effect. Do + // not use. + LogName string `json:"logName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AuthorizationLoggingOptions") 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. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "AuthorizationLoggingOptions") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Metadata) MarshalJSON() ([]byte, error) { - type NoMethod Metadata +func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCloudAuditOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MetadataItems: Metadata -type MetadataItems struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is - // reflected as part of a URL in the metadata server. Additionally, to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - - // Value: Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the - // instance. The only restriction placed on values is that their size - // must be less than or equal to 262144 bytes (256 KiB). - Value *string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *MetadataItems) MarshalJSON() ([]byte, error) { - type NoMethod MetadataItems - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +// LogConfigCounterOptions: This is deprecated and has no effect. Do not +// use. +type LogConfigCounterOptions struct { + // CustomFields: This is deprecated and has no effect. Do not use. + CustomFields []*LogConfigCounterOptionsCustomField `json:"customFields,omitempty"` -// MetadataFilter: Opaque filter criteria used by load balancers to -// restrict routing configuration to a limited set of load balancing -// proxies. Proxies and sidecars involved in load balancing would -// typically present metadata to the load balancers that need to match -// criteria specified here. If a match takes place, the relevant -// configuration is made available to those proxies. For each -// metadataFilter in this list, if its filterMatchCriteria is set to -// MATCH_ANY, at least one of the filterLabels must match the -// corresponding label provided in the metadata. If its -// filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels -// must match with corresponding labels provided in the metadata. An -// example for using metadataFilters would be: if load balancing -// involves Envoys, they receive routing configuration when values in -// metadataFilters match values supplied in of their XDS requests to -// loadbalancers. -type MetadataFilter struct { - // FilterLabels: The list of label value pairs that must match labels in - // the provided metadata based on filterMatchCriteria This list must not - // be empty and can have at the most 64 entries. - FilterLabels []*MetadataFilterLabelMatch `json:"filterLabels,omitempty"` + // Field: This is deprecated and has no effect. Do not use. + Field string `json:"field,omitempty"` - // FilterMatchCriteria: Specifies how individual filter label matches - // within the list of filterLabels and contributes toward the overall - // metadataFilter match. Supported values are: - MATCH_ANY: at least one - // of the filterLabels must have a matching label in the provided - // metadata. - MATCH_ALL: all filterLabels must have matching labels in - // the provided metadata. - // - // Possible values: - // "MATCH_ALL" - Specifies that all filterLabels must match for the - // metadataFilter to be considered a match. - // "MATCH_ANY" - Specifies that any filterLabel must match for the - // metadataFilter to be considered a match. - // "NOT_SET" - Indicates that the match criteria was not set. A - // metadataFilter must never be created with this value. - FilterMatchCriteria string `json:"filterMatchCriteria,omitempty"` + // Metric: This is deprecated and has no effect. Do not use. + Metric string `json:"metric,omitempty"` - // ForceSendFields is a list of field names (e.g. "FilterLabels") to + // ForceSendFields is a list of field names (e.g. "CustomFields") 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 @@ -28363,7 +28265,7 @@ type MetadataFilter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FilterLabels") to include + // NullFields is a list of field names (e.g. "CustomFields") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -28372,22 +28274,19 @@ type MetadataFilter struct { NullFields []string `json:"-"` } -func (s *MetadataFilter) MarshalJSON() ([]byte, error) { - type NoMethod MetadataFilter +func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MetadataFilterLabelMatch: MetadataFilter label name value pairs that -// are expected to match corresponding labels presented as metadata to -// the load balancer. -type MetadataFilterLabelMatch struct { - // Name: Name of metadata label. The name can have a maximum length of - // 1024 characters and must be at least 1 character long. +// LogConfigCounterOptionsCustomField: This is deprecated and has no +// effect. Do not use. +type LogConfigCounterOptionsCustomField struct { + // Name: This is deprecated and has no effect. Do not use. Name string `json:"name,omitempty"` - // Value: The value of the label must match the specified value. value - // can have a maximum length of 1024 characters. + // Value: This is deprecated and has no effect. Do not use. Value string `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -28407,150 +28306,25 @@ type MetadataFilterLabelMatch struct { NullFields []string `json:"-"` } -func (s *MetadataFilterLabelMatch) MarshalJSON() ([]byte, error) { - type NoMethod MetadataFilterLabelMatch - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NamedPort: The named port. For example: <"http", 80>. -type NamedPort struct { - // Name: The name for this named port. The name must be 1-63 characters - // long, and comply with RFC1035. - Name string `json:"name,omitempty"` - - // Port: The port number, which can be a value between 1 and 65535. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty 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 *NamedPort) MarshalJSON() ([]byte, error) { - type NoMethod NamedPort +func (s *LogConfigCounterOptionsCustomField) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptionsCustomField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Network: Represents a VPC Network resource. Networks connect -// resources to each other and to the internet. For more information, -// read Virtual Private Cloud (VPC) Network. -type Network struct { - // IPv4Range: Deprecated in favor of subnet mode networks. The range of - // internal addresses that are legal on this network. This range is a - // CIDR specification, for example: 192.168.0.0/16. Provided by the - // client when the network is created. - IPv4Range string `json:"IPv4Range,omitempty"` - - // AutoCreateSubnetworks: Must be set to create a VPC network. If not - // set, a legacy network is created. When set to true, the VPC network - // is created in auto mode. When set to false, the VPC network is - // created in custom mode. An auto mode VPC network starts with one - // subnet per region. Each subnet has a predetermined range as described - // in Auto mode VPC network IP ranges. For custom mode VPC networks, you - // can add subnets using the subnetworks insert method. - AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // field when you create the resource. - Description string `json:"description,omitempty"` - - // EnableUlaInternalIpv6: Enable ULA internal ipv6 on this network. - // Enabling this feature will assign a /48 from google defined ULA - // prefix fd20::/20. . - EnableUlaInternalIpv6 bool `json:"enableUlaInternalIpv6,omitempty"` - - // FirewallPolicy: [Output Only] URL of the firewall policy the network - // is associated with. - FirewallPolicy string `json:"firewallPolicy,omitempty"` - - // GatewayIPv4: [Output Only] The gateway address for default routing - // out of the network, selected by Google Cloud. - GatewayIPv4 string `json:"gatewayIPv4,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InternalIpv6Range: When enabling ula internal ipv6, caller optionally - // can specify the /48 range they want from the google defined ULA - // prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and - // must be within the fd20::/20. Operation will fail if the speficied - // /48 is already in used by another resource. If the field is not - // speficied, then a /48 range will be randomly allocated from fd20::/20 - // and returned via this field. . - InternalIpv6Range string `json:"internalIpv6Range,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#network for - // networks. - Kind string `json:"kind,omitempty"` - - // Mtu: Maximum Transmission Unit in bytes. The minimum value for this - // field is 1300 and the maximum value is 8896. The suggested value is - // 1500, which is the default MTU used on the Internet, or 8896 if you - // want to use Jumbo frames. If unspecified, the value defaults to 1460. - Mtu int64 `json:"mtu,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first - // character must be a lowercase letter, and all following characters - // (except for the last character) must be a dash, lowercase letter, or - // digit. The last character must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - - // NetworkFirewallPolicyEnforcementOrder: The network firewall policy - // enforcement order. Can be either AFTER_CLASSIC_FIREWALL or - // BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the - // field is not specified. +// LogConfigDataAccessOptions: This is deprecated and has no effect. Do +// not use. +type LogConfigDataAccessOptions struct { + // LogMode: This is deprecated and has no effect. Do not use. // // Possible values: - // "AFTER_CLASSIC_FIREWALL" - // "BEFORE_CLASSIC_FIREWALL" - NetworkFirewallPolicyEnforcementOrder string `json:"networkFirewallPolicyEnforcementOrder,omitempty"` - - // Peerings: [Output Only] A list of network peerings for the resource. - Peerings []*NetworkPeering `json:"peerings,omitempty"` - - // RoutingConfig: The network-level routing configuration for this - // network. Used by Cloud Router to determine what type of network-wide - // routing behavior to enforce. - RoutingConfig *NetworkRoutingConfig `json:"routingConfig,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SelfLinkWithId: [Output Only] Server-defined URL for this resource - // with the resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // Subnetworks: [Output Only] Server-defined fully-qualified URLs for - // all subnetworks in this VPC network. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // "LOG_FAIL_CLOSED" - This is deprecated and has no effect. Do not + // use. + // "LOG_MODE_UNSPECIFIED" - This is deprecated and has no effect. Do + // not use. + LogMode string `json:"logMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPv4Range") to + // ForceSendFields is a list of field names (e.g. "LogMode") 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 @@ -28558,7 +28332,7 @@ type Network struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPv4Range") to include in + // NullFields is a list of field names (e.g. "LogMode") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -28567,47 +28341,55 @@ type Network struct { NullFields []string `json:"-"` } -func (s *Network) MarshalJSON() ([]byte, error) { - type NoMethod Network +func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigDataAccessOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkAttachment: NetworkAttachments A network attachment resource -// ... -type NetworkAttachment struct { - // ConnectionEndpoints: [Output Only] An array of connections for all - // the producers connected to this network attachment. - ConnectionEndpoints []*NetworkAttachmentConnectedEndpoint `json:"connectionEndpoints,omitempty"` - - // Possible values: - // "ACCEPT_AUTOMATIC" - // "ACCEPT_MANUAL" - // "INVALID" - ConnectionPreference string `json:"connectionPreference,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. +// MachineImage: Represents a machine image resource. A machine image is +// a Compute Engine resource that stores all the configuration, +// metadata, permissions, and data from one or more disks required to +// create a Virtual machine (VM) instance. For more information, see +// Machine images. +type MachineImage struct { + // CreationTimestamp: [Output Only] The creation timestamp for this + // machine image in RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` - // Fingerprint: [Output Only] Fingerprint of this resource. A hash of - // the contents stored in this object. This field is used in optimistic - // locking. An up-to-date fingerprint must be provided in order to - // patch. - Fingerprint string `json:"fingerprint,omitempty"` + // GuestFlush: [Input Only] Whether to attempt an application consistent + // machine image by informing the OS to prepare for the snapshot + // process. + GuestFlush bool `json:"guestFlush,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server generates this identifier. + // Id: [Output Only] A unique identifier for this machine image. The + // server defines this identifier. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. + // InstanceProperties: [Output Only] Properties of source instance + InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#machineImage for machine image. Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource + // MachineImageEncryptionKey: Encrypts the machine image using a + // customer-supplied encryption key. After you encrypt a machine image + // using a customer-supplied key, you must provide the same key if you + // use the machine image later. For example, you must provide the + // encryption key when you create an instance from the encrypted machine + // image in a future request. Customer-supplied encryption keys do not + // protect access to metadata of the machine image. If you do not + // provide an encryption key when creating the machine image, then the + // machine image will be encrypted using an automatically generated key + // and you do not need to provide a key to use the machine image later. + MachineImageEncryptionKey *CustomerEncryptionKey `json:"machineImageEncryptionKey,omitempty"` + + // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means @@ -28616,47 +28398,59 @@ type NetworkAttachment struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: [Output Only] The URL of the network which the Network - // Attachment belongs to. Practically it is inferred by fetching the - // network of the first subnetwork associated. Because it is required - // that all the subnetworks must be from the same network, it is assured - // that the Network Attachment belongs to the same network as all the - // subnetworks. - Network string `json:"network,omitempty"` + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ProducerAcceptLists: Projects that are allowed to connect to this - // network attachment. The project can be specified using its id or - // number. - ProducerAcceptLists []string `json:"producerAcceptLists,omitempty"` + // SavedDisks: An array of Machine Image specific properties for disks + // attached to the source instance + SavedDisks []*SavedDisk `json:"savedDisks,omitempty"` - // ProducerRejectLists: Projects that are not allowed to connect to this - // network attachment. The project can be specified using its id or - // number. - ProducerRejectLists []string `json:"producerRejectLists,omitempty"` + // SelfLink: [Output Only] The URL for this machine image. The server + // defines this URL. + SelfLink string `json:"selfLink,omitempty"` - // Region: [Output Only] URL of the region where the network attachment - // resides. This field applies only to the region resource. You must - // specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. - Region string `json:"region,omitempty"` + // SourceDiskEncryptionKeys: [Input Only] The customer-supplied + // encryption key of the disks attached to the source instance. Required + // if the source disk is protected by a customer-supplied encryption + // key. + SourceDiskEncryptionKeys []*SourceDiskEncryptionKey `json:"sourceDiskEncryptionKeys,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // SourceInstance: The source instance used to create the machine image. + // You can provide this as a partial or full URL to the resource. For + // example, the following are valid values: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /instances/instance - projects/project/zones/zone/instances/instance + SourceInstance string `json:"sourceInstance,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // SourceInstanceProperties: [Output Only] DEPRECATED: Please use + // instance_properties instead for source instance related properties. + // New properties will not be added to this field. + SourceInstanceProperties *SourceInstanceProperties `json:"sourceInstanceProperties,omitempty"` - // Subnetworks: An array of URLs where each entry is the URL of a subnet - // provided by the service consumer to use for endpoints in the - // producers that connect to this network attachment. - Subnetworks []string `json:"subnetworks,omitempty"` + // Status: [Output Only] The status of the machine image. One of the + // following values: INVALID, CREATING, READY, DELETING, and UPLOADING. + // + // Possible values: + // "CREATING" + // "DELETING" + // "INVALID" + // "READY" + // "UPLOADING" + Status string `json:"status,omitempty"` + + // StorageLocations: The regional or multi-regional Cloud Storage bucket + // location where the machine image is stored. + StorageLocations []string `json:"storageLocations,omitempty"` + + // TotalStorageBytes: [Output Only] Total size of the storage used by + // the machine image. + TotalStorageBytes int64 `json:"totalStorageBytes,omitempty,string"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConnectionEndpoints") + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") // 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 @@ -28664,7 +28458,7 @@ type NetworkAttachment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionEndpoints") to + // NullFields is a list of field names (e.g. "CreationTimestamp") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -28674,22 +28468,23 @@ type NetworkAttachment struct { NullFields []string `json:"-"` } -func (s *NetworkAttachment) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachment +func (s *MachineImage) MarshalJSON() ([]byte, error) { + type NoMethod MachineImage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkAttachmentAggregatedList: Contains a list of -// NetworkAttachmentsScopedList. -type NetworkAttachmentAggregatedList struct { +// MachineImageList: A list of machine images. +type MachineImageList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NetworkAttachmentsScopedList resources. - Items map[string]NetworkAttachmentsScopedList `json:"items,omitempty"` + // Items: A list of MachineImage resources. + Items []*MachineImage `json:"items,omitempty"` + // Kind: [Output Only] The resource type, which is always + // compute#machineImagesListResponse for machine image lists. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -28704,7 +28499,7 @@ type NetworkAttachmentAggregatedList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *NetworkAttachmentAggregatedListWarning `json:"warning,omitempty"` + Warning *MachineImageListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -28727,15 +28522,14 @@ type NetworkAttachmentAggregatedList struct { NullFields []string `json:"-"` } -func (s *NetworkAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedList +func (s *MachineImageList) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkAttachmentAggregatedListWarning: [Output Only] Informational -// warning message. -type NetworkAttachmentAggregatedListWarning struct { +// MachineImageListWarning: [Output Only] Informational warning message. +type MachineImageListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -28803,7 +28597,7 @@ type NetworkAttachmentAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkAttachmentAggregatedListWarningData `json:"data,omitempty"` + Data []*MachineImageListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -28826,13 +28620,13 @@ type NetworkAttachmentAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedListWarning +func (s *MachineImageListWarning) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkAttachmentAggregatedListWarningData struct { +type MachineImageListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -28863,47 +28657,80 @@ type NetworkAttachmentAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedListWarningData +func (s *MachineImageListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkAttachmentConnectedEndpoint: [Output Only] A connection -// connected to this network attachment. -type NetworkAttachmentConnectedEndpoint struct { - // IpAddress: The IP address assigned to the producer instance network - // interface. This value will be a range in case of Serverless. - IpAddress string `json:"ipAddress,omitempty"` +// MachineType: Represents a Machine Type resource. You can use specific +// machine types for your VM instances based on performance and pricing +// requirements. For more information, read Machine Types. +type MachineType struct { + // Accelerators: [Output Only] A list of accelerator configurations + // assigned to this machine type. + Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` - // ProjectIdOrNum: The project id or number of the interface to which - // the IP was assigned. - ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` + // BundledLocalSsds: [Output Only] The configuration of bundled local + // SSD for the machine type. + BundledLocalSsds *BundledLocalSsds `json:"bundledLocalSsds,omitempty"` - // SecondaryIpCidrRanges: Alias IP ranges from the same subnetwork. - SecondaryIpCidrRanges []string `json:"secondaryIpCidrRanges,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Status: The status of a connected endpoint to this network - // attachment. - // - // Possible values: - // "ACCEPTED" - The consumer allows traffic from the producer to reach - // its VPC. - // "CLOSED" - The consumer network attachment no longer exists. - // "NEEDS_ATTENTION" - The consumer needs to take further action - // before traffic can be served. - // "PENDING" - The consumer neither allows nor prohibits traffic from - // the producer to reach its VPC. - // "REJECTED" - The consumer prohibits traffic from the producer to - // reach its VPC. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` + // Deprecated -- [Output Only] The deprecation status associated with + // this machine type. Only applicable if the machine type is + // unavailable. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Subnetwork: The subnetwork used to assign the IP to the producer - // instance network interface. - Subnetwork string `json:"subnetwork,omitempty"` + // Description: [Output Only] An optional textual description of the + // resource. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to + // GuestCpus: [Output Only] The number of virtual CPUs that are + // available to the instance. + GuestCpus int64 `json:"guestCpus,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // IsSharedCpu: [Output Only] Whether this machine type has a shared + // CPU. See Shared-core machine types for more information. + IsSharedCpu bool `json:"isSharedCpu,omitempty"` + + // Kind: [Output Only] The type of the resource. Always + // compute#machineType for machine types. + Kind string `json:"kind,omitempty"` + + // MaximumPersistentDisks: [Output Only] Maximum persistent disks + // allowed. + MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` + + // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent + // disks size (GB) allowed. + MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` + + // MemoryMb: [Output Only] The amount of physical memory available to + // the instance, defined in MB. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Zone: [Output Only] The name of the zone where the machine type + // resides, such as us-central1-a. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Accelerators") 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 @@ -28911,29 +28738,66 @@ type NetworkAttachmentConnectedEndpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Accelerators") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NetworkAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentConnectedEndpoint +func (s *MachineType) MarshalJSON() ([]byte, error) { + type NoMethod MachineType raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkAttachmentList struct { +type MachineTypeAccelerators struct { + // GuestAcceleratorCount: Number of accelerator cards exposed to the + // guest. + GuestAcceleratorCount int64 `json:"guestAcceleratorCount,omitempty"` + + // GuestAcceleratorType: The accelerator type resource name, not a full + // URL, e.g. nvidia-tesla-t4. + GuestAcceleratorType string `json:"guestAcceleratorType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "GuestAcceleratorCount") 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. "GuestAcceleratorCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MachineTypeAccelerators) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypeAccelerators + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type MachineTypeAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NetworkAttachment resources. - Items []*NetworkAttachment `json:"items,omitempty"` + // Items: A list of MachineTypesScopedList resources. + Items map[string]MachineTypesScopedList `json:"items,omitempty"` + // Kind: [Output Only] Type of resource. Always + // compute#machineTypeAggregatedList for aggregated lists of machine + // types. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -28947,8 +28811,11 @@ type NetworkAttachmentList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *NetworkAttachmentListWarning `json:"warning,omitempty"` + Warning *MachineTypeAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -28971,15 +28838,15 @@ type NetworkAttachmentList struct { NullFields []string `json:"-"` } -func (s *NetworkAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentList +func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypeAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkAttachmentListWarning: [Output Only] Informational warning +// MachineTypeAggregatedListWarning: [Output Only] Informational warning // message. -type NetworkAttachmentListWarning struct { +type MachineTypeAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -29047,7 +28914,7 @@ type NetworkAttachmentListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkAttachmentListWarningData `json:"data,omitempty"` + Data []*MachineTypeAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -29070,13 +28937,13 @@ type NetworkAttachmentListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentListWarning +func (s *MachineTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypeAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkAttachmentListWarningData struct { +type MachineTypeAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -29107,275 +28974,23 @@ type NetworkAttachmentListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentListWarningData +func (s *MachineTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypeAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkAttachmentsScopedList struct { - // NetworkAttachments: A list of NetworkAttachments contained in this - // scope. - NetworkAttachments []*NetworkAttachment `json:"networkAttachments,omitempty"` +// MachineTypeList: Contains a list of machine types. +type MachineTypeList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Warning: Informational warning which replaces the list of network - // attachments when the list is empty. - Warning *NetworkAttachmentsScopedListWarning `json:"warning,omitempty"` + // Items: A list of MachineType resources. + Items []*MachineType `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkAttachments") - // 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. "NetworkAttachments") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentsScopedListWarning: Informational warning which -// replaces the list of network attachments when the list is empty. -type NetworkAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*NetworkAttachmentsScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedListWarning - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkEdgeSecurityService: Represents a Google Cloud Armor network -// edge security service resource. -type NetworkEdgeSecurityService struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a NetworkEdgeSecurityService. An - // up-to-date fingerprint must be provided in order to update the - // NetworkEdgeSecurityService, otherwise the request will fail with - // error 412 conditionNotMet. To see the latest fingerprint, make a - // get() request to retrieve a NetworkEdgeSecurityService. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output only] Type of the resource. Always - // compute#networkEdgeSecurityService for NetworkEdgeSecurityServices - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the resource resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - - // SecurityPolicy: The resource URL for the network edge security - // service associated with this network edge security service. - SecurityPolicy string `json:"securityPolicy,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SelfLinkWithId: [Output Only] Server-defined URL for this resource - // with the resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEdgeSecurityService) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityService - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServiceAggregatedList struct { - Etag string `json:"etag,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of NetworkEdgeSecurityServicesScopedList resources. - Items map[string]NetworkEdgeSecurityServicesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#networkEdgeSecurityServiceAggregatedList for lists of Network - // Edge Security Services. + // Kind: [Output Only] Type of resource. Always compute#machineTypeList + // for lists of machine types. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -29389,17 +29004,14 @@ type NetworkEdgeSecurityServiceAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEdgeSecurityServiceAggregatedListWarning `json:"warning,omitempty"` + Warning *MachineTypeListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -29407,7 +29019,7 @@ type NetworkEdgeSecurityServiceAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API + // NullFields is a list of field names (e.g. "Id") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -29416,15 +29028,14 @@ type NetworkEdgeSecurityServiceAggregatedList struct { NullFields []string `json:"-"` } -func (s *NetworkEdgeSecurityServiceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedList +func (s *MachineTypeList) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypeList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEdgeSecurityServiceAggregatedListWarning: [Output Only] -// Informational warning message. -type NetworkEdgeSecurityServiceAggregatedListWarning struct { +// MachineTypeListWarning: [Output Only] Informational warning message. +type MachineTypeListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -29492,7 +29103,7 @@ type NetworkEdgeSecurityServiceAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkEdgeSecurityServiceAggregatedListWarningData `json:"data,omitempty"` + Data []*MachineTypeListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -29515,13 +29126,13 @@ type NetworkEdgeSecurityServiceAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkEdgeSecurityServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedListWarning +func (s *MachineTypeListWarning) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypeListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEdgeSecurityServiceAggregatedListWarningData struct { +type MachineTypeListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -29552,49 +29163,47 @@ type NetworkEdgeSecurityServiceAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkEdgeSecurityServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedListWarningData +func (s *MachineTypeListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypeListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEdgeSecurityServicesScopedList struct { - // NetworkEdgeSecurityServices: A list of NetworkEdgeSecurityServices - // contained in this scope. - NetworkEdgeSecurityServices []*NetworkEdgeSecurityService `json:"networkEdgeSecurityServices,omitempty"` +type MachineTypesScopedList struct { + // MachineTypes: [Output Only] A list of machine types contained in this + // scope. + MachineTypes []*MachineType `json:"machineTypes,omitempty"` - // Warning: Informational warning which replaces the list of security - // policies when the list is empty. - Warning *NetworkEdgeSecurityServicesScopedListWarning `json:"warning,omitempty"` + // Warning: [Output Only] An informational warning that appears when the + // machine types list is empty. + Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "NetworkEdgeSecurityServices") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "MachineTypes") 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. - // "NetworkEdgeSecurityServices") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an 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. "MachineTypes") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NetworkEdgeSecurityServicesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedList +func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEdgeSecurityServicesScopedListWarning: Informational warning -// which replaces the list of security policies when the list is empty. -type NetworkEdgeSecurityServicesScopedListWarning struct { +// MachineTypesScopedListWarning: [Output Only] An informational warning +// that appears when the machine types list is empty. +type MachineTypesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -29662,7 +29271,7 @@ type NetworkEdgeSecurityServicesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkEdgeSecurityServicesScopedListWarningData `json:"data,omitempty"` + Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -29685,13 +29294,13 @@ type NetworkEdgeSecurityServicesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkEdgeSecurityServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedListWarning +func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEdgeSecurityServicesScopedListWarningData struct { +type MachineTypesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -29722,187 +29331,155 @@ type NetworkEdgeSecurityServicesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkEdgeSecurityServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedListWarningData +func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod MachineTypesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpoint: The network endpoint. -type NetworkEndpoint struct { - // Annotations: Metadata defined as annotations on the network endpoint. - Annotations map[string]string `json:"annotations,omitempty"` +// ManagedInstance: A Managed Instance resource. +type ManagedInstance struct { + // AllInstancesConfig: [Output Only] Current all-instances configuration + // revision applied to this instance. + AllInstancesConfig *ManagedInstanceAllInstancesConfig `json:"allInstancesConfig,omitempty"` - // Fqdn: Optional fully qualified domain name of network endpoint. This - // can only be specified when NetworkEndpointGroup.network_endpoint_type - // is NON_GCP_FQDN_PORT. - Fqdn string `json:"fqdn,omitempty"` + // CurrentAction: [Output Only] The current action that the managed + // instance group has scheduled for the instance. Possible values: - + // NONE The instance is running, and the managed instance group does not + // have any scheduled actions for this instance. - CREATING The managed + // instance group is creating this instance. If the group fails to + // create this instance, it will try again until it is successful. - + // CREATING_WITHOUT_RETRIES The managed instance group is attempting to + // create this instance only once. If the group fails to create this + // instance, it does not try again and the group's targetSize value is + // decreased instead. - RECREATING The managed instance group is + // recreating this instance. - DELETING The managed instance group is + // permanently deleting this instance. - ABANDONING The managed instance + // group is abandoning this instance. The instance will be removed from + // the instance group and from any target pools that are associated with + // this group. - RESTARTING The managed instance group is restarting the + // instance. - REFRESHING The managed instance group is applying + // configuration changes to the instance without stopping it. For + // example, the group can update the target pool list for an instance + // without stopping that instance. - VERIFYING The managed instance + // group has created the instance and it is in the process of being + // verified. + // + // Possible values: + // "ABANDONING" - The managed instance group is abandoning this + // instance. The instance will be removed from the instance group and + // from any target pools that are associated with this group. + // "CREATING" - The managed instance group is creating this instance. + // If the group fails to create this instance, it will try again until + // it is successful. + // "CREATING_WITHOUT_RETRIES" - The managed instance group is + // attempting to create this instance only once. If the group fails to + // create this instance, it does not try again and the group's + // targetSize value is decreased. + // "DELETING" - The managed instance group is permanently deleting + // this instance. + // "NONE" - The managed instance group has not scheduled any actions + // for this instance. + // "RECREATING" - The managed instance group is recreating this + // instance. + // "REFRESHING" - The managed instance group is applying configuration + // changes to the instance without stopping it. For example, the group + // can update the target pool list for an instance without stopping that + // instance. + // "RESTARTING" - The managed instance group is restarting this + // instance. + // "RESUMING" - The managed instance group is resuming this instance. + // "STARTING" - The managed instance group is starting this instance. + // "STOPPING" - The managed instance group is stopping this instance. + // "SUSPENDING" - The managed instance group is suspending this + // instance. + // "VERIFYING" - The managed instance group is verifying this already + // created instance. Verification happens every time the instance is + // (re)created or restarted and consists of: 1. Waiting until health + // check specified as part of this managed instance group's autohealing + // policy reports HEALTHY. Note: Applies only if autohealing policy has + // a health check specified 2. Waiting for addition verification steps + // performed as post-instance creation (subject to future extensions). + CurrentAction string `json:"currentAction,omitempty"` - // Instance: The name for a specific VM instance that the IP address - // belongs to. This is required for network endpoints of type - // GCE_VM_IP_PORT. The instance must be in the same zone of network - // endpoint group. The name must be 1-63 characters long, and comply - // with RFC1035. + // Id: [Output only] The unique identifier for this resource. This field + // is empty when instance does not exist. + Id uint64 `json:"id,omitempty,string"` + + // Instance: [Output Only] The URL of the instance. The URL can exist + // even if the instance has not yet been created. Instance string `json:"instance,omitempty"` - // IpAddress: Optional IPv4 address of network endpoint. The IP address - // must belong to a VM in Compute Engine (either the primary IP or as - // part of an aliased IP range). If the IP address is not specified, - // then the primary IP address for the VM instance in the network that - // the network endpoint group belongs to will be used. - IpAddress string `json:"ipAddress,omitempty"` + // InstanceHealth: [Output Only] Health state of the instance per + // health-check. + InstanceHealth []*ManagedInstanceInstanceHealth `json:"instanceHealth,omitempty"` - // Ipv6Address: Optional IPv6 address of network endpoint. - Ipv6Address string `json:"ipv6Address,omitempty"` + // InstanceStatus: [Output Only] The status of the instance. This field + // is empty when the instance does not exist. + // + // Possible values: + // "DEPROVISIONING" - The instance is halted and we are performing + // tear down tasks like network deprogramming, releasing quota, IP, + // tearing down disks etc. + // "PROVISIONING" - Resources are being allocated for the instance. + // "REPAIRING" - The instance is in repair. + // "RUNNING" - The instance is running. + // "STAGING" - All required resources have been allocated and the + // instance is being started. + // "STOPPED" - The instance has stopped successfully. + // "STOPPING" - The instance is currently stopping (either being + // deleted or killed). + // "SUSPENDED" - The instance has suspended. + // "SUSPENDING" - The instance is suspending. + // "TERMINATED" - The instance has stopped (either by explicit action + // or underlying failure). + InstanceStatus string `json:"instanceStatus,omitempty"` - // Port: Optional port number of network endpoint. If not specified, the - // defaultPort for the network endpoint group will be used. - Port int64 `json:"port,omitempty"` + // LastAttempt: [Output Only] Information about the last attempt to + // create or delete the instance. + LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with + // PreservedStateFromConfig: [Output Only] Preserved state applied from + // per-instance config for this instance. + PreservedStateFromConfig *PreservedState `json:"preservedStateFromConfig,omitempty"` + + // PreservedStateFromPolicy: [Output Only] Preserved state generated + // based on stateful policy for this instance. + PreservedStateFromPolicy *PreservedState `json:"preservedStateFromPolicy,omitempty"` + + // Version: [Output Only] Intended version of this instance. + Version *ManagedInstanceVersion `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") + // 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. "Annotations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AllInstancesConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpoint +func (s *ManagedInstance) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstance raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroup: Represents a collection of network endpoints. A -// network endpoint group (NEG) defines how a set of endpoints should be -// reached, whether they are reachable, and where they are located. For -// more information about using NEGs, see Setting up external HTTP(S) -// Load Balancing with internet NEGs, Setting up zonal NEGs, or Setting -// up external HTTP(S) Load Balancing with serverless NEGs. -type NetworkEndpointGroup struct { - // Annotations: Metadata defined as annotations on the network endpoint - // group. - Annotations map[string]string `json:"annotations,omitempty"` - - // AppEngine: Only valid when networkEndpointType is "SERVERLESS". Only - // one of cloudRun, appEngine or cloudFunction may be set. - AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` - - // CloudFunction: Only valid when networkEndpointType is "SERVERLESS". - // Only one of cloudRun, appEngine or cloudFunction may be set. - CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` - - // CloudRun: Only valid when networkEndpointType is "SERVERLESS". Only - // one of cloudRun, appEngine or cloudFunction may be set. - CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. - DefaultPort int64 `json:"defaultPort,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#networkEndpointGroup for network endpoint group. - Kind string `json:"kind,omitempty"` - - // LoadBalancer: This field is only valid when the network endpoint - // group is used for load balancing. [Deprecated] This field is - // deprecated. - LoadBalancer *NetworkEndpointGroupLbNetworkEndpointGroup `json:"loadBalancer,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the network to which all network endpoints in the - // NEG belong. Uses "default" project network if unspecified. - Network string `json:"network,omitempty"` - - // NetworkEndpointType: Type of network endpoints in this network - // endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, - // NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, - // SERVERLESS, PRIVATE_SERVICE_CONNECT. - // - // Possible values: - // "GCE_VM_IP" - The network endpoint is represented by an IP address. - // "GCE_VM_IP_PORT" - The network endpoint is represented by IP - // address and port pair. - // "INTERNET_FQDN_PORT" - The network endpoint is represented by fully - // qualified domain name and port. - // "INTERNET_IP_PORT" - The network endpoint is represented by an - // internet IP address and port. - // "NON_GCP_PRIVATE_IP_PORT" - The network endpoint is represented by - // an IP address and port. The endpoint belongs to a VM or pod running - // in a customer's on-premises. - // "PRIVATE_SERVICE_CONNECT" - The network endpoint is either public - // Google APIs or services exposed by other GCP Project with a Service - // Attachment. The connection is set up by private service connect - // "SERVERLESS" - The network endpoint is handled by specified - // serverless infrastructure. - NetworkEndpointType string `json:"networkEndpointType,omitempty"` - - PscData *NetworkEndpointGroupPscData `json:"pscData,omitempty"` - - // PscTargetService: The target service url used to set up private - // service connection to a Google API or a PSC Producer Service - // Attachment. An example value is: - // "asia-northeast3-cloudkms.googleapis.com" - PscTargetService string `json:"pscTargetService,omitempty"` - - // Region: [Output Only] The URL of the region where the network - // endpoint group is located. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerlessDeployment: Only valid when networkEndpointType is - // "SERVERLESS". Only one of cloudRun, appEngine, cloudFunction or - // serverlessDeployment may be set. - ServerlessDeployment *NetworkEndpointGroupServerlessDeployment `json:"serverlessDeployment,omitempty"` - - // Size: [Output only] Number of network endpoints in the network - // endpoint group. - Size int64 `json:"size,omitempty"` - - // Subnetwork: Optional URL of the subnetwork to which all network - // endpoints in the NEG belong. - Subnetwork string `json:"subnetwork,omitempty"` - - // Zone: [Output Only] The URL of the zone where the network endpoint - // group is located. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +type ManagedInstanceAllInstancesConfig struct { + // Revision: [Output Only] Current all-instances configuration revision. + // This value is in RFC3339 text format. + Revision string `json:"revision,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to + // ForceSendFields is a list of field names (e.g. "Revision") 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 @@ -29910,56 +29487,75 @@ type NetworkEndpointGroup struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Revision") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NetworkEndpointGroup) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroup +func (s *ManagedInstanceAllInstancesConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceAllInstancesConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of NetworkEndpointGroupsScopedList resources. - Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] The resource type, which is always - // compute#networkEndpointGroupAggregatedList for aggregated lists of - // network endpoint groups. - Kind string `json:"kind,omitempty"` +type ManagedInstanceInstanceHealth struct { + // DetailedHealthState: [Output Only] The current detailed instance + // health state. + // + // Possible values: + // "DRAINING" - The instance is being drained. The existing + // connections to the instance have time to complete, but the new ones + // are being refused. + // "HEALTHY" - The instance is reachable i.e. a connection to the + // application health checking endpoint can be established, and conforms + // to the requirements defined by the health check. + // "TIMEOUT" - The instance is unreachable i.e. a connection to the + // application health checking endpoint cannot be established, or the + // server does not respond within the specified timeout. + // "UNHEALTHY" - The instance is reachable, but does not conform to + // the requirements defined by the health check. + // "UNKNOWN" - The health checking system is aware of the instance but + // its health is not known at the moment. + DetailedHealthState string `json:"detailedHealthState,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // HealthCheck: [Output Only] The URL for the health check that verifies + // whether the instance is healthy. + HealthCheck string `json:"healthCheck,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // ForceSendFields is a list of field names (e.g. "DetailedHealthState") + // 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:"-"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` + // NullFields is a list of field names (e.g. "DetailedHealthState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupAggregatedListWarning `json:"warning,omitempty"` +func (s *ManagedInstanceInstanceHealth) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceInstanceHealth + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +type ManagedInstanceLastAttempt struct { + // Errors: [Output Only] Encountered errors during the last attempt to + // create or delete the instance. + Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Errors") 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 @@ -29967,7 +29563,7 @@ type NetworkEndpointGroupAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Errors") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -29976,89 +29572,20 @@ type NetworkEndpointGroupAggregatedList struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedList +func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceLastAttempt raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupAggregatedListWarning: [Output Only] -// Informational warning message. -type NetworkEndpointGroupAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupAggregatedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` +// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors +// during the last attempt to create or delete the instance. +type ManagedInstanceLastAttemptErrors struct { + // Errors: [Output Only] The array of errors encountered while + // processing this operation. + Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Errors") 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 @@ -30066,7 +29593,7 @@ type NetworkEndpointGroupAggregatedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Errors") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -30075,27 +29602,31 @@ type NetworkEndpointGroupAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedListWarning +func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceLastAttemptErrors raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type ManagedInstanceLastAttemptErrorsErrors struct { + // Code: [Output Only] The error type identifier for this error. + Code string `json:"code,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // ErrorDetails: [Output Only] An optional list of messages that contain + // the error details. There is a set of defined message types to use for + // providing details.The syntax depends on the error code. For example, + // QuotaExceededInfo will have details when the error code is + // QUOTA_EXCEEDED. + ErrorDetails []*ManagedInstanceLastAttemptErrorsErrorsErrorDetails `json:"errorDetails,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // Location: [Output Only] Indicates the field in the request that + // caused the error. This property is optional. + Location string `json:"location,omitempty"` + + // Message: [Output Only] An optional, human-readable error message. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -30103,7 +29634,7 @@ type NetworkEndpointGroupAggregatedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Code") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -30112,41 +29643,22 @@ type NetworkEndpointGroupAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedListWarningData +func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceLastAttemptErrorsErrors raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupAppEngine: Configuration for an App Engine -// network endpoint group (NEG). The service is optional, may be -// provided explicitly or in the URL mask. The version is optional and -// can only be provided explicitly or in the URL mask when service is -// present. Note: App Engine service must be in the same project and -// located in the same region as the Serverless NEG. -type NetworkEndpointGroupAppEngine struct { - // Service: Optional serving service. The service name is case-sensitive - // and must be 1-63 characters long. Example value: "default", - // "my-service". - Service string `json:"service,omitempty"` +type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { + ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - // UrlMask: A template to parse service and version fields from a - // request URL. URL mask allows for routing to multiple App Engine - // services without having to create multiple Network Endpoint Groups - // and backend services. For example, the request URLs - // "foo1-dot-appname.appspot.com/v1" and - // "foo1-dot-appname.appspot.com/v2" can be backed by the same - // Serverless NEG with URL mask - // "-dot-appname.appspot.com/". The URL mask will - // parse them to { service = "foo1", version = "v1" } and { service = - // "foo1", version = "v2" } respectively. - UrlMask string `json:"urlMask,omitempty"` + Help *Help `json:"help,omitempty"` - // Version: Optional serving version. The version name is case-sensitive - // and must be 1-100 characters long. Example value: "v1", "v2". - Version string `json:"version,omitempty"` + LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to + QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorInfo") 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 @@ -30154,7 +29666,7 @@ type NetworkEndpointGroupAppEngine struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in + // NullFields is a list of field names (e.g. "ErrorInfo") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -30163,32 +29675,22 @@ type NetworkEndpointGroupAppEngine struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupAppEngine) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAppEngine +func (s *ManagedInstanceLastAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceLastAttemptErrorsErrorsErrorDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupCloudFunction: Configuration for a Cloud Function -// network endpoint group (NEG). The function must be provided -// explicitly or in the URL mask. Note: Cloud Function must be in the -// same project and located in the same region as the Serverless NEG. -type NetworkEndpointGroupCloudFunction struct { - // Function: A user-defined name of the Cloud Function. The function - // name is case-sensitive and must be 1-63 characters long. Example - // value: "func1". - Function string `json:"function,omitempty"` +type ManagedInstanceVersion struct { + // InstanceTemplate: [Output Only] The intended template of the + // instance. This field is empty when current_action is one of { + // DELETING, ABANDONING }. + InstanceTemplate string `json:"instanceTemplate,omitempty"` - // UrlMask: A template to parse function field from a request URL. URL - // mask allows for routing to multiple Cloud Functions without having to - // create multiple Network Endpoint Groups and backend services. For - // example, request URLs " mydomain.com/function1" and - // "mydomain.com/function2" can be backed by the same Serverless NEG - // with URL mask "/". The URL mask will parse them to { - // function = "function1" } and { function = "function2" } respectively. - UrlMask string `json:"urlMask,omitempty"` + // Name: [Output Only] Name of the version. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Function") to + // ForceSendFields is a list of field names (e.g. "InstanceTemplate") 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 @@ -30196,49 +29698,43 @@ type NetworkEndpointGroupCloudFunction struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Function") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "InstanceTemplate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupCloudFunction) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupCloudFunction +func (s *ManagedInstanceVersion) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceVersion raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupCloudRun: Configuration for a Cloud Run network -// endpoint group (NEG). The service must be provided explicitly or in -// the URL mask. The tag is optional, may be provided explicitly or in -// the URL mask. Note: Cloud Run service must be in the same project and -// located in the same region as the Serverless NEG. -type NetworkEndpointGroupCloudRun struct { - // Service: Cloud Run service is the main resource of Cloud Run. The - // service must be 1-63 characters long, and comply with RFC1035. - // Example value: "run-service". - Service string `json:"service,omitempty"` +// Metadata: A metadata key/value entry. +type Metadata struct { + // Fingerprint: Specifies a fingerprint for this request, which is + // essentially a hash of the metadata's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update metadata. You must + // always provide an up-to-date fingerprint hash in order to update or + // change metadata, otherwise the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve the resource. + Fingerprint string `json:"fingerprint,omitempty"` - // Tag: Optional Cloud Run tag represents the "named-revision" to - // provide additional fine-grained traffic routing information. The tag - // must be 1-63 characters long, and comply with RFC1035. Example value: - // "revision-0010". - Tag string `json:"tag,omitempty"` + // Items: Array of key/value pairs. The total size of all keys and + // values must be less than 512 KB. + Items []*MetadataItems `json:"items,omitempty"` - // UrlMask: A template to parse and fields from a - // request URL. URL mask allows for routing to multiple Run services - // without having to create multiple network endpoint groups and backend - // services. For example, request URLs "foo1.domain.com/bar1" and - // "foo1.domain.com/bar2" can be backed by the same Serverless Network - // Endpoint Group (NEG) with URL mask ".domain.com/". The - // URL mask will parse them to { service="bar1", tag="foo1" } and { - // service="bar2", tag="foo2" } respectively. - UrlMask string `json:"urlMask,omitempty"` + // Kind: [Output Only] Type of the resource. Always compute#metadata for + // metadata. + Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to + // ForceSendFields is a list of field names (e.g. "Fingerprint") 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 @@ -30246,43 +29742,37 @@ type NetworkEndpointGroupCloudRun struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupCloudRun) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupCloudRun +func (s *Metadata) MarshalJSON() ([]byte, error) { + type NoMethod Metadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupLbNetworkEndpointGroup: Load balancing specific -// fields for network endpoint group. -type NetworkEndpointGroupLbNetworkEndpointGroup struct { - // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. [Deprecated] This field is - // deprecated. - DefaultPort int64 `json:"defaultPort,omitempty"` - - // Network: The URL of the network to which all network endpoints in the - // NEG belong. Uses "default" project network if unspecified. - // [Deprecated] This field is deprecated. - Network string `json:"network,omitempty"` - - // Subnetwork: Optional URL of the subnetwork to which all network - // endpoints in the NEG belong. [Deprecated] This field is deprecated. - Subnetwork string `json:"subnetwork,omitempty"` +// MetadataItems: Metadata +type MetadataItems struct { + // Key: Key for the metadata entry. Keys must conform to the following + // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is + // reflected as part of a URL in the metadata server. Additionally, to + // avoid ambiguity, keys must not conflict with any other metadata keys + // for the project. + Key string `json:"key,omitempty"` - // Zone: [Output Only] The URL of the zone where the network endpoint - // group is located. [Deprecated] This field is deprecated. - Zone string `json:"zone,omitempty"` + // Value: Value for the metadata entry. These are free-form strings, and + // only have meaning as interpreted by the image running in the + // instance. The only restriction placed on values is that their size + // must be less than or equal to 262144 bytes (256 KiB). + Value *string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultPort") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -30290,31 +29780,392 @@ type NetworkEndpointGroupLbNetworkEndpointGroup struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultPort") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupLbNetworkEndpointGroup) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupLbNetworkEndpointGroup +func (s *MetadataItems) MarshalJSON() ([]byte, error) { + type NoMethod MetadataItems raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupList struct { +// MetadataFilter: Opaque filter criteria used by load balancers to +// restrict routing configuration to a limited set of load balancing +// proxies. Proxies and sidecars involved in load balancing would +// typically present metadata to the load balancers that need to match +// criteria specified here. If a match takes place, the relevant +// configuration is made available to those proxies. For each +// metadataFilter in this list, if its filterMatchCriteria is set to +// MATCH_ANY, at least one of the filterLabels must match the +// corresponding label provided in the metadata. If its +// filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels +// must match with corresponding labels provided in the metadata. An +// example for using metadataFilters would be: if load balancing +// involves Envoys, they receive routing configuration when values in +// metadataFilters match values supplied in of their XDS requests to +// loadbalancers. +type MetadataFilter struct { + // FilterLabels: The list of label value pairs that must match labels in + // the provided metadata based on filterMatchCriteria This list must not + // be empty and can have at the most 64 entries. + FilterLabels []*MetadataFilterLabelMatch `json:"filterLabels,omitempty"` + + // FilterMatchCriteria: Specifies how individual filter label matches + // within the list of filterLabels and contributes toward the overall + // metadataFilter match. Supported values are: - MATCH_ANY: at least one + // of the filterLabels must have a matching label in the provided + // metadata. - MATCH_ALL: all filterLabels must have matching labels in + // the provided metadata. + // + // Possible values: + // "MATCH_ALL" - Specifies that all filterLabels must match for the + // metadataFilter to be considered a match. + // "MATCH_ANY" - Specifies that any filterLabel must match for the + // metadataFilter to be considered a match. + // "NOT_SET" - Indicates that the match criteria was not set. A + // metadataFilter must never be created with this value. + FilterMatchCriteria string `json:"filterMatchCriteria,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FilterLabels") 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. "FilterLabels") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MetadataFilter) MarshalJSON() ([]byte, error) { + type NoMethod MetadataFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MetadataFilterLabelMatch: MetadataFilter label name value pairs that +// are expected to match corresponding labels presented as metadata to +// the load balancer. +type MetadataFilterLabelMatch struct { + // Name: Name of metadata label. The name can have a maximum length of + // 1024 characters and must be at least 1 character long. + Name string `json:"name,omitempty"` + + // Value: The value of the label must match the specified value. value + // can have a maximum length of 1024 characters. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty 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 *MetadataFilterLabelMatch) MarshalJSON() ([]byte, error) { + type NoMethod MetadataFilterLabelMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NamedPort: The named port. For example: <"http", 80>. +type NamedPort struct { + // Name: The name for this named port. The name must be 1-63 characters + // long, and comply with RFC1035. + Name string `json:"name,omitempty"` + + // Port: The port number, which can be a value between 1 and 65535. + Port int64 `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty 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 *NamedPort) MarshalJSON() ([]byte, error) { + type NoMethod NamedPort + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Network: Represents a VPC Network resource. Networks connect +// resources to each other and to the internet. For more information, +// read Virtual Private Cloud (VPC) Network. +type Network struct { + // IPv4Range: Deprecated in favor of subnet mode networks. The range of + // internal addresses that are legal on this network. This range is a + // CIDR specification, for example: 192.168.0.0/16. Provided by the + // client when the network is created. + IPv4Range string `json:"IPv4Range,omitempty"` + + // AutoCreateSubnetworks: Must be set to create a VPC network. If not + // set, a legacy network is created. When set to true, the VPC network + // is created in auto mode. When set to false, the VPC network is + // created in custom mode. An auto mode VPC network starts with one + // subnet per region. Each subnet has a predetermined range as described + // in Auto mode VPC network IP ranges. For custom mode VPC networks, you + // can add subnets using the subnetworks insert method. + AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // field when you create the resource. + Description string `json:"description,omitempty"` + + // EnableUlaInternalIpv6: Enable ULA internal ipv6 on this network. + // Enabling this feature will assign a /48 from google defined ULA + // prefix fd20::/20. . + EnableUlaInternalIpv6 bool `json:"enableUlaInternalIpv6,omitempty"` + + // FirewallPolicy: [Output Only] URL of the firewall policy the network + // is associated with. + FirewallPolicy string `json:"firewallPolicy,omitempty"` + + // GatewayIPv4: [Output Only] The gateway address for default routing + // out of the network, selected by Google Cloud. + GatewayIPv4 string `json:"gatewayIPv4,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // InternalIpv6Range: When enabling ula internal ipv6, caller optionally + // can specify the /48 range they want from the google defined ULA + // prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and + // must be within the fd20::/20. Operation will fail if the speficied + // /48 is already in used by another resource. If the field is not + // speficied, then a /48 range will be randomly allocated from fd20::/20 + // and returned via this field. . + InternalIpv6Range string `json:"internalIpv6Range,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#network for + // networks. + Kind string `json:"kind,omitempty"` + + // Mtu: Maximum Transmission Unit in bytes. The minimum value for this + // field is 1300 and the maximum value is 8896. The suggested value is + // 1500, which is the default MTU used on the Internet, or 8896 if you + // want to use Jumbo frames. If unspecified, the value defaults to 1460. + Mtu int64 `json:"mtu,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. + Name string `json:"name,omitempty"` + + // NetworkFirewallPolicyEnforcementOrder: The network firewall policy + // enforcement order. Can be either AFTER_CLASSIC_FIREWALL or + // BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the + // field is not specified. + // + // Possible values: + // "AFTER_CLASSIC_FIREWALL" + // "BEFORE_CLASSIC_FIREWALL" + NetworkFirewallPolicyEnforcementOrder string `json:"networkFirewallPolicyEnforcementOrder,omitempty"` + + // Peerings: [Output Only] A list of network peerings for the resource. + Peerings []*NetworkPeering `json:"peerings,omitempty"` + + // RoutingConfig: The network-level routing configuration for this + // network. Used by Cloud Router to determine what type of network-wide + // routing behavior to enforce. + RoutingConfig *NetworkRoutingConfig `json:"routingConfig,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // Subnetworks: [Output Only] Server-defined fully-qualified URLs for + // all subnetworks in this VPC network. + Subnetworks []string `json:"subnetworks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "IPv4Range") 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. "IPv4Range") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Network) MarshalJSON() ([]byte, error) { + type NoMethod Network + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkAttachment: NetworkAttachments A network attachment resource +// ... +type NetworkAttachment struct { + // ConnectionEndpoints: [Output Only] An array of connections for all + // the producers connected to this network attachment. + ConnectionEndpoints []*NetworkAttachmentConnectedEndpoint `json:"connectionEndpoints,omitempty"` + + // Possible values: + // "ACCEPT_AUTOMATIC" + // "ACCEPT_MANUAL" + // "INVALID" + ConnectionPreference string `json:"connectionPreference,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. An + // up-to-date fingerprint must be provided in order to patch. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource type. The + // server generates this identifier. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: [Output Only] The URL of the network which the Network + // Attachment belongs to. Practically it is inferred by fetching the + // network of the first subnetwork associated. Because it is required + // that all the subnetworks must be from the same network, it is assured + // that the Network Attachment belongs to the same network as all the + // subnetworks. + Network string `json:"network,omitempty"` + + // ProducerAcceptLists: Projects that are allowed to connect to this + // network attachment. The project can be specified using its id or + // number. + ProducerAcceptLists []string `json:"producerAcceptLists,omitempty"` + + // ProducerRejectLists: Projects that are not allowed to connect to this + // network attachment. The project can be specified using its id or + // number. + ProducerRejectLists []string `json:"producerRejectLists,omitempty"` + + // Region: [Output Only] URL of the region where the network attachment + // resides. This field applies only to the region resource. You must + // specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SelfLinkWithId: [Output Only] Server-defined URL for this resource's + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // Subnetworks: An array of URLs where each entry is the URL of a subnet + // provided by the service consumer to use for endpoints in the + // producers that connect to this network attachment. + Subnetworks []string `json:"subnetworks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ConnectionEndpoints") + // 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. "ConnectionEndpoints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkAttachment) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkAttachmentAggregatedList: Contains a list of +// NetworkAttachmentsScopedList. +type NetworkAttachmentAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointGroup resources. - Items []*NetworkEndpointGroup `json:"items,omitempty"` + // Items: A list of NetworkAttachmentsScopedList resources. + Items map[string]NetworkAttachmentsScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is always - // compute#networkEndpointGroupList for network endpoint group lists. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -30329,7 +30180,7 @@ type NetworkEndpointGroupList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupListWarning `json:"warning,omitempty"` + Warning *NetworkAttachmentAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -30352,15 +30203,15 @@ type NetworkEndpointGroupList struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupList +func (s *NetworkAttachmentAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupListWarning: [Output Only] Informational warning -// message. -type NetworkEndpointGroupListWarning struct { +// NetworkAttachmentAggregatedListWarning: [Output Only] Informational +// warning message. +type NetworkAttachmentAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -30428,7 +30279,7 @@ type NetworkEndpointGroupListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkEndpointGroupListWarningData `json:"data,omitempty"` + Data []*NetworkAttachmentAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -30451,13 +30302,13 @@ type NetworkEndpointGroupListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupListWarning +func (s *NetworkAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupListWarningData struct { +type NetworkAttachmentAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -30488,95 +30339,47 @@ type NetworkEndpointGroupListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupListWarningData +func (s *NetworkAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupPscData: All data that is specifically relevant -// to only network endpoint groups of type PRIVATE_SERVICE_CONNECT. -type NetworkEndpointGroupPscData struct { - // ConsumerPscAddress: [Output Only] Address allocated from given - // subnetwork for PSC. This IP address acts as a VIP for a PSC NEG, - // allowing it to act as an endpoint in L7 PSC-XLB. - ConsumerPscAddress string `json:"consumerPscAddress,omitempty"` +// NetworkAttachmentConnectedEndpoint: [Output Only] A connection +// connected to this network attachment. +type NetworkAttachmentConnectedEndpoint struct { + // IpAddress: The IP address assigned to the producer instance network + // interface. This value will be a range in case of Serverless. + IpAddress string `json:"ipAddress,omitempty"` - // PscConnectionId: [Output Only] The PSC connection id of the PSC - // Network Endpoint Group Consumer. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` + // ProjectIdOrNum: The project id or number of the interface to which + // the IP was assigned. + ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` - // PscConnectionStatus: [Output Only] The connection status of the PSC - // Forwarding Rule. + // SecondaryIpCidrRanges: Alias IP ranges from the same subnetwork. + SecondaryIpCidrRanges []string `json:"secondaryIpCidrRanges,omitempty"` + + // Status: The status of a connected endpoint to this network + // attachment. // // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer and will - // not serve traffic going forward. - // "NEEDS_ATTENTION" - The connection has been accepted by the - // producer, but the producer needs to take further action before the - // forwarding rule can serve traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The connection has been rejected by the producer. + // "ACCEPTED" - The consumer allows traffic from the producer to reach + // its VPC. + // "CLOSED" - The consumer network attachment no longer exists. + // "NEEDS_ATTENTION" - The consumer needs to take further action + // before traffic can be served. + // "PENDING" - The consumer neither allows nor prohibits traffic from + // the producer to reach its VPC. + // "REJECTED" - The consumer prohibits traffic from the producer to + // reach its VPC. // "STATUS_UNSPECIFIED" - PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConsumerPscAddress") - // 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. "ConsumerPscAddress") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEndpointGroupPscData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupPscData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupServerlessDeployment: Configuration for a -// serverless network endpoint group (NEG). The platform must be -// provided. Note: The target backend service must be in the same -// project and located in the same region as the Serverless NEG. -type NetworkEndpointGroupServerlessDeployment struct { - // Platform: The platform of the backend target(s) of this NEG. The only - // supported value is API Gateway: apigateway.googleapis.com. - Platform string `json:"platform,omitempty"` - - // Resource: The user-defined name of the workload/instance. This value - // must be provided explicitly or in the urlMask. The resource - // identified by this value is platform-specific and is as follows: 1. - // API Gateway: The gateway ID 2. App Engine: The service name 3. Cloud - // Functions: The function name 4. Cloud Run: The service name - Resource string `json:"resource,omitempty"` - - // UrlMask: A template to parse platform-specific fields from a request - // URL. URL mask allows for routing to multiple resources on the same - // serverless platform without having to create multiple Network - // Endpoint Groups and backend resources. The fields parsed by this - // template are platform-specific and are as follows: 1. API Gateway: - // The gateway ID 2. App Engine: The service and version 3. Cloud - // Functions: The function name 4. Cloud Run: The service and tag - UrlMask string `json:"urlMask,omitempty"` + Status string `json:"status,omitempty"` - // Version: The optional resource version. The version identified by - // this value is platform-specific and is follows: 1. API Gateway: - // Unused 2. App Engine: The service version 3. Cloud Functions: Unused - // 4. Cloud Run: The service tag - Version string `json:"version,omitempty"` + // Subnetwork: The subnetwork used to assign the IP to the producer + // instance network interface. + Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "Platform") to + // ForceSendFields is a list of field names (e.g. "IpAddress") 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 @@ -30584,7 +30387,7 @@ type NetworkEndpointGroupServerlessDeployment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Platform") to include in + // NullFields is a list of field names (e.g. "IpAddress") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -30593,148 +30396,20 @@ type NetworkEndpointGroupServerlessDeployment struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupServerlessDeployment) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupServerlessDeployment - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") 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. "NetworkEndpoints") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsAttachEndpointsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") 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. "NetworkEndpoints") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsDetachEndpointsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListEndpointsRequest struct { - // EndpointFilters: Optional list of endpoints to query. This is a more - // efficient but also limited version of filter parameter. Endpoints in - // the filter must have ip_address and port fields populated, other - // fields are not supported. - EndpointFilters []*NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter `json:"endpointFilters,omitempty"` - - // HealthStatus: Optional query parameter for showing the health status - // of each network endpoint. Valid options are SKIP or SHOW. If you - // don't specify this parameter, the health status of network endpoints - // will not be provided. - // - // Possible values: - // "SHOW" - Show the health status for each network endpoint. Impacts - // latency of the call. - // "SKIP" - Health status for network endpoints will not be provided. - HealthStatus string `json:"healthStatus,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndpointFilters") 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. "EndpointFilters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEndpointGroupsListEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListEndpointsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter struct { - NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NetworkEndpoint") 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. "NetworkEndpoint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter +func (s *NetworkAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentConnectedEndpoint raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupsListNetworkEndpoints struct { +type NetworkAttachmentList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointWithHealthStatus resources. - Items []*NetworkEndpointWithHealthStatus `json:"items,omitempty"` + // Items: A list of NetworkAttachment resources. + Items []*NetworkAttachment `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is always - // compute#networkEndpointGroupsListNetworkEndpoints for the list of - // network endpoints in the specified network endpoint group. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -30745,8 +30420,11 @@ type NetworkEndpointGroupsListNetworkEndpoints struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupsListNetworkEndpointsWarning `json:"warning,omitempty"` + Warning *NetworkAttachmentListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -30769,15 +30447,15 @@ type NetworkEndpointGroupsListNetworkEndpoints struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupsListNetworkEndpoints) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpoints +func (s *NetworkAttachmentList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupsListNetworkEndpointsWarning: [Output Only] -// Informational warning message. -type NetworkEndpointGroupsListNetworkEndpointsWarning struct { +// NetworkAttachmentListWarning: [Output Only] Informational warning +// message. +type NetworkAttachmentListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -30845,7 +30523,7 @@ type NetworkEndpointGroupsListNetworkEndpointsWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkEndpointGroupsListNetworkEndpointsWarningData `json:"data,omitempty"` + Data []*NetworkAttachmentListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -30868,13 +30546,13 @@ type NetworkEndpointGroupsListNetworkEndpointsWarning struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupsListNetworkEndpointsWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarning +func (s *NetworkAttachmentListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupsListNetworkEndpointsWarningData struct { +type NetworkAttachmentListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -30905,31 +30583,30 @@ type NetworkEndpointGroupsListNetworkEndpointsWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupsListNetworkEndpointsWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarningData +func (s *NetworkAttachmentListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupsScopedList struct { - // NetworkEndpointGroups: [Output Only] The list of network endpoint - // groups that are contained in this scope. - NetworkEndpointGroups []*NetworkEndpointGroup `json:"networkEndpointGroups,omitempty"` +type NetworkAttachmentsScopedList struct { + // NetworkAttachments: A list of NetworkAttachments contained in this + // scope. + NetworkAttachments []*NetworkAttachment `json:"networkAttachments,omitempty"` - // Warning: [Output Only] An informational warning that replaces the - // list of network endpoint groups when the list is empty. - Warning *NetworkEndpointGroupsScopedListWarning `json:"warning,omitempty"` + // Warning: Informational warning which replaces the list of network + // attachments when the list is empty. + Warning *NetworkAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "NetworkEndpointGroups") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "NetworkAttachments") + // 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. "NetworkEndpointGroups") to + // NullFields is a list of field names (e.g. "NetworkAttachments") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -30939,16 +30616,15 @@ type NetworkEndpointGroupsScopedList struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedList +func (s *NetworkAttachmentsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroupsScopedListWarning: [Output Only] An -// informational warning that replaces the list of network endpoint -// groups when the list is empty. -type NetworkEndpointGroupsScopedListWarning struct { +// NetworkAttachmentsScopedListWarning: Informational warning which +// replaces the list of network attachments when the list is empty. +type NetworkAttachmentsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -31016,7 +30692,7 @@ type NetworkEndpointGroupsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkEndpointGroupsScopedListWarningData `json:"data,omitempty"` + Data []*NetworkAttachmentsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -31039,13 +30715,13 @@ type NetworkEndpointGroupsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedListWarning +func (s *NetworkAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkEndpointGroupsScopedListWarningData struct { +type NetworkAttachmentsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -31076,196 +30752,106 @@ type NetworkEndpointGroupsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkEndpointGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointWithHealthStatus struct { - // Healths: [Output only] The health status of network endpoint; - Healths []*HealthStatusForNetworkEndpoint `json:"healths,omitempty"` - - // NetworkEndpoint: [Output only] The network endpoint; - NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Healths") 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. "Healths") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworkEndpointWithHealthStatus) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointWithHealthStatus +func (s *NetworkAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAttachmentsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkInterface: A network interface resource attached to an -// instance. -type NetworkInterface struct { - // AccessConfigs: An array of configurations for this interface. - // Currently, only one access config, ONE_TO_ONE_NAT, is supported. If - // there are no accessConfigs specified, then this instance will have no - // external internet access. - AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` +// NetworkEdgeSecurityService: Represents a Google Cloud Armor network +// edge security service resource. +type NetworkEdgeSecurityService struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // AliasIpRanges: An array of alias IP ranges for this network - // interface. You can only specify this field for network interfaces in - // VPC networks. - AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint hash of contents stored in this network - // interface. This field will be ignored when inserting an Instance or - // adding a NetworkInterface. An up-to-date fingerprint must be provided - // in order to update the NetworkInterface. The request will fail with - // error 400 Bad Request if the fingerprint is not provided, or 412 - // Precondition Failed if the fingerprint is out of date. + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a NetworkEdgeSecurityService. An + // up-to-date fingerprint must be provided in order to update the + // NetworkEdgeSecurityService, otherwise the request will fail with + // error 412 conditionNotMet. To see the latest fingerprint, make a + // get() request to retrieve a NetworkEdgeSecurityService. Fingerprint string `json:"fingerprint,omitempty"` - // InternalIpv6PrefixLength: The prefix length of the primary internal - // IPv6 range. - InternalIpv6PrefixLength int64 `json:"internalIpv6PrefixLength,omitempty"` - - // Ipv6AccessConfigs: An array of IPv6 access configurations for this - // interface. Currently, only one IPv6 access config, DIRECT_IPV6, is - // supported. If there is no ipv6AccessConfig specified, then this - // instance will have no external IPv6 Internet access. - Ipv6AccessConfigs []*AccessConfig `json:"ipv6AccessConfigs,omitempty"` - - // Ipv6AccessType: [Output Only] One of EXTERNAL, INTERNAL to indicate - // whether the IP can be accessed from the Internet. This field is - // always inherited from its subnetwork. Valid only if stackType is - // IPV4_IPV6. - // - // Possible values: - // "EXTERNAL" - This network interface can have external IPv6. - // "INTERNAL" - This network interface can have internal IPv6. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - - // Ipv6Address: An IPv6 internal network address for this network - // interface. To use a static internal IP address, it must be unused and - // in the same region as the instance's zone. If not specified, Google - // Cloud will automatically assign an internal IPv6 address from the - // instance's subnetwork. - Ipv6Address string `json:"ipv6Address,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always - // compute#networkInterface for network interfaces. + // Kind: [Output only] Type of the resource. Always + // compute#networkEdgeSecurityService for NetworkEdgeSecurityServices Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of the network interface, which is - // generated by the server. For a VM, the network interface uses the - // nicN naming format. Where N is a value between 0 and 7. The default - // interface value is nic0. + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: URL of the VPC network resource for this instance. When - // creating an instance, if neither the network nor the subnetwork is - // specified, the default network global/networks/default is used. If - // the selected project doesn't have the default network, you must - // specify a network or subnet. If the network is not specified but the - // subnetwork is specified, the network is inferred. If you specify this - // property, you can specify the network as a full or partial URL. For - // example, the following are all valid URLs: - - // https://www.googleapis.com/compute/v1/projects/project/global/networks/ - // network - projects/project/global/networks/network - - // global/networks/default - Network string `json:"network,omitempty"` - - // NetworkAttachment: The URL of the network attachment that this - // interface should connect to in the following format: - // projects/{project_number}/regions/{region_name}/networkAttachments/{ne - // twork_attachment_name}. - NetworkAttachment string `json:"networkAttachment,omitempty"` - - // NetworkIP: An IPv4 internal IP address to assign to the instance for - // this network interface. If not specified by the user, an unused - // internal IP is assigned by the system. - NetworkIP string `json:"networkIP,omitempty"` + // Region: [Output Only] URL of the region where the resource resides. + // You must specify this field as part of the HTTP request URL. It is + // not settable as a field in the request body. + Region string `json:"region,omitempty"` - // NicType: The type of vNIC to be used on this interface. This may be - // gVNIC or VirtioNet. - // - // Possible values: - // "GVNIC" - GVNIC - // "UNSPECIFIED_NIC_TYPE" - No type specified. - // "VIRTIO_NET" - VIRTIO - NicType string `json:"nicType,omitempty"` + // SecurityPolicy: The resource URL for the network edge security + // service associated with this network edge security service. + SecurityPolicy string `json:"securityPolicy,omitempty"` - // QueueCount: The networking queue count that's specified by users for - // the network interface. Both Rx and Tx queues will be set to this - // number. It'll be empty if not specified by the users. - QueueCount int64 `json:"queueCount,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for this network interface. To assign only - // IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 - // addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This - // field can be both set at instance creation and update network - // interface operations. - // - // Possible values: - // "IPV4_IPV6" - The network interface can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - The network interface will be assigned IPv4 address. - StackType string `json:"stackType,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Subnetwork: The URL of the Subnetwork resource for this instance. If - // the network resource is in legacy mode, do not specify this field. If - // the network is in auto subnet mode, specifying the subnetwork is - // optional. If the network is in custom subnet mode, specifying the - // subnetwork is required. If you specify this field, you can specify - // the subnetwork as a full or partial URL. For example, the following - // are all valid URLs: - - // https://www.googleapis.com/compute/v1/projects/project/regions/region - // /subnetworks/subnetwork - regions/region/subnetworks/subnetwork - Subnetwork string `json:"subnetwork,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessConfigs") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // 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. "AccessConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NetworkInterface) MarshalJSON() ([]byte, error) { - type NoMethod NetworkInterface +func (s *NetworkEdgeSecurityService) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityService raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkList: Contains a list of networks. -type NetworkList struct { +type NetworkEdgeSecurityServiceAggregatedList struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of Network resources. - Items []*Network `json:"items,omitempty"` + // Items: A list of NetworkEdgeSecurityServicesScopedList resources. + Items map[string]NetworkEdgeSecurityServicesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#networkList for - // lists of networks. + // Kind: [Output Only] Type of resource. Always + // compute#networkEdgeSecurityServiceAggregatedList for lists of Network + // Edge Security Services. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -31279,14 +30865,17 @@ type NetworkList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *NetworkListWarning `json:"warning,omitempty"` + Warning *NetworkEdgeSecurityServiceAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -31294,7 +30883,7 @@ type NetworkList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Etag") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -31303,14 +30892,15 @@ type NetworkList struct { NullFields []string `json:"-"` } -func (s *NetworkList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkList +func (s *NetworkEdgeSecurityServiceAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkListWarning: [Output Only] Informational warning message. -type NetworkListWarning struct { +// NetworkEdgeSecurityServiceAggregatedListWarning: [Output Only] +// Informational warning message. +type NetworkEdgeSecurityServiceAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -31378,7 +30968,7 @@ type NetworkListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NetworkListWarningData `json:"data,omitempty"` + Data []*NetworkEdgeSecurityServiceAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -31401,13 +30991,13 @@ type NetworkListWarning struct { NullFields []string `json:"-"` } -func (s *NetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkListWarning +func (s *NetworkEdgeSecurityServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworkListWarningData struct { +type NetworkEdgeSecurityServiceAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -31438,167 +31028,123 @@ type NetworkListWarningData struct { NullFields []string `json:"-"` } -func (s *NetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkListWarningData +func (s *NetworkEdgeSecurityServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServiceAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkPeering: A network peering attached to a network resource. The -// message includes the peering name, peer network, peering state, and a -// flag indicating whether Google Compute Engine should automatically -// create routes for the peering. -type NetworkPeering struct { - // AutoCreateRoutes: This field will be deprecated soon. Use the - // exchange_subnet_routes field instead. Indicates whether full mesh - // connectivity is created and managed automatically between peered - // networks. Currently this field should always be true since Google - // Compute Engine will automatically create and manage subnetwork routes - // between two networks when peering state is ACTIVE. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // ExchangeSubnetRoutes: Indicates whether full mesh connectivity is - // created and managed automatically between peered networks. Currently - // this field should always be true since Google Compute Engine will - // automatically create and manage subnetwork routes between two - // networks when peering state is ACTIVE. - ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` +type NetworkEdgeSecurityServicesScopedList struct { + // NetworkEdgeSecurityServices: A list of NetworkEdgeSecurityServices + // contained in this scope. + NetworkEdgeSecurityServices []*NetworkEdgeSecurityService `json:"networkEdgeSecurityServices,omitempty"` - // ExportCustomRoutes: Whether to export the custom routes to peer - // network. The default value is false. - ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"` + // Warning: Informational warning which replaces the list of security + // policies when the list is empty. + Warning *NetworkEdgeSecurityServicesScopedListWarning `json:"warning,omitempty"` - // ExportSubnetRoutesWithPublicIp: Whether subnet routes with public IP - // range are exported. The default value is true, all subnet routes are - // exported. IPv4 special-use ranges are always exported to peers and - // are not controlled by this field. - ExportSubnetRoutesWithPublicIp bool `json:"exportSubnetRoutesWithPublicIp,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "NetworkEdgeSecurityServices") 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:"-"` - // ImportCustomRoutes: Whether to import the custom routes from peer - // network. The default value is false. - ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"` + // NullFields is a list of field names (e.g. + // "NetworkEdgeSecurityServices") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} - // ImportSubnetRoutesWithPublicIp: Whether subnet routes with public IP - // range are imported. The default value is false. IPv4 special-use - // ranges are always imported from peers and are not controlled by this - // field. - ImportSubnetRoutesWithPublicIp bool `json:"importSubnetRoutesWithPublicIp,omitempty"` +func (s *NetworkEdgeSecurityServicesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Name: Name of this peering. Provided by the client when the peering - // is created. The name must comply with RFC1035. Specifically, the name - // must be 1-63 characters long and match regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase - // letter, and all the following characters must be a dash, lowercase - // letter, or digit, except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: The URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - Network string `json:"network,omitempty"` - - // PeerMtu: Maximum Transmission Unit in bytes. - PeerMtu int64 `json:"peerMtu,omitempty"` - - // StackType: Which IP version(s) of traffic and routes are allowed to - // be imported or exported between peer networks. The default value is - // IPV4_ONLY. - // - // Possible values: - // "IPV4_IPV6" - This Peering will allow IPv4 traffic and routes to be - // exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 - // traffic and routes will be exchanged as well. - // "IPV4_ONLY" - This Peering will only allow IPv4 traffic and routes - // to be exchanged, even if the matching peering is IPV4_IPV6. - StackType string `json:"stackType,omitempty"` - - // State: [Output Only] State for the peering, either `ACTIVE` or - // `INACTIVE`. The peering is `ACTIVE` when there's a matching - // configuration in the peer network. +// NetworkEdgeSecurityServicesScopedListWarning: Informational warning +// which replaces the list of security policies when the list is empty. +type NetworkEdgeSecurityServicesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. // // Possible values: - // "ACTIVE" - Matching configuration exists on the peer. - // "INACTIVE" - There is no matching configuration on the peer, - // including the case when peer does not exist. - State string `json:"state,omitempty"` - - // StateDetails: [Output Only] Details about the current state of the - // peering. - StateDetails string `json:"stateDetails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") 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. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworkPeering) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeering - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworkPerformanceConfig struct { - // Possible values: - // "DEFAULT" - // "TIER_1" - TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "TotalEgressBandwidthTier") 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. "TotalEgressBandwidthTier") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` -func (s *NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPerformanceConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*NetworkEdgeSecurityServicesScopedListWarningData `json:"data,omitempty"` -// NetworkRoutingConfig: A routing configuration attached to a network -// resource. The message includes the list of routers associated with -// the network, and a flag indicating the type of routing behavior to -// enforce network-wide. -type NetworkRoutingConfig struct { - // RoutingMode: The network-wide routing mode to use. If set to - // REGIONAL, this network's Cloud Routers will only advertise routes - // with subnets of this network in the same region as the router. If set - // to GLOBAL, this network's Cloud Routers will advertise routes with - // all subnets of this network, across regions. - // - // Possible values: - // "GLOBAL" - // "REGIONAL" - RoutingMode string `json:"routingMode,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "RoutingMode") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -31606,48 +31152,36 @@ type NetworkRoutingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RoutingMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkRoutingConfig +func (s *NetworkEdgeSecurityServicesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: This field will be deprecated soon. Use - // exchange_subnet_routes in network_peering instead. Indicates whether - // full mesh connectivity is created and managed automatically between - // peered networks. Currently this field should always be true since - // Google Compute Engine will automatically create and manage subnetwork - // routes between two networks when peering state is ACTIVE. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // NetworkPeering: Network peering parameters. In order to specify route - // policies for peering using import and export custom routes, you must - // specify all peering related parameters (name, peer network, - // exchange_subnet_routes) in the network_peering field. The - // corresponding fields in NetworksAddPeeringRequest will be deprecated - // soon. - NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` +type NetworkEdgeSecurityServicesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // PeerNetwork: URL of the peer network. It can be either full URL or - // partial URL. The peer network may belong to a different project. If - // the partial URL does not contain project, it is assumed that the peer - // network is in the same project as the current network. - PeerNetwork string `json:"peerNetwork,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -31655,84 +31189,53 @@ type NetworksAddPeeringRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksAddPeeringRequest +func (s *NetworkEdgeSecurityServicesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEdgeSecurityServicesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworksGetEffectiveFirewallsResponse struct { - // FirewallPolicys: Effective firewalls from firewall policy. - FirewallPolicys []*NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - - // Firewalls: Effective firewalls on the network. - Firewalls []*Firewall `json:"firewalls,omitempty"` - - // OrganizationFirewalls: Effective firewalls from organization - // policies. - OrganizationFirewalls []*NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy `json:"organizationFirewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") 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. "FirewallPolicys") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *NetworksGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +// NetworkEndpoint: The network endpoint. +type NetworkEndpoint struct { + // Annotations: Metadata defined as annotations on the network endpoint. + Annotations map[string]string `json:"annotations,omitempty"` -type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] Deprecated, please use short name instead. - // The display name of the firewall policy. - DisplayName string `json:"displayName,omitempty"` + // Fqdn: Optional fully qualified domain name of network endpoint. This + // can only be specified when NetworkEndpointGroup.network_endpoint_type + // is NON_GCP_FQDN_PORT. + Fqdn string `json:"fqdn,omitempty"` - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` + // Instance: The name for a specific VM instance that the IP address + // belongs to. This is required for network endpoints of type + // GCE_VM_IP_PORT. The instance must be in the same zone of network + // endpoint group. The name must be 1-63 characters long, and comply + // with RFC1035. + Instance string `json:"instance,omitempty"` - // Rules: The rules that apply to the network. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` + // IpAddress: Optional IPv4 address of network endpoint. The IP address + // must belong to a VM in Compute Engine (either the primary IP or as + // part of an aliased IP range). If the IP address is not specified, + // then the primary IP address for the VM instance in the network that + // the network endpoint group belongs to will be used. + IpAddress string `json:"ipAddress,omitempty"` - // ShortName: [Output Only] The short name of the firewall policy. - ShortName string `json:"shortName,omitempty"` + // Ipv6Address: Optional IPv6 address of network endpoint. + Ipv6Address string `json:"ipv6Address,omitempty"` - // Type: [Output Only] The type of the firewall policy. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` + // Port: Optional port number of network endpoint. If not specified, the + // defaultPort for the network endpoint group will be used. + Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "Annotations") 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 @@ -31740,7 +31243,7 @@ type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include + // NullFields is a list of field names (e.g. "Annotations") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -31749,228 +31252,166 @@ type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { NullFields []string `json:"-"` } -func (s *NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy: A -// pruned SecurityPolicy containing ID and any applicable firewall -// rules. -type NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy struct { - // Id: [Output Only] The unique identifier for the security policy. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Rules: The rules that apply to the network. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type NetworksRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty 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 *NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksRemovePeeringRequest +func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpoint raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NetworksUpdatePeeringRequest struct { - NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NetworkPeering") 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:"-"` +// NetworkEndpointGroup: Represents a collection of network endpoints. A +// network endpoint group (NEG) defines how a set of endpoints should be +// reached, whether they are reachable, and where they are located. For +// more information about using NEGs, see Setting up external HTTP(S) +// Load Balancing with internet NEGs, Setting up zonal NEGs, or Setting +// up external HTTP(S) Load Balancing with serverless NEGs. +type NetworkEndpointGroup struct { + // Annotations: Metadata defined as annotations on the network endpoint + // group. + Annotations map[string]string `json:"annotations,omitempty"` - // NullFields is a list of field names (e.g. "NetworkPeering") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // AppEngine: Only valid when networkEndpointType is "SERVERLESS". Only + // one of cloudRun, appEngine or cloudFunction may be set. + AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` -func (s *NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksUpdatePeeringRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // CloudFunction: Only valid when networkEndpointType is "SERVERLESS". + // Only one of cloudRun, appEngine or cloudFunction may be set. + CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` -// NodeGroup: Represents a sole-tenant Node Group resource. A -// sole-tenant node is a physical server that is dedicated to hosting VM -// instances only for your specific project. Use sole-tenant nodes to -// keep your instances physically separated from instances in other -// projects, or to group your instances together on the same host -// hardware. For more information, read Sole-tenant nodes. -type NodeGroup struct { - // AutoscalingPolicy: Specifies how autoscaling should behave. - AutoscalingPolicy *NodeGroupAutoscalingPolicy `json:"autoscalingPolicy,omitempty"` + // CloudRun: Only valid when networkEndpointType is "SERVERLESS". Only + // one of cloudRun, appEngine or cloudFunction may be set. + CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // DefaultPort: The default port used if the port number is not + // specified in the network endpoint. + DefaultPort int64 `json:"defaultPort,omitempty"` + // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Always - // compute#nodeGroup for node group. + // Kind: [Output Only] Type of the resource. Always + // compute#networkEndpointGroup for network endpoint group. Kind string `json:"kind,omitempty"` - // LocationHint: An opaque location hint used to place the Node close to - // other resources. This field is for use by internal tools that use the - // public API. The location hint here on the NodeGroup overrides any - // location_hint present in the NodeTemplate. - LocationHint string `json:"locationHint,omitempty"` + // LoadBalancer: This field is only valid when the network endpoint + // group is used for load balancing. [Deprecated] This field is + // deprecated. + LoadBalancer *NetworkEndpointGroupLbNetworkEndpointGroup `json:"loadBalancer,omitempty"` - // MaintenancePolicy: Specifies how to handle instances when a node in - // the group undergoes maintenance. Set to one of: DEFAULT, - // RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is - // DEFAULT. For more information, see Maintenance policies. + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: The URL of the network to which all network endpoints in the + // NEG belong. Uses "default" project network if unspecified. + Network string `json:"network,omitempty"` + + // NetworkEndpointType: Type of network endpoints in this network + // endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, + // NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, + // SERVERLESS, PRIVATE_SERVICE_CONNECT. // // Possible values: - // "DEFAULT" - Allow the node and corresponding instances to retain - // default maintenance behavior. - // "MAINTENANCE_POLICY_UNSPECIFIED" - // "MIGRATE_WITHIN_NODE_GROUP" - When maintenance must be done on a - // node, the instances on that node will be moved to other nodes in the - // group. Instances with onHostMaintenance = MIGRATE will live migrate - // to their destinations while instances with onHostMaintenance = - // TERMINATE will terminate and then restart on their destination nodes - // if automaticRestart = true. - // "RESTART_IN_PLACE" - Instances in this group will restart on the - // same node when maintenance has completed. Instances must have - // onHostMaintenance = TERMINATE, and they will only restart if - // automaticRestart = true. - MaintenancePolicy string `json:"maintenancePolicy,omitempty"` + // "GCE_VM_IP" - The network endpoint is represented by an IP address. + // "GCE_VM_IP_PORT" - The network endpoint is represented by IP + // address and port pair. + // "INTERNET_FQDN_PORT" - The network endpoint is represented by fully + // qualified domain name and port. + // "INTERNET_IP_PORT" - The network endpoint is represented by an + // internet IP address and port. + // "NON_GCP_PRIVATE_IP_PORT" - The network endpoint is represented by + // an IP address and port. The endpoint belongs to a VM or pod running + // in a customer's on-premises. + // "PRIVATE_SERVICE_CONNECT" - The network endpoint is either public + // Google APIs or services exposed by other GCP Project with a Service + // Attachment. The connection is set up by private service connect + // "SERVERLESS" - The network endpoint is handled by specified + // serverless infrastructure. + NetworkEndpointType string `json:"networkEndpointType,omitempty"` - MaintenanceWindow *NodeGroupMaintenanceWindow `json:"maintenanceWindow,omitempty"` + PscData *NetworkEndpointGroupPscData `json:"pscData,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` + // PscTargetService: The target service url used to set up private + // service connection to a Google API or a PSC Producer Service + // Attachment. An example value is: + // "asia-northeast3-cloudkms.googleapis.com" + PscTargetService string `json:"pscTargetService,omitempty"` - // NodeTemplate: URL of the node template to create the node group from. - NodeTemplate string `json:"nodeTemplate,omitempty"` + // Region: [Output Only] The URL of the region where the network + // endpoint group is located. + Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // ShareSettings: Share-settings for the node group - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` + // ServerlessDeployment: Only valid when networkEndpointType is + // "SERVERLESS". Only one of cloudRun, appEngine, cloudFunction or + // serverlessDeployment may be set. + ServerlessDeployment *NetworkEndpointGroupServerlessDeployment `json:"serverlessDeployment,omitempty"` - // Size: [Output Only] The total number of nodes in the node group. + // Size: [Output only] Number of network endpoints in the network + // endpoint group. Size int64 `json:"size,omitempty"` - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - Status string `json:"status,omitempty"` + // Subnetwork: Optional URL of the subnetwork to which all network + // endpoints in the NEG belong. + Subnetwork string `json:"subnetwork,omitempty"` - // Zone: [Output Only] The name of the zone where the node group - // resides, such as us-central1-a. + // Zone: [Output Only] The URL of the zone where the network endpoint + // group is located. Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Annotations") 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. "AutoscalingPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NodeGroup) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroup +func (s *NetworkEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroup raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupAggregatedList struct { +type NetworkEndpointGroupAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NodeGroupsScopedList resources. - Items map[string]NodeGroupsScopedList `json:"items,omitempty"` + // Items: A list of NetworkEndpointGroupsScopedList resources. + Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always - // compute#nodeGroupAggregatedList for aggregated lists of node groups. + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupAggregatedList for aggregated lists of + // network endpoint groups. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -31988,7 +31429,7 @@ type NodeGroupAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *NodeGroupAggregatedListWarning `json:"warning,omitempty"` + Warning *NetworkEndpointGroupAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -32011,15 +31452,15 @@ type NodeGroupAggregatedList struct { NullFields []string `json:"-"` } -func (s *NodeGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedList +func (s *NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroupAggregatedListWarning: [Output Only] Informational warning -// message. -type NodeGroupAggregatedListWarning struct { +// NetworkEndpointGroupAggregatedListWarning: [Output Only] +// Informational warning message. +type NetworkEndpointGroupAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -32087,7 +31528,7 @@ type NodeGroupAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeGroupAggregatedListWarningData `json:"data,omitempty"` + Data []*NetworkEndpointGroupAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -32110,13 +31551,13 @@ type NodeGroupAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *NodeGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedListWarning +func (s *NetworkEndpointGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupAggregatedListWarningData struct { +type NetworkEndpointGroupAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -32147,32 +31588,41 @@ type NodeGroupAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedListWarningData +func (s *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupAutoscalingPolicy struct { - // MaxNodes: The maximum number of nodes that the group should have. - // Must be set if autoscaling is enabled. Maximum value allowed is 100. - MaxNodes int64 `json:"maxNodes,omitempty"` +// NetworkEndpointGroupAppEngine: Configuration for an App Engine +// network endpoint group (NEG). The service is optional, may be +// provided explicitly or in the URL mask. The version is optional and +// can only be provided explicitly or in the URL mask when service is +// present. Note: App Engine service must be in the same project and +// located in the same region as the Serverless NEG. +type NetworkEndpointGroupAppEngine struct { + // Service: Optional serving service. The service name is case-sensitive + // and must be 1-63 characters long. Example value: "default", + // "my-service". + Service string `json:"service,omitempty"` - // MinNodes: The minimum number of nodes that the group should have. - MinNodes int64 `json:"minNodes,omitempty"` + // UrlMask: A template to parse service and version fields from a + // request URL. URL mask allows for routing to multiple App Engine + // services without having to create multiple Network Endpoint Groups + // and backend services. For example, the request URLs + // "foo1-dot-appname.appspot.com/v1" and + // "foo1-dot-appname.appspot.com/v2" can be backed by the same + // Serverless NEG with URL mask + // "-dot-appname.appspot.com/". The URL mask will + // parse them to { service = "foo1", version = "v1" } and { service = + // "foo1", version = "v2" } respectively. + UrlMask string `json:"urlMask,omitempty"` - // Mode: The autoscaling mode. Set to one of: ON, OFF, or - // ONLY_SCALE_OUT. For more information, see Autoscaler modes. - // - // Possible values: - // "MODE_UNSPECIFIED" - // "OFF" - Autoscaling is disabled. - // "ON" - Autocaling is fully enabled. - // "ONLY_SCALE_OUT" - Autoscaling will only scale out and will not - // remove nodes. - Mode string `json:"mode,omitempty"` + // Version: Optional serving version. The version name is case-sensitive + // and must be 1-100 characters long. Example value: "v1", "v2". + Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxNodes") to + // ForceSendFields is a list of field names (e.g. "Service") 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 @@ -32180,7 +31630,7 @@ type NodeGroupAutoscalingPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxNodes") to include in + // NullFields is a list of field names (e.g. "Service") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -32189,23 +31639,158 @@ type NodeGroupAutoscalingPolicy struct { NullFields []string `json:"-"` } -func (s *NodeGroupAutoscalingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAutoscalingPolicy +func (s *NetworkEndpointGroupAppEngine) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAppEngine raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroupList: Contains a list of nodeGroups. -type NodeGroupList struct { +// NetworkEndpointGroupCloudFunction: Configuration for a Cloud Function +// network endpoint group (NEG). The function must be provided +// explicitly or in the URL mask. Note: Cloud Function must be in the +// same project and located in the same region as the Serverless NEG. +type NetworkEndpointGroupCloudFunction struct { + // Function: A user-defined name of the Cloud Function. The function + // name is case-sensitive and must be 1-63 characters long. Example + // value: "func1". + Function string `json:"function,omitempty"` + + // UrlMask: A template to parse function field from a request URL. URL + // mask allows for routing to multiple Cloud Functions without having to + // create multiple Network Endpoint Groups and backend services. For + // example, request URLs " mydomain.com/function1" and + // "mydomain.com/function2" can be backed by the same Serverless NEG + // with URL mask "/". The URL mask will parse them to { + // function = "function1" } and { function = "function2" } respectively. + UrlMask string `json:"urlMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Function") 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. "Function") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupCloudFunction) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupCloudFunction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupCloudRun: Configuration for a Cloud Run network +// endpoint group (NEG). The service must be provided explicitly or in +// the URL mask. The tag is optional, may be provided explicitly or in +// the URL mask. Note: Cloud Run service must be in the same project and +// located in the same region as the Serverless NEG. +type NetworkEndpointGroupCloudRun struct { + // Service: Cloud Run service is the main resource of Cloud Run. The + // service must be 1-63 characters long, and comply with RFC1035. + // Example value: "run-service". + Service string `json:"service,omitempty"` + + // Tag: Optional Cloud Run tag represents the "named-revision" to + // provide additional fine-grained traffic routing information. The tag + // must be 1-63 characters long, and comply with RFC1035. Example value: + // "revision-0010". + Tag string `json:"tag,omitempty"` + + // UrlMask: A template to parse and fields from a + // request URL. URL mask allows for routing to multiple Run services + // without having to create multiple network endpoint groups and backend + // services. For example, request URLs "foo1.domain.com/bar1" and + // "foo1.domain.com/bar2" can be backed by the same Serverless Network + // Endpoint Group (NEG) with URL mask ".domain.com/". The + // URL mask will parse them to { service="bar1", tag="foo1" } and { + // service="bar2", tag="foo2" } respectively. + UrlMask string `json:"urlMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Service") 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. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupCloudRun) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupCloudRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupLbNetworkEndpointGroup: Load balancing specific +// fields for network endpoint group. +type NetworkEndpointGroupLbNetworkEndpointGroup struct { + // DefaultPort: The default port used if the port number is not + // specified in the network endpoint. [Deprecated] This field is + // deprecated. + DefaultPort int64 `json:"defaultPort,omitempty"` + + // Network: The URL of the network to which all network endpoints in the + // NEG belong. Uses "default" project network if unspecified. + // [Deprecated] This field is deprecated. + Network string `json:"network,omitempty"` + + // Subnetwork: Optional URL of the subnetwork to which all network + // endpoints in the NEG belong. [Deprecated] This field is deprecated. + Subnetwork string `json:"subnetwork,omitempty"` + + // Zone: [Output Only] The URL of the zone where the network endpoint + // group is located. [Deprecated] This field is deprecated. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DefaultPort") 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. "DefaultPort") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupLbNetworkEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupLbNetworkEndpointGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NodeGroup resources. - Items []*NodeGroup `json:"items,omitempty"` + // Items: A list of NetworkEndpointGroup resources. + Items []*NetworkEndpointGroup `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeGroupList for - // lists of node groups. + // Kind: [Output Only] The resource type, which is always + // compute#networkEndpointGroupList for network endpoint group lists. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -32220,7 +31805,7 @@ type NodeGroupList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *NodeGroupListWarning `json:"warning,omitempty"` + Warning *NetworkEndpointGroupListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -32243,14 +31828,15 @@ type NodeGroupList struct { NullFields []string `json:"-"` } -func (s *NodeGroupList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupList +func (s *NetworkEndpointGroupList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroupListWarning: [Output Only] Informational warning message. -type NodeGroupListWarning struct { +// NetworkEndpointGroupListWarning: [Output Only] Informational warning +// message. +type NetworkEndpointGroupListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -32318,7 +31904,7 @@ type NodeGroupListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeGroupListWarningData `json:"data,omitempty"` + Data []*NetworkEndpointGroupListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -32341,13 +31927,13 @@ type NodeGroupListWarning struct { NullFields []string `json:"-"` } -func (s *NodeGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupListWarning +func (s *NetworkEndpointGroupListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupListWarningData struct { +type NetworkEndpointGroupListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -32378,27 +31964,40 @@ type NodeGroupListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupListWarningData +func (s *NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroupMaintenanceWindow: Time window specified for daily -// maintenance operations. GCE's internal maintenance will be performed -// within this window. -type NodeGroupMaintenanceWindow struct { - // MaintenanceDuration: [Output only] A predetermined duration for the - // window, automatically chosen to be the smallest possible in the given - // scenario. - MaintenanceDuration *Duration `json:"maintenanceDuration,omitempty"` +// NetworkEndpointGroupPscData: All data that is specifically relevant +// to only network endpoint groups of type PRIVATE_SERVICE_CONNECT. +type NetworkEndpointGroupPscData struct { + // ConsumerPscAddress: [Output Only] Address allocated from given + // subnetwork for PSC. This IP address acts as a VIP for a PSC NEG, + // allowing it to act as an endpoint in L7 PSC-XLB. + ConsumerPscAddress string `json:"consumerPscAddress,omitempty"` - // StartTime: Start time of the window. This must be in UTC format that - // resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For - // example, both 13:00-5 and 08:00 are valid. - StartTime string `json:"startTime,omitempty"` + // PscConnectionId: [Output Only] The PSC connection id of the PSC + // Network Endpoint Group Consumer. + PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "MaintenanceDuration") + // PscConnectionStatus: [Output Only] The connection status of the PSC + // Forwarding Rule. + // + // Possible values: + // "ACCEPTED" - The connection has been accepted by the producer. + // "CLOSED" - The connection has been closed by the producer and will + // not serve traffic going forward. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. + // "PENDING" - The connection is pending acceptance by the producer. + // "REJECTED" - The connection has been rejected by the producer. + // "STATUS_UNSPECIFIED" + PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConsumerPscAddress") // 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 @@ -32406,7 +32005,7 @@ type NodeGroupMaintenanceWindow struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceDuration") to + // NullFields is a list of field names (e.g. "ConsumerPscAddress") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -32416,64 +32015,44 @@ type NodeGroupMaintenanceWindow struct { NullFields []string `json:"-"` } -func (s *NodeGroupMaintenanceWindow) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupMaintenanceWindow +func (s *NetworkEndpointGroupPscData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupPscData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupNode struct { - // Accelerators: Accelerators for this node. - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - - // ConsumedResources: Node resources that are reserved by all instances. - ConsumedResources *InstanceConsumptionInfo `json:"consumedResources,omitempty"` - - // CpuOvercommitType: CPU overcommit. - // - // Possible values: - // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" - // "ENABLED" - // "NONE" - CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` - - // Disks: Local disk configurations. - Disks []*LocalDisk `json:"disks,omitempty"` - - // InstanceConsumptionData: Instance data that shows consumed resources - // on the node. - InstanceConsumptionData []*InstanceConsumptionData `json:"instanceConsumptionData,omitempty"` - - // Instances: Instances scheduled on this node. - Instances []string `json:"instances,omitempty"` - - // Name: The name of the node. - Name string `json:"name,omitempty"` - - // NodeType: The type of this node. - NodeType string `json:"nodeType,omitempty"` - - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - - // ServerBinding: Binding properties for the physical server. - ServerBinding *ServerBinding `json:"serverBinding,omitempty"` +// NetworkEndpointGroupServerlessDeployment: Configuration for a +// serverless network endpoint group (NEG). The platform must be +// provided. Note: The target backend service must be in the same +// project and located in the same region as the Serverless NEG. +type NetworkEndpointGroupServerlessDeployment struct { + // Platform: The platform of the backend target(s) of this NEG. The only + // supported value is API Gateway: apigateway.googleapis.com. + Platform string `json:"platform,omitempty"` - // ServerId: Server ID associated with this node. - ServerId string `json:"serverId,omitempty"` + // Resource: The user-defined name of the workload/instance. This value + // must be provided explicitly or in the urlMask. The resource + // identified by this value is platform-specific and is as follows: 1. + // API Gateway: The gateway ID 2. App Engine: The service name 3. Cloud + // Functions: The function name 4. Cloud Run: The service name + Resource string `json:"resource,omitempty"` - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - // "REPAIRING" - Status string `json:"status,omitempty"` + // UrlMask: A template to parse platform-specific fields from a request + // URL. URL mask allows for routing to multiple resources on the same + // serverless platform without having to create multiple Network + // Endpoint Groups and backend resources. The fields parsed by this + // template are platform-specific and are as follows: 1. API Gateway: + // The gateway ID 2. App Engine: The service and version 3. Cloud + // Functions: The function name 4. Cloud Run: The service and tag + UrlMask string `json:"urlMask,omitempty"` - // TotalResources: Total amount of available resources on the node. - TotalResources *InstanceConsumptionInfo `json:"totalResources,omitempty"` + // Version: The optional resource version. The version identified by + // this value is platform-specific and is follows: 1. API Gateway: + // Unused 2. App Engine: The service version 3. Cloud Functions: Unused + // 4. Cloud Run: The service tag + Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to + // ForceSendFields is a list of field names (e.g. "Platform") 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 @@ -32481,35 +32060,34 @@ type NodeGroupNode struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Platform") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NodeGroupNode) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupNode +func (s *NetworkEndpointGroupServerlessDeployment) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupServerlessDeployment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupsAddNodesRequest struct { - // AdditionalNodeCount: Count of additional nodes to be added to the - // node group. - AdditionalNodeCount int64 `json:"additionalNodeCount,omitempty"` +type NetworkEndpointGroupsAttachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be attached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalNodeCount") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") 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. "AdditionalNodeCount") to + // NullFields is a list of field names (e.g. "NetworkEndpoints") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -32519,17 +32097,17 @@ type NodeGroupsAddNodesRequest struct { NullFields []string `json:"-"` } -func (s *NodeGroupsAddNodesRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsAddNodesRequest +func (s *NetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsAttachEndpointsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupsDeleteNodesRequest struct { - // Nodes: Names of the nodes to delete. - Nodes []string `json:"nodes,omitempty"` +type NetworkEndpointGroupsDetachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be detached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") 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 @@ -32537,32 +32115,102 @@ type NodeGroupsDeleteNodesRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "NetworkEndpoints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NodeGroupsDeleteNodesRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsDeleteNodesRequest +func (s *NetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsDetachEndpointsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupsListNodes struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +type NetworkEndpointGroupsListEndpointsRequest struct { + // EndpointFilters: Optional list of endpoints to query. This is a more + // efficient but also limited version of filter parameter. Endpoints in + // the filter must have ip_address and port fields populated, other + // fields are not supported. + EndpointFilters []*NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter `json:"endpointFilters,omitempty"` - // Items: A list of Node resources. - Items []*NodeGroupNode `json:"items,omitempty"` + // HealthStatus: Optional query parameter for showing the health status + // of each network endpoint. Valid options are SKIP or SHOW. If you + // don't specify this parameter, the health status of network endpoints + // will not be provided. + // + // Possible values: + // "SHOW" - Show the health status for each network endpoint. Impacts + // latency of the call. + // "SKIP" - Health status for network endpoints will not be provided. + HealthStatus string `json:"healthStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndpointFilters") 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. "EndpointFilters") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsListEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListEndpointsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter struct { + NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkEndpoint") 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. "NetworkEndpoint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkEndpointGroupsListNetworkEndpoints struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NetworkEndpointWithHealthStatus resources. + Items []*NetworkEndpointWithHealthStatus `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always - // compute.nodeGroupsListNodes for the list of nodes in the specified - // node group. + // compute#networkEndpointGroupsListNetworkEndpoints for the list of + // network endpoints in the specified network endpoint group. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -32573,11 +32221,8 @@ type NodeGroupsListNodes struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeGroupsListNodesWarning `json:"warning,omitempty"` + Warning *NetworkEndpointGroupsListNetworkEndpointsWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -32600,15 +32245,15 @@ type NodeGroupsListNodes struct { NullFields []string `json:"-"` } -func (s *NodeGroupsListNodes) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodes +func (s *NetworkEndpointGroupsListNetworkEndpoints) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListNetworkEndpoints raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroupsListNodesWarning: [Output Only] Informational warning -// message. -type NodeGroupsListNodesWarning struct { +// NetworkEndpointGroupsListNetworkEndpointsWarning: [Output Only] +// Informational warning message. +type NetworkEndpointGroupsListNetworkEndpointsWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -32676,7 +32321,7 @@ type NodeGroupsListNodesWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeGroupsListNodesWarningData `json:"data,omitempty"` + Data []*NetworkEndpointGroupsListNetworkEndpointsWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -32699,13 +32344,13 @@ type NodeGroupsListNodesWarning struct { NullFields []string `json:"-"` } -func (s *NodeGroupsListNodesWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodesWarning +func (s *NetworkEndpointGroupsListNetworkEndpointsWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupsListNodesWarningData struct { +type NetworkEndpointGroupsListNetworkEndpointsWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -32736,47 +32381,50 @@ type NodeGroupsListNodesWarningData struct { NullFields []string `json:"-"` } -func (s *NodeGroupsListNodesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodesWarningData +func (s *NetworkEndpointGroupsListNetworkEndpointsWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupsScopedList struct { - // NodeGroups: [Output Only] A list of node groups contained in this - // scope. - NodeGroups []*NodeGroup `json:"nodeGroups,omitempty"` +type NetworkEndpointGroupsScopedList struct { + // NetworkEndpointGroups: [Output Only] The list of network endpoint + // groups that are contained in this scope. + NetworkEndpointGroups []*NetworkEndpointGroup `json:"networkEndpointGroups,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // nodeGroup list is empty. - Warning *NodeGroupsScopedListWarning `json:"warning,omitempty"` + // Warning: [Output Only] An informational warning that replaces the + // list of network endpoint groups when the list is empty. + Warning *NetworkEndpointGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeGroups") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "NetworkEndpointGroups") 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. "NodeGroups") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "NetworkEndpointGroups") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NodeGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedList +func (s *NetworkEndpointGroupsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroupsScopedListWarning: [Output Only] An informational warning -// that appears when the nodeGroup list is empty. -type NodeGroupsScopedListWarning struct { +// NetworkEndpointGroupsScopedListWarning: [Output Only] An +// informational warning that replaces the list of network endpoint +// groups when the list is empty. +type NetworkEndpointGroupsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -32844,7 +32492,7 @@ type NodeGroupsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeGroupsScopedListWarningData `json:"data,omitempty"` + Data []*NetworkEndpointGroupsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -32867,13 +32515,13 @@ type NodeGroupsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *NodeGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedListWarning +func (s *NetworkEndpointGroupsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupsScopedListWarningData struct { +type NetworkEndpointGroupsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -32904,45 +32552,20 @@ type NodeGroupsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedListWarningData +func (s *NetworkEndpointGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeGroupsSetNodeTemplateRequest struct { - // NodeTemplate: Full or partial URL of the node template resource to be - // updated for this node group. - NodeTemplate string `json:"nodeTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NodeTemplate") 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. "NodeTemplate") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsSetNodeTemplateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +type NetworkEndpointWithHealthStatus struct { + // Healths: [Output only] The health status of network endpoint; + Healths []*HealthStatusForNetworkEndpoint `json:"healths,omitempty"` -type NodeGroupsSimulateMaintenanceEventRequest struct { - // Nodes: Names of the nodes to go under maintenance simulation. - Nodes []string `json:"nodes,omitempty"` + // NetworkEndpoint: [Output only] The network endpoint; + NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to + // ForceSendFields is a list of field names (e.g. "Healths") 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 @@ -32950,8 +32573,8 @@ type NodeGroupsSimulateMaintenanceEventRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Healths") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -32959,99 +32582,133 @@ type NodeGroupsSimulateMaintenanceEventRequest struct { NullFields []string `json:"-"` } -func (s *NodeGroupsSimulateMaintenanceEventRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsSimulateMaintenanceEventRequest +func (s *NetworkEndpointWithHealthStatus) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointWithHealthStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplate: Represent a sole-tenant Node Template resource. You can -// use a template to define properties for nodes in a node group. For -// more information, read Creating node groups and instances. -type NodeTemplate struct { - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` +// NetworkInterface: A network interface resource attached to an +// instance. +type NetworkInterface struct { + // AccessConfigs: An array of configurations for this interface. + // Currently, only one access config, ONE_TO_ONE_NAT, is supported. If + // there are no accessConfigs specified, then this instance will have no + // external internet access. + AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` - // CpuOvercommitType: CPU overcommit. - // - // Possible values: - // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" - // "ENABLED" - // "NONE" - CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` + // AliasIpRanges: An array of alias IP ranges for this network + // interface. You can only specify this field for network interfaces in + // VPC networks. + AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Fingerprint: Fingerprint hash of contents stored in this network + // interface. This field will be ignored when inserting an Instance or + // adding a NetworkInterface. An up-to-date fingerprint must be provided + // in order to update the NetworkInterface. The request will fail with + // error 400 Bad Request if the fingerprint is not provided, or 412 + // Precondition Failed if the fingerprint is out of date. + Fingerprint string `json:"fingerprint,omitempty"` - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + // InternalIpv6PrefixLength: The prefix length of the primary internal + // IPv6 range. + InternalIpv6PrefixLength int64 `json:"internalIpv6PrefixLength,omitempty"` - Disks []*LocalDisk `json:"disks,omitempty"` + // Ipv6AccessConfigs: An array of IPv6 access configurations for this + // interface. Currently, only one IPv6 access config, DIRECT_IPV6, is + // supported. If there is no ipv6AccessConfig specified, then this + // instance will have no external IPv6 Internet access. + Ipv6AccessConfigs []*AccessConfig `json:"ipv6AccessConfigs,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` + // Ipv6AccessType: [Output Only] One of EXTERNAL, INTERNAL to indicate + // whether the IP can be accessed from the Internet. This field is + // always inherited from its subnetwork. Valid only if stackType is + // IPV4_IPV6. + // + // Possible values: + // "EXTERNAL" - This network interface can have external IPv6. + // "INTERNAL" - This network interface can have internal IPv6. + Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Kind: [Output Only] The type of the resource. Always - // compute#nodeTemplate for node templates. + // Ipv6Address: An IPv6 internal network address for this network + // interface. To use a static internal IP address, it must be unused and + // in the same region as the instance's zone. If not specified, Google + // Cloud will automatically assign an internal IPv6 address from the + // instance's subnetwork. + Ipv6Address string `json:"ipv6Address,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#networkInterface for network interfaces. Kind string `json:"kind,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. + // Name: [Output Only] The name of the network interface, which is + // generated by the server. For a VM, the network interface uses the + // nicN naming format. Where N is a value between 0 and 7. The default + // interface value is nic0. Name string `json:"name,omitempty"` - // NodeAffinityLabels: Labels to use for node affinity, which will be - // used in instance scheduling. - NodeAffinityLabels map[string]string `json:"nodeAffinityLabels,omitempty"` - - // NodeType: The node type to use for nodes group that are created from - // this template. - NodeType string `json:"nodeType,omitempty"` + // Network: URL of the VPC network resource for this instance. When + // creating an instance, if neither the network nor the subnetwork is + // specified, the default network global/networks/default is used. If + // the selected project doesn't have the default network, you must + // specify a network or subnet. If the network is not specified but the + // subnetwork is specified, the network is inferred. If you specify this + // property, you can specify the network as a full or partial URL. For + // example, the following are all valid URLs: - + // https://www.googleapis.com/compute/v1/projects/project/global/networks/ + // network - projects/project/global/networks/network - + // global/networks/default + Network string `json:"network,omitempty"` - // NodeTypeFlexibility: Do not use. Instead, use the node_type property. - NodeTypeFlexibility *NodeTemplateNodeTypeFlexibility `json:"nodeTypeFlexibility,omitempty"` + // NetworkAttachment: The URL of the network attachment that this + // interface should connect to in the following format: + // projects/{project_number}/regions/{region_name}/networkAttachments/{ne + // twork_attachment_name}. + NetworkAttachment string `json:"networkAttachment,omitempty"` - // Region: [Output Only] The name of the region where the node template - // resides, such as us-central1. - Region string `json:"region,omitempty"` + // NetworkIP: An IPv4 internal IP address to assign to the instance for + // this network interface. If not specified by the user, an unused + // internal IP is assigned by the system. + NetworkIP string `json:"networkIP,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // NicType: The type of vNIC to be used on this interface. This may be + // gVNIC or VirtioNet. + // + // Possible values: + // "GVNIC" - GVNIC + // "UNSPECIFIED_NIC_TYPE" - No type specified. + // "VIRTIO_NET" - VIRTIO + NicType string `json:"nicType,omitempty"` - // ServerBinding: Sets the binding properties for the physical server. - // Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: - // Restarts VMs on any available physical server - - // RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical - // server whenever possible See Sole-tenant node options for more - // information. - ServerBinding *ServerBinding `json:"serverBinding,omitempty"` + // QueueCount: The networking queue count that's specified by users for + // the network interface. Both Rx and Tx queues will be set to this + // number. It'll be empty if not specified by the users. + QueueCount int64 `json:"queueCount,omitempty"` - // Status: [Output Only] The status of the node template. One of the - // following values: CREATING, READY, and DELETING. + // StackType: The stack type for this network interface. To assign only + // IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 + // addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This + // field can be both set at instance creation and update network + // interface operations. // // Possible values: - // "CREATING" - Resources are being allocated. - // "DELETING" - The node template is currently being deleted. - // "INVALID" - Invalid status. - // "READY" - The node template is ready. - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` + // "IPV4_IPV6" - The network interface can have both IPv4 and IPv6 + // addresses. + // "IPV4_ONLY" - The network interface will be assigned IPv4 address. + StackType string `json:"stackType,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Subnetwork: The URL of the Subnetwork resource for this instance. If + // the network resource is in legacy mode, do not specify this field. If + // the network is in auto subnet mode, specifying the subnetwork is + // optional. If the network is in custom subnet mode, specifying the + // subnetwork is required. If you specify this field, you can specify + // the subnetwork as a full or partial URL. For example, the following + // are all valid URLs: - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /subnetworks/subnetwork - regions/region/subnetworks/subnetwork + Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to + // ForceSendFields is a list of field names (e.g. "AccessConfigs") 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 @@ -33059,7 +32716,7 @@ type NodeTemplate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include + // NullFields is a list of field names (e.g. "AccessConfigs") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -33068,23 +32725,23 @@ type NodeTemplate struct { NullFields []string `json:"-"` } -func (s *NodeTemplate) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplate +func (s *NetworkInterface) MarshalJSON() ([]byte, error) { + type NoMethod NetworkInterface raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTemplateAggregatedList struct { +// NetworkList: Contains a list of networks. +type NetworkList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NodeTemplatesScopedList resources. - Items map[string]NodeTemplatesScopedList `json:"items,omitempty"` + // Items: A list of Network resources. + Items []*Network `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always - // compute#nodeTemplateAggregatedList for aggregated lists of node - // templates. + // Kind: [Output Only] Type of resource. Always compute#networkList for + // lists of networks. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -33098,11 +32755,8 @@ type NodeTemplateAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTemplateAggregatedListWarning `json:"warning,omitempty"` + Warning *NetworkListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -33125,15 +32779,14 @@ type NodeTemplateAggregatedList struct { NullFields []string `json:"-"` } -func (s *NodeTemplateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedList +func (s *NetworkList) MarshalJSON() ([]byte, error) { + type NoMethod NetworkList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplateAggregatedListWarning: [Output Only] Informational -// warning message. -type NodeTemplateAggregatedListWarning struct { +// NetworkListWarning: [Output Only] Informational warning message. +type NetworkListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -33201,7 +32854,7 @@ type NodeTemplateAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeTemplateAggregatedListWarningData `json:"data,omitempty"` + Data []*NetworkListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -33224,13 +32877,13 @@ type NodeTemplateAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *NodeTemplateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedListWarning +func (s *NetworkListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTemplateAggregatedListWarningData struct { +type NetworkListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -33261,23 +32914,539 @@ type NodeTemplateAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeTemplateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedListWarningData +func (s *NetworkListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplateList: Contains a list of node templates. -type NodeTemplateList struct { +// NetworkPeering: A network peering attached to a network resource. The +// message includes the peering name, peer network, peering state, and a +// flag indicating whether Google Compute Engine should automatically +// create routes for the peering. +type NetworkPeering struct { + // AutoCreateRoutes: This field will be deprecated soon. Use the + // exchange_subnet_routes field instead. Indicates whether full mesh + // connectivity is created and managed automatically between peered + // networks. Currently this field should always be true since Google + // Compute Engine will automatically create and manage subnetwork routes + // between two networks when peering state is ACTIVE. + AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` + + // ExchangeSubnetRoutes: Indicates whether full mesh connectivity is + // created and managed automatically between peered networks. Currently + // this field should always be true since Google Compute Engine will + // automatically create and manage subnetwork routes between two + // networks when peering state is ACTIVE. + ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` + + // ExportCustomRoutes: Whether to export the custom routes to peer + // network. The default value is false. + ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"` + + // ExportSubnetRoutesWithPublicIp: Whether subnet routes with public IP + // range are exported. The default value is true, all subnet routes are + // exported. IPv4 special-use ranges are always exported to peers and + // are not controlled by this field. + ExportSubnetRoutesWithPublicIp bool `json:"exportSubnetRoutesWithPublicIp,omitempty"` + + // ImportCustomRoutes: Whether to import the custom routes from peer + // network. The default value is false. + ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"` + + // ImportSubnetRoutesWithPublicIp: Whether subnet routes with public IP + // range are imported. The default value is false. IPv4 special-use + // ranges are always imported from peers and are not controlled by this + // field. + ImportSubnetRoutesWithPublicIp bool `json:"importSubnetRoutesWithPublicIp,omitempty"` + + // Name: Name of this peering. Provided by the client when the peering + // is created. The name must comply with RFC1035. Specifically, the name + // must be 1-63 characters long and match regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase + // letter, and all the following characters must be a dash, lowercase + // letter, or digit, except the last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: The URL of the peer network. It can be either full URL or + // partial URL. The peer network may belong to a different project. If + // the partial URL does not contain project, it is assumed that the peer + // network is in the same project as the current network. + Network string `json:"network,omitempty"` + + // PeerMtu: Maximum Transmission Unit in bytes. + PeerMtu int64 `json:"peerMtu,omitempty"` + + // StackType: Which IP version(s) of traffic and routes are allowed to + // be imported or exported between peer networks. The default value is + // IPV4_ONLY. + // + // Possible values: + // "IPV4_IPV6" - This Peering will allow IPv4 traffic and routes to be + // exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 + // traffic and routes will be exchanged as well. + // "IPV4_ONLY" - This Peering will only allow IPv4 traffic and routes + // to be exchanged, even if the matching peering is IPV4_IPV6. + StackType string `json:"stackType,omitempty"` + + // State: [Output Only] State for the peering, either `ACTIVE` or + // `INACTIVE`. The peering is `ACTIVE` when there's a matching + // configuration in the peer network. + // + // Possible values: + // "ACTIVE" - Matching configuration exists on the peer. + // "INACTIVE" - There is no matching configuration on the peer, + // including the case when peer does not exist. + State string `json:"state,omitempty"` + + // StateDetails: [Output Only] Details about the current state of the + // peering. + StateDetails string `json:"stateDetails,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") 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. "AutoCreateRoutes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkPeering) MarshalJSON() ([]byte, error) { + type NoMethod NetworkPeering + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworkPerformanceConfig struct { + // Possible values: + // "DEFAULT" + // "TIER_1" + TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "TotalEgressBandwidthTier") 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. "TotalEgressBandwidthTier") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkPerformanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkRoutingConfig: A routing configuration attached to a network +// resource. The message includes the list of routers associated with +// the network, and a flag indicating the type of routing behavior to +// enforce network-wide. +type NetworkRoutingConfig struct { + // RoutingMode: The network-wide routing mode to use. If set to + // REGIONAL, this network's Cloud Routers will only advertise routes + // with subnets of this network in the same region as the router. If set + // to GLOBAL, this network's Cloud Routers will advertise routes with + // all subnets of this network, across regions. + // + // Possible values: + // "GLOBAL" + // "REGIONAL" + RoutingMode string `json:"routingMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RoutingMode") 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. "RoutingMode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkRoutingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworksAddPeeringRequest struct { + // AutoCreateRoutes: This field will be deprecated soon. Use + // exchange_subnet_routes in network_peering instead. Indicates whether + // full mesh connectivity is created and managed automatically between + // peered networks. Currently this field should always be true since + // Google Compute Engine will automatically create and manage subnetwork + // routes between two networks when peering state is ACTIVE. + AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` + + // Name: Name of the peering, which should conform to RFC1035. + Name string `json:"name,omitempty"` + + // NetworkPeering: Network peering parameters. In order to specify route + // policies for peering using import and export custom routes, you must + // specify all peering related parameters (name, peer network, + // exchange_subnet_routes) in the network_peering field. The + // corresponding fields in NetworksAddPeeringRequest will be deprecated + // soon. + NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` + + // PeerNetwork: URL of the peer network. It can be either full URL or + // partial URL. The peer network may belong to a different project. If + // the partial URL does not contain project, it is assumed that the peer + // network is in the same project as the current network. + PeerNetwork string `json:"peerNetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") 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. "AutoCreateRoutes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworksAddPeeringRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworksGetEffectiveFirewallsResponse struct { + // FirewallPolicys: Effective firewalls from firewall policy. + FirewallPolicys []*NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` + + // Firewalls: Effective firewalls on the network. + Firewalls []*Firewall `json:"firewalls,omitempty"` + + // OrganizationFirewalls: Effective firewalls from organization + // policies. + OrganizationFirewalls []*NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy `json:"organizationFirewalls,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FirewallPolicys") 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. "FirewallPolicys") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworksGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { + type NoMethod NetworksGetEffectiveFirewallsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { + // DisplayName: [Output Only] Deprecated, please use short name instead. + // The display name of the firewall policy. + DisplayName string `json:"displayName,omitempty"` + + // Name: [Output Only] The name of the firewall policy. + Name string `json:"name,omitempty"` + + // Rules: The rules that apply to the network. + Rules []*FirewallPolicyRule `json:"rules,omitempty"` + + // ShortName: [Output Only] The short name of the firewall policy. + ShortName string `json:"shortName,omitempty"` + + // Type: [Output Only] The type of the firewall policy. + // + // Possible values: + // "HIERARCHY" + // "NETWORK" + // "UNSPECIFIED" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { + type NoMethod NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy: A +// pruned SecurityPolicy containing ID and any applicable firewall +// rules. +type NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy struct { + // Id: [Output Only] The unique identifier for the security policy. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Rules: The rules that apply to the network. + Rules []*SecurityPolicyRule `json:"rules,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy) MarshalJSON() ([]byte, error) { + type NoMethod NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworksRemovePeeringRequest struct { + // Name: Name of the peering, which should conform to RFC1035. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty 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 *NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworksRemovePeeringRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NetworksUpdatePeeringRequest struct { + NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkPeering") 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. "NetworkPeering") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) { + type NoMethod NetworksUpdatePeeringRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodeGroup: Represents a sole-tenant Node Group resource. A +// sole-tenant node is a physical server that is dedicated to hosting VM +// instances only for your specific project. Use sole-tenant nodes to +// keep your instances physically separated from instances in other +// projects, or to group your instances together on the same host +// hardware. For more information, read Sole-tenant nodes. +type NodeGroup struct { + // AutoscalingPolicy: Specifies how autoscaling should behave. + AutoscalingPolicy *NodeGroupAutoscalingPolicy `json:"autoscalingPolicy,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] The type of the resource. Always + // compute#nodeGroup for node group. + Kind string `json:"kind,omitempty"` + + // LocationHint: An opaque location hint used to place the Node close to + // other resources. This field is for use by internal tools that use the + // public API. The location hint here on the NodeGroup overrides any + // location_hint present in the NodeTemplate. + LocationHint string `json:"locationHint,omitempty"` + + // MaintenancePolicy: Specifies how to handle instances when a node in + // the group undergoes maintenance. Set to one of: DEFAULT, + // RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is + // DEFAULT. For more information, see Maintenance policies. + // + // Possible values: + // "DEFAULT" - Allow the node and corresponding instances to retain + // default maintenance behavior. + // "MAINTENANCE_POLICY_UNSPECIFIED" + // "MIGRATE_WITHIN_NODE_GROUP" - When maintenance must be done on a + // node, the instances on that node will be moved to other nodes in the + // group. Instances with onHostMaintenance = MIGRATE will live migrate + // to their destinations while instances with onHostMaintenance = + // TERMINATE will terminate and then restart on their destination nodes + // if automaticRestart = true. + // "RESTART_IN_PLACE" - Instances in this group will restart on the + // same node when maintenance has completed. Instances must have + // onHostMaintenance = TERMINATE, and they will only restart if + // automaticRestart = true. + MaintenancePolicy string `json:"maintenancePolicy,omitempty"` + + MaintenanceWindow *NodeGroupMaintenanceWindow `json:"maintenanceWindow,omitempty"` + + // Name: The name of the resource, provided by the client when initially + // creating the resource. The resource name must be 1-63 characters + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + Name string `json:"name,omitempty"` + + // NodeTemplate: URL of the node template to create the node group from. + NodeTemplate string `json:"nodeTemplate,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ShareSettings: Share-settings for the node group + ShareSettings *ShareSettings `json:"shareSettings,omitempty"` + + // Size: [Output Only] The total number of nodes in the node group. + Size int64 `json:"size,omitempty"` + + // Possible values: + // "CREATING" + // "DELETING" + // "INVALID" + // "READY" + Status string `json:"status,omitempty"` + + // Zone: [Output Only] The name of the zone where the node group + // resides, such as us-central1-a. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") + // 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. "AutoscalingPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NodeGroup) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NodeGroupAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NodeTemplate resources. - Items []*NodeTemplate `json:"items,omitempty"` + // Items: A list of NodeGroupsScopedList resources. + Items map[string]NodeGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeTemplateList - // for lists of node templates. + // Kind: [Output Only] Type of resource.Always + // compute#nodeGroupAggregatedList for aggregated lists of node groups. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -33291,8 +33460,11 @@ type NodeTemplateList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *NodeTemplateListWarning `json:"warning,omitempty"` + Warning *NodeGroupAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -33315,14 +33487,15 @@ type NodeTemplateList struct { NullFields []string `json:"-"` } -func (s *NodeTemplateList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateList +func (s *NodeGroupAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplateListWarning: [Output Only] Informational warning message. -type NodeTemplateListWarning struct { +// NodeGroupAggregatedListWarning: [Output Only] Informational warning +// message. +type NodeGroupAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -33390,7 +33563,7 @@ type NodeTemplateListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeTemplateListWarningData `json:"data,omitempty"` + Data []*NodeGroupAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -33413,13 +33586,13 @@ type NodeTemplateListWarning struct { NullFields []string `json:"-"` } -func (s *NodeTemplateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateListWarning +func (s *NodeGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTemplateListWarningData struct { +type NodeGroupAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -33450,20 +33623,32 @@ type NodeTemplateListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeTemplateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateListWarningData +func (s *NodeGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTemplateNodeTypeFlexibility struct { - Cpus string `json:"cpus,omitempty"` +type NodeGroupAutoscalingPolicy struct { + // MaxNodes: The maximum number of nodes that the group should have. + // Must be set if autoscaling is enabled. Maximum value allowed is 100. + MaxNodes int64 `json:"maxNodes,omitempty"` - LocalSsd string `json:"localSsd,omitempty"` + // MinNodes: The minimum number of nodes that the group should have. + MinNodes int64 `json:"minNodes,omitempty"` - Memory string `json:"memory,omitempty"` + // Mode: The autoscaling mode. Set to one of: ON, OFF, or + // ONLY_SCALE_OUT. For more information, see Autoscaler modes. + // + // Possible values: + // "MODE_UNSPECIFIED" + // "OFF" - Autoscaling is disabled. + // "ON" - Autocaling is fully enabled. + // "ONLY_SCALE_OUT" - Autoscaling will only scale out and will not + // remove nodes. + Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cpus") to + // ForceSendFields is a list of field names (e.g. "MaxNodes") 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 @@ -33471,8 +33656,8 @@ type NodeTemplateNodeTypeFlexibility struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cpus") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "MaxNodes") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -33480,47 +33665,68 @@ type NodeTemplateNodeTypeFlexibility struct { NullFields []string `json:"-"` } -func (s *NodeTemplateNodeTypeFlexibility) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateNodeTypeFlexibility +func (s *NodeGroupAutoscalingPolicy) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupAutoscalingPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTemplatesScopedList struct { - // NodeTemplates: [Output Only] A list of node templates contained in - // this scope. - NodeTemplates []*NodeTemplate `json:"nodeTemplates,omitempty"` +// NodeGroupList: Contains a list of nodeGroups. +type NodeGroupList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // node templates list is empty. - Warning *NodeTemplatesScopedListWarning `json:"warning,omitempty"` + // Items: A list of NodeGroup resources. + Items []*NodeGroup `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTemplates") 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 + // Kind: [Output Only] Type of resource.Always compute#nodeGroupList for + // lists of node groups. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NodeGroupListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "NodeTemplates") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NodeTemplatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedList +func (s *NodeGroupList) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplatesScopedListWarning: [Output Only] An informational -// warning that appears when the node templates list is empty. -type NodeTemplatesScopedListWarning struct { +// NodeGroupListWarning: [Output Only] Informational warning message. +type NodeGroupListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -33588,7 +33794,7 @@ type NodeTemplatesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeTemplatesScopedListWarningData `json:"data,omitempty"` + Data []*NodeGroupListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -33611,13 +33817,13 @@ type NodeTemplatesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *NodeTemplatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedListWarning +func (s *NodeGroupListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTemplatesScopedListWarningData struct { +type NodeGroupListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -33648,125 +33854,102 @@ type NodeTemplatesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedListWarningData +func (s *NodeGroupListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeType: Represent a sole-tenant Node Type resource. Each node -// within a node group must have a node type. A node type specifies the -// total amount of cores and memory for that node. Currently, the only -// available node type is n1-node-96-624 node type that has 96 vCPUs and -// 624 GB of memory, available in multiple zones. For more information -// read Node types. -type NodeType struct { - // CpuPlatform: [Output Only] The CPU platform used by this node type. - CpuPlatform string `json:"cpuPlatform,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated -- [Output Only] The deprecation status associated with - // this node type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - - // Description: [Output Only] An optional textual description of the - // resource. - Description string `json:"description,omitempty"` - - // GuestCpus: [Output Only] The number of virtual CPUs that are - // available to the node type. - GuestCpus int64 `json:"guestCpus,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] The type of the resource. Always compute#nodeType - // for node types. - Kind string `json:"kind,omitempty"` - - // LocalSsdGb: [Output Only] Local SSD available to the node type, - // defined in GB. - LocalSsdGb int64 `json:"localSsdGb,omitempty"` - - // MemoryMb: [Output Only] The amount of physical memory available to - // the node type, defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] The name of the zone where the node type resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` +// NodeGroupMaintenanceWindow: Time window specified for daily +// maintenance operations. GCE's internal maintenance will be performed +// within this window. +type NodeGroupMaintenanceWindow struct { + // MaintenanceDuration: [Output only] A predetermined duration for the + // window, automatically chosen to be the smallest possible in the given + // scenario. + MaintenanceDuration *Duration `json:"maintenanceDuration,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // StartTime: Start time of the window. This must be in UTC format that + // resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For + // example, both 13:00-5 and 08:00 are valid. + StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpuPlatform") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "MaintenanceDuration") + // 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. "CpuPlatform") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "MaintenanceDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NodeType) MarshalJSON() ([]byte, error) { - type NoMethod NodeType +func (s *NodeGroupMaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupMaintenanceWindow raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +type NodeGroupNode struct { + // Accelerators: Accelerators for this node. + Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - // Items: A list of NodeTypesScopedList resources. - Items map[string]NodeTypesScopedList `json:"items,omitempty"` + // ConsumedResources: Node resources that are reserved by all instances. + ConsumedResources *InstanceConsumptionInfo `json:"consumedResources,omitempty"` - // Kind: [Output Only] Type of resource.Always - // compute#nodeTypeAggregatedList for aggregated lists of node types. - Kind string `json:"kind,omitempty"` + // CpuOvercommitType: CPU overcommit. + // + // Possible values: + // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" + // "ENABLED" + // "NONE" + CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // Disks: Local disk configurations. + Disks []*LocalDisk `json:"disks,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // InstanceConsumptionData: Instance data that shows consumed resources + // on the node. + InstanceConsumptionData []*InstanceConsumptionData `json:"instanceConsumptionData,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` + // Instances: Instances scheduled on this node. + Instances []string `json:"instances,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTypeAggregatedListWarning `json:"warning,omitempty"` + // Name: The name of the node. + Name string `json:"name,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // NodeType: The type of this node. + NodeType string `json:"nodeType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // ServerBinding: Binding properties for the physical server. + ServerBinding *ServerBinding `json:"serverBinding,omitempty"` + + // ServerId: Server ID associated with this node. + ServerId string `json:"serverId,omitempty"` + + // Possible values: + // "CREATING" + // "DELETING" + // "INVALID" + // "READY" + // "REPAIRING" + Status string `json:"status,omitempty"` + + // TotalResources: Total amount of available resources on the node. + TotalResources *InstanceConsumptionInfo `json:"totalResources,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Accelerators") 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 @@ -33774,135 +33957,55 @@ type NodeTypeAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Accelerators") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NodeTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedList +func (s *NodeGroupNode) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupNode raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type NodeTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*NodeTypeAggregatedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` +type NodeGroupsAddNodesRequest struct { + // AdditionalNodeCount: Count of additional nodes to be added to the + // node group. + AdditionalNodeCount int64 `json:"additionalNodeCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AdditionalNodeCount") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdditionalNodeCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *NodeTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedListWarning +func (s *NodeGroupsAddNodesRequest) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsAddNodesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` +type NodeGroupsDeleteNodesRequest struct { + // Nodes: Names of the nodes to delete. + Nodes []string `json:"nodes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Nodes") 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 @@ -33910,7 +34013,7 @@ type NodeTypeAggregatedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Nodes") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -33919,23 +34022,23 @@ type NodeTypeAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedListWarningData +func (s *NodeGroupsDeleteNodesRequest) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsDeleteNodesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTypeList: Contains a list of node types. -type NodeTypeList struct { +type NodeGroupsListNodes struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NodeType resources. - Items []*NodeType `json:"items,omitempty"` + // Items: A list of Node resources. + Items []*NodeGroupNode `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeTypeList for - // lists of node types. + // Kind: [Output Only] The resource type, which is always + // compute.nodeGroupsListNodes for the list of nodes in the specified + // node group. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -33950,7 +34053,7 @@ type NodeTypeList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *NodeTypeListWarning `json:"warning,omitempty"` + Warning *NodeGroupsListNodesWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -33973,14 +34076,15 @@ type NodeTypeList struct { NullFields []string `json:"-"` } -func (s *NodeTypeList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeList +func (s *NodeGroupsListNodes) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsListNodes raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTypeListWarning: [Output Only] Informational warning message. -type NodeTypeListWarning struct { +// NodeGroupsListNodesWarning: [Output Only] Informational warning +// message. +type NodeGroupsListNodesWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -34048,7 +34152,7 @@ type NodeTypeListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeTypeListWarningData `json:"data,omitempty"` + Data []*NodeGroupsListNodesWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -34071,13 +34175,13 @@ type NodeTypeListWarning struct { NullFields []string `json:"-"` } -func (s *NodeTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeListWarning +func (s *NodeGroupsListNodesWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsListNodesWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTypeListWarningData struct { +type NodeGroupsListNodesWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -34108,22 +34212,22 @@ type NodeTypeListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeListWarningData +func (s *NodeGroupsListNodesWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsListNodesWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTypesScopedList struct { - // NodeTypes: [Output Only] A list of node types contained in this +type NodeGroupsScopedList struct { + // NodeGroups: [Output Only] A list of node groups contained in this // scope. - NodeTypes []*NodeType `json:"nodeTypes,omitempty"` + NodeGroups []*NodeGroup `json:"nodeGroups,omitempty"` // Warning: [Output Only] An informational warning that appears when the - // node types list is empty. - Warning *NodeTypesScopedListWarning `json:"warning,omitempty"` + // nodeGroup list is empty. + Warning *NodeGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTypes") to + // ForceSendFields is a list of field names (e.g. "NodeGroups") 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 @@ -34131,7 +34235,7 @@ type NodeTypesScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeTypes") to include in + // NullFields is a list of field names (e.g. "NodeGroups") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -34140,15 +34244,15 @@ type NodeTypesScopedList struct { NullFields []string `json:"-"` } -func (s *NodeTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedList +func (s *NodeGroupsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTypesScopedListWarning: [Output Only] An informational warning -// that appears when the node types list is empty. -type NodeTypesScopedListWarning struct { +// NodeGroupsScopedListWarning: [Output Only] An informational warning +// that appears when the nodeGroup list is empty. +type NodeGroupsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -34216,7 +34320,7 @@ type NodeTypesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NodeTypesScopedListWarningData `json:"data,omitempty"` + Data []*NodeGroupsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -34239,13 +34343,13 @@ type NodeTypesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *NodeTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedListWarning +func (s *NodeGroupsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NodeTypesScopedListWarningData struct { +type NodeGroupsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -34276,18 +34380,81 @@ type NodeTypesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *NodeTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedListWarningData +func (s *NodeGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NotificationEndpoint: Represents a notification endpoint. A -// notification endpoint resource defines an endpoint to receive -// notifications when there are status changes detected by the -// associated health check service. For more information, see Health -// checks overview. -type NotificationEndpoint struct { +type NodeGroupsSetNodeTemplateRequest struct { + // NodeTemplate: Full or partial URL of the node template resource to be + // updated for this node group. + NodeTemplate string `json:"nodeTemplate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NodeTemplate") 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. "NodeTemplate") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsSetNodeTemplateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NodeGroupsSimulateMaintenanceEventRequest struct { + // Nodes: Names of the nodes to go under maintenance simulation. + Nodes []string `json:"nodes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Nodes") 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. "Nodes") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeGroupsSimulateMaintenanceEventRequest) MarshalJSON() ([]byte, error) { + type NoMethod NodeGroupsSimulateMaintenanceEventRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodeTemplate: Represent a sole-tenant Node Template resource. You can +// use a template to define properties for nodes in a node group. For +// more information, read Creating node groups and instances. +type NodeTemplate struct { + Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` + + // CpuOvercommitType: CPU overcommit. + // + // Possible values: + // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" + // "ENABLED" + // "NONE" + CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -34296,94 +34463,71 @@ type NotificationEndpoint struct { // property when you create the resource. Description string `json:"description,omitempty"` - // GrpcSettings: Settings of the gRPC notification endpoint including - // the endpoint URL and the retry duration. - GrpcSettings *NotificationEndpointGrpcSettings `json:"grpcSettings,omitempty"` + Disks []*LocalDisk `json:"disks,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server generates this identifier. + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always - // compute#notificationEndpoint for notification endpoints. + // Kind: [Output Only] The type of the resource. Always + // compute#nodeTemplate for node templates. Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // Name: The name of the resource, provided by the client when initially + // creating the resource. The resource name must be 1-63 characters + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the notification - // endpoint resides. This field applies only to the regional resource. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // NodeAffinityLabels: Labels to use for node affinity, which will be + // used in instance scheduling. + NodeAffinityLabels map[string]string `json:"nodeAffinityLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // 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:"-"` + // NodeType: The node type to use for nodes group that are created from + // this template. + NodeType string `json:"nodeType,omitempty"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // NodeTypeFlexibility: Do not use. Instead, use the node_type property. + NodeTypeFlexibility *NodeTemplateNodeTypeFlexibility `json:"nodeTypeFlexibility,omitempty"` -func (s *NotificationEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpoint - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Region: [Output Only] The name of the region where the node template + // resides, such as us-central1. + Region string `json:"region,omitempty"` -// NotificationEndpointGrpcSettings: Represents a gRPC setting that -// describes one gRPC notification endpoint and the retry duration -// attempting to send notification to this endpoint. -type NotificationEndpointGrpcSettings struct { - // Authority: Optional. If specified, this field is used to set the - // authority header by the sender of notifications. See - // https://tools.ietf.org/html/rfc7540#section-8.1.2.3 - Authority string `json:"authority,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` - // Endpoint: Endpoint to which gRPC notifications are sent. This must be - // a valid gRPCLB DNS name. - Endpoint string `json:"endpoint,omitempty"` + // ServerBinding: Sets the binding properties for the physical server. + // Valid values include: - *[Default]* RESTART_NODE_ON_ANY_SERVER: + // Restarts VMs on any available physical server - + // RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical + // server whenever possible See Sole-tenant node options for more + // information. + ServerBinding *ServerBinding `json:"serverBinding,omitempty"` - // PayloadName: Optional. If specified, this field is used to populate - // the "name" field in gRPC requests. - PayloadName string `json:"payloadName,omitempty"` + // Status: [Output Only] The status of the node template. One of the + // following values: CREATING, READY, and DELETING. + // + // Possible values: + // "CREATING" - Resources are being allocated. + // "DELETING" - The node template is currently being deleted. + // "INVALID" - Invalid status. + // "READY" - The node template is ready. + Status string `json:"status,omitempty"` - // ResendInterval: Optional. This field is used to configure how often - // to send a full update of all non-healthy backends. If unspecified, - // full updates are not sent. If specified, must be in the range between - // 600 seconds to 3600 seconds. Nanos are disallowed. Can only be set - // for regional notification endpoints. - ResendInterval *Duration `json:"resendInterval,omitempty"` + // StatusMessage: [Output Only] An optional, human-readable explanation + // of the status. + StatusMessage string `json:"statusMessage,omitempty"` - // RetryDurationSec: How much time (in seconds) is spent attempting - // notification retries until a successful response is received. Default - // is 30s. Limit is 20m (1200s). Must be a positive number. - RetryDurationSec int64 `json:"retryDurationSec,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Authority") to + // ForceSendFields is a list of field names (e.g. "Accelerators") 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 @@ -34391,31 +34535,32 @@ type NotificationEndpointGrpcSettings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authority") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Accelerators") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *NotificationEndpointGrpcSettings) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointGrpcSettings +func (s *NodeTemplate) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplate raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NotificationEndpointList struct { +type NodeTemplateAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of NotificationEndpoint resources. - Items []*NotificationEndpoint `json:"items,omitempty"` + // Items: A list of NodeTemplatesScopedList resources. + Items map[string]NodeTemplatesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always - // compute#notificationEndpoint for notification endpoints. + // Kind: [Output Only] Type of resource.Always + // compute#nodeTemplateAggregatedList for aggregated lists of node + // templates. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -34429,8 +34574,11 @@ type NotificationEndpointList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *NotificationEndpointListWarning `json:"warning,omitempty"` + Warning *NodeTemplateAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -34453,15 +34601,15 @@ type NotificationEndpointList struct { NullFields []string `json:"-"` } -func (s *NotificationEndpointList) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointList +func (s *NodeTemplateAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplateAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NotificationEndpointListWarning: [Output Only] Informational warning -// message. -type NotificationEndpointListWarning struct { +// NodeTemplateAggregatedListWarning: [Output Only] Informational +// warning message. +type NodeTemplateAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -34529,7 +34677,7 @@ type NotificationEndpointListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*NotificationEndpointListWarningData `json:"data,omitempty"` + Data []*NodeTemplateAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -34552,13 +34700,13 @@ type NotificationEndpointListWarning struct { NullFields []string `json:"-"` } -func (s *NotificationEndpointListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointListWarning +func (s *NodeTemplateAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplateAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type NotificationEndpointListWarningData struct { +type NodeTemplateAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -34589,207 +34737,44 @@ type NotificationEndpointListWarningData struct { NullFields []string `json:"-"` } -func (s *NotificationEndpointListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointListWarningData +func (s *NodeTemplateAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplateAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Operation: Represents an Operation resource. Google Compute Engine -// has three Operation resources: * Global -// (/compute/docs/reference/rest/beta/globalOperations) * Regional -// (/compute/docs/reference/rest/beta/regionOperations) * Zonal -// (/compute/docs/reference/rest/beta/zoneOperations) You can use an -// operation resource to manage asynchronous API requests. For more -// information, read Handling API responses. Operations can be global, -// regional or zonal. - For global operations, use the -// `globalOperations` resource. - For regional operations, use the -// `regionOperations` resource. - For zonal operations, use the -// `zonalOperations` resource. For more information, read Global, -// Regional, and Zonal Resources. -type Operation struct { - // ClientOperationId: [Output Only] The value of `requestId` if you - // provided it in the request. Not present otherwise. - ClientOperationId string `json:"clientOperationId,omitempty"` - - // CreationTimestamp: [Deprecated] This field is deprecated. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: [Output Only] A textual description of the operation, - // which is set when the operation is created. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] The time that this operation was completed. - // This value is in RFC3339 text format. - EndTime string `json:"endTime,omitempty"` - - // Error: [Output Only] If errors are generated during processing of the - // operation, this field will be populated. - Error *OperationError `json:"error,omitempty"` - - // HttpErrorMessage: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned, such as `NOT - // FOUND`. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error status code that was returned. For example, a - // `404` means the resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - - // Id: [Output Only] The unique identifier for the operation. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` +// NodeTemplateList: Contains a list of node templates. +type NodeTemplateList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // InsertTime: [Output Only] The time that this operation was requested. - // This value is in RFC3339 text format. - InsertTime string `json:"insertTime,omitempty"` + // Items: A list of NodeTemplate resources. + Items []*NodeTemplate `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always `compute#operation` - // for Operation resources. + // Kind: [Output Only] Type of resource.Always compute#nodeTemplateList + // for lists of node templates. Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the operation. - Name string `json:"name,omitempty"` - - // OperationGroupId: [Output Only] An ID that represents a group of - // operations, such as when a group of operations results from a - // `bulkInsert` API request. - OperationGroupId string `json:"operationGroupId,omitempty"` - - // OperationType: [Output Only] The type of operation, such as `insert`, - // `update`, or `delete`, and so on. - OperationType string `json:"operationType,omitempty"` - - // Progress: [Output Only] An optional progress indicator that ranges - // from 0 to 100. There is no requirement that this be linear or support - // any granularity of operations. This should not be used to guess when - // the operation will be complete. This number should monotonically - // increase as the operation progresses. - Progress int64 `json:"progress,omitempty"` - - // Region: [Output Only] The URL of the region where the operation - // resides. Only applicable when performing regional operations. - Region string `json:"region,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // StartTime: [Output Only] The time that this operation was started by - // the server. This value is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - - // Status: [Output Only] The status of the operation, which can be one - // of the following: `PENDING`, `RUNNING`, or `DONE`. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - - // StatusMessage: [Output Only] An optional textual description of the - // current status of the operation. - StatusMessage string `json:"statusMessage,omitempty"` - - // TargetId: [Output Only] The unique target ID, which identifies a - // specific incarnation of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. For operations related to creating a snapshot, this points - // to the persistent disk that the snapshot was created from. - TargetLink string `json:"targetLink,omitempty"` - - // User: [Output Only] User who requested the operation, for example: - // `user@example.com`. - User string `json:"user,omitempty"` - - // Warnings: [Output Only] If warning messages are generated during - // processing of the operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only applicable when performing per-zone operations. - Zone string `json:"zone,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *NodeTemplateListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClientOperationId") - // to unconditionally include in API requests. By default, fields with - // empty 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. "ClientOperationId") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during -// processing of the operation, this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while - // processing this operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Errors") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - - // ErrorDetails: [Output Only] An optional list of messages that contain - // the error details. There is a set of defined message types to use for - // providing details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*OperationErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - - // Location: [Output Only] Indicates the field in the request that - // caused the error. This property is optional. - Location string `json:"location,omitempty"` - - // Message: [Output Only] An optional, human-readable error message. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -34797,7 +34782,7 @@ type OperationErrorErrors struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Id") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -34806,45 +34791,14 @@ type OperationErrorErrors struct { NullFields []string `json:"-"` } -func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - - Help *Help `json:"help,omitempty"` - - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ErrorInfo") 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. "ErrorInfo") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrorsErrorDetails +func (s *NodeTemplateList) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplateList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type OperationWarnings struct { +// NodeTemplateListWarning: [Output Only] Informational warning message. +type NodeTemplateListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -34912,7 +34866,7 @@ type OperationWarnings struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*OperationWarningsData `json:"data,omitempty"` + Data []*NodeTemplateListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -34935,13 +34889,13 @@ type OperationWarnings struct { NullFields []string `json:"-"` } -func (s *OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings +func (s *NodeTemplateListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplateListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type OperationWarningsData struct { +type NodeTemplateListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -34972,46 +34926,52 @@ type OperationWarningsData struct { NullFields []string `json:"-"` } -func (s *OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData +func (s *NodeTemplateListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplateListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type OperationAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` +type NodeTemplateNodeTypeFlexibility struct { + Cpus string `json:"cpus,omitempty"` - // Items: [Output Only] A map of scoped operation lists. - Items map[string]OperationsScopedList `json:"items,omitempty"` + LocalSsd string `json:"localSsd,omitempty"` - // Kind: [Output Only] Type of resource. Always - // `compute#operationAggregatedList` for aggregated lists of operations. - Kind string `json:"kind,omitempty"` + Memory string `json:"memory,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than `maxResults`, use the `nextPageToken` as a value for the query - // parameter `pageToken` in the next list request. Subsequent list - // requests will have their own `nextPageToken` to continue paging - // through the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cpus") 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:"-"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // NullFields is a list of field names (e.g. "Cpus") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` +func (s *NodeTemplateNodeTypeFlexibility) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplateNodeTypeFlexibility + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Warning: [Output Only] Informational warning message. - Warning *OperationAggregatedListWarning `json:"warning,omitempty"` +type NodeTemplatesScopedList struct { + // NodeTemplates: [Output Only] A list of node templates contained in + // this scope. + NodeTemplates []*NodeTemplate `json:"nodeTemplates,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: [Output Only] An informational warning that appears when the + // node templates list is empty. + Warning *NodeTemplatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "NodeTemplates") 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 @@ -35019,24 +34979,24 @@ type OperationAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NodeTemplates") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedList +func (s *NodeTemplatesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplatesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationAggregatedListWarning: [Output Only] Informational warning -// message. -type OperationAggregatedListWarning struct { +// NodeTemplatesScopedListWarning: [Output Only] An informational +// warning that appears when the node templates list is empty. +type NodeTemplatesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -35104,7 +35064,7 @@ type OperationAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*OperationAggregatedListWarningData `json:"data,omitempty"` + Data []*NodeTemplatesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -35127,13 +35087,13 @@ type OperationAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *OperationAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedListWarning +func (s *NodeTemplatesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplatesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type OperationAggregatedListWarningData struct { +type NodeTemplatesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -35164,38 +35124,119 @@ type OperationAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *OperationAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedListWarningData +func (s *NodeTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeTemplatesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` +// NodeType: Represent a sole-tenant Node Type resource. Each node +// within a node group must have a node type. A node type specifies the +// total amount of cores and memory for that node. Currently, the only +// available node type is n1-node-96-624 node type that has 96 vCPUs and +// 624 GB of memory, available in multiple zones. For more information +// read Node types. +type NodeType struct { + // CpuPlatform: [Output Only] The CPU platform used by this node type. + CpuPlatform string `json:"cpuPlatform,omitempty"` - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Kind: [Output Only] Type of resource. Always `compute#operations` for - // Operations resource. + // Deprecated -- [Output Only] The deprecation status associated with + // this node type. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: [Output Only] An optional textual description of the + // resource. + Description string `json:"description,omitempty"` + + // GuestCpus: [Output Only] The number of virtual CPUs that are + // available to the node type. + GuestCpus int64 `json:"guestCpus,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] The type of the resource. Always compute#nodeType + // for node types. + Kind string `json:"kind,omitempty"` + + // LocalSsdGb: [Output Only] Local SSD available to the node type, + // defined in GB. + LocalSsdGb int64 `json:"localSsdGb,omitempty"` + + // MemoryMb: [Output Only] The amount of physical memory available to + // the node type, defined in MB. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Zone: [Output Only] The name of the zone where the node type resides, + // such as us-central1-a. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CpuPlatform") 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. "CpuPlatform") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodeType) MarshalJSON() ([]byte, error) { + type NoMethod NodeType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type NodeTypeAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of NodeTypesScopedList resources. + Items map[string]NodeTypesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource.Always + // compute#nodeTypeAggregatedList for aggregated lists of node types. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next // page of results for list requests. If the number of results is larger - // than `maxResults`, use the `nextPageToken` as a value for the query - // parameter `pageToken` in the next list request. Subsequent list - // requests will have their own `nextPageToken` to continue paging - // through the results. + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *OperationListWarning `json:"warning,omitempty"` + Warning *NodeTypeAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -35218,14 +35259,15 @@ type OperationList struct { NullFields []string `json:"-"` } -func (s *OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList +func (s *NodeTypeAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationListWarning: [Output Only] Informational warning message. -type OperationListWarning struct { +// NodeTypeAggregatedListWarning: [Output Only] Informational warning +// message. +type NodeTypeAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -35293,7 +35335,7 @@ type OperationListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*OperationListWarningData `json:"data,omitempty"` + Data []*NodeTypeAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -35316,13 +35358,13 @@ type OperationListWarning struct { NullFields []string `json:"-"` } -func (s *OperationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationListWarning +func (s *NodeTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type OperationListWarningData struct { +type NodeTypeAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -35353,22 +35395,44 @@ type OperationListWarningData struct { NullFields []string `json:"-"` } -func (s *OperationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationListWarningData +func (s *NodeTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type OperationsScopedList struct { - // Operations: [Output Only] A list of operations contained in this - // scope. - Operations []*Operation `json:"operations,omitempty"` +// NodeTypeList: Contains a list of node types. +type NodeTypeList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of operations when the list is empty. - Warning *OperationsScopedListWarning `json:"warning,omitempty"` + // Items: A list of NodeType resources. + Items []*NodeType `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to + // Kind: [Output Only] Type of resource.Always compute#nodeTypeList for + // lists of node types. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *NodeTypeListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -35376,8 +35440,8 @@ type OperationsScopedList struct { // 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 + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -35385,15 +35449,14 @@ type OperationsScopedList struct { NullFields []string `json:"-"` } -func (s *OperationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedList +func (s *NodeTypeList) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationsScopedListWarning: [Output Only] Informational warning -// which replaces the list of operations when the list is empty. -type OperationsScopedListWarning struct { +// NodeTypeListWarning: [Output Only] Informational warning message. +type NodeTypeListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -35461,7 +35524,7 @@ type OperationsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*OperationsScopedListWarningData `json:"data,omitempty"` + Data []*NodeTypeListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -35484,13 +35547,13 @@ type OperationsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedListWarning +func (s *NodeTypeListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type OperationsScopedListWarningData struct { +type NodeTypeListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -35521,348 +35584,22 @@ type OperationsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OrganizationSecurityPoliciesListAssociationsResponse struct { - // Associations: A list of associations. - Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` - - // Kind: [Output Only] Type of securityPolicy associations. Always - // compute#organizationSecurityPoliciesListAssociations for lists of - // securityPolicy associations. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Associations") 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. "Associations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OrganizationSecurityPoliciesListAssociationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrganizationSecurityPoliciesListAssociationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OutlierDetection: Settings controlling the eviction of unhealthy -// hosts from the load balancing pool for the backend service. -type OutlierDetection struct { - // BaseEjectionTime: The base time that a host is ejected for. The real - // ejection time is equal to the base ejection time multiplied by the - // number of times the host has been ejected. Defaults to 30000ms or - // 30s. - BaseEjectionTime *Duration `json:"baseEjectionTime,omitempty"` - - // ConsecutiveErrors: Number of errors before a host is ejected from the - // connection pool. When the backend host is accessed over HTTP, a 5xx - // return code qualifies as an error. Defaults to 5. Not supported when - // the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. - ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"` - - // ConsecutiveGatewayFailure: The number of consecutive gateway failures - // (502, 503, 504 status or connection errors that are mapped to one of - // those status codes) before a consecutive gateway failure ejection - // occurs. Defaults to 3. Not supported when the backend service is - // referenced by a URL map that is bound to target gRPC proxy that has - // validateForProxyless field set to true. - ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` - - // EnforcingConsecutiveErrors: The percentage chance that a host will be - // actually ejected when an outlier status is detected through - // consecutive 5xx. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. Not supported when the backend - // service is referenced by a URL map that is bound to target gRPC proxy - // that has validateForProxyless field set to true. - EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` - - // EnforcingConsecutiveGatewayFailure: The percentage chance that a host - // will be actually ejected when an outlier status is detected through - // consecutive gateway failures. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 100. Not supported when - // the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. - EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` - - // EnforcingSuccessRate: The percentage chance that a host will be - // actually ejected when an outlier status is detected through success - // rate statistics. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 100. - EnforcingSuccessRate int64 `json:"enforcingSuccessRate,omitempty"` - - // Interval: Time interval between ejection analysis sweeps. This can - // result in both new ejections as well as hosts being returned to - // service. Defaults to 1 second. - Interval *Duration `json:"interval,omitempty"` - - // MaxEjectionPercent: Maximum percentage of hosts in the load balancing - // pool for the backend service that can be ejected. Defaults to 50%. - MaxEjectionPercent int64 `json:"maxEjectionPercent,omitempty"` - - // SuccessRateMinimumHosts: The number of hosts in a cluster that must - // have enough request volume to detect success rate outliers. If the - // number of hosts is less than this setting, outlier detection via - // success rate statistics is not performed for any host in the cluster. - // Defaults to 5. - SuccessRateMinimumHosts int64 `json:"successRateMinimumHosts,omitempty"` - - // SuccessRateRequestVolume: The minimum number of total requests that - // must be collected in one interval (as defined by the interval - // duration above) to include this host in success rate based outlier - // detection. If the volume is lower than this setting, outlier - // detection via success rate statistics is not performed for that host. - // Defaults to 100. - SuccessRateRequestVolume int64 `json:"successRateRequestVolume,omitempty"` - - // SuccessRateStdevFactor: This factor is used to determine the ejection - // threshold for success rate outlier ejection. The ejection threshold - // is the difference between the mean success rate, and the product of - // this factor and the standard deviation of the mean success rate: mean - // - (stdev * success_rate_stdev_factor). This factor is divided by a - // thousand to get a double. That is, if the desired factor is 1.9, the - // runtime value should be 1900. Defaults to 1900. - SuccessRateStdevFactor int64 `json:"successRateStdevFactor,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BaseEjectionTime") 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. "BaseEjectionTime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *OutlierDetection) MarshalJSON() ([]byte, error) { - type NoMethod OutlierDetection - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PacketIntervals: Next free: 7 -type PacketIntervals struct { - // AvgMs: Average observed inter-packet interval in milliseconds. - AvgMs int64 `json:"avgMs,omitempty,string"` - - // Duration: From how long ago in the past these intervals were - // observed. - // - // Possible values: - // "DURATION_UNSPECIFIED" - // "HOUR" - // "MAX" - From BfdSession object creation time. - // "MINUTE" - Duration string `json:"duration,omitempty"` - - // MaxMs: Maximum observed inter-packet interval in milliseconds. - MaxMs int64 `json:"maxMs,omitempty,string"` - - // MinMs: Minimum observed inter-packet interval in milliseconds. - MinMs int64 `json:"minMs,omitempty,string"` - - // NumIntervals: Number of inter-packet intervals from which these - // statistics were derived. - NumIntervals int64 `json:"numIntervals,omitempty,string"` - - // Type: The type of packets for which inter-packet intervals were - // computed. - // - // Possible values: - // "LOOPBACK" - Only applies to Echo packets. This shows the intervals - // between sending and receiving the same packet. - // "RECEIVE" - Intervals between received packets. - // "TRANSMIT" - Intervals between transmitted packets. - // "TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AvgMs") 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. "AvgMs") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PacketIntervals) MarshalJSON() ([]byte, error) { - type NoMethod PacketIntervals - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PacketMirroring: Represents a Packet Mirroring resource. Packet -// Mirroring clones the traffic of specified instances in your Virtual -// Private Cloud (VPC) network and forwards it to a collector -// destination, such as an instance group of an internal TCP/UDP load -// balancer, for analysis or examination. For more information about -// setting up Packet Mirroring, see Using Packet Mirroring. -type PacketMirroring struct { - // CollectorIlb: The Forwarding Rule resource of type - // loadBalancingScheme=INTERNAL that will be used as collector for - // mirrored traffic. The specified forwarding rule must have - // isMirroringCollector set to true. - CollectorIlb *PacketMirroringForwardingRuleInfo `json:"collectorIlb,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Enable: Indicates whether or not this packet mirroring takes effect. - // If set to FALSE, this packet mirroring policy will not be enforced on - // the network. The default is TRUE. - // - // Possible values: - // "FALSE" - // "TRUE" - Enable string `json:"enable,omitempty"` - - // Filter: Filter for mirrored traffic. If unspecified, all traffic is - // mirrored. - Filter *PacketMirroringFilter `json:"filter,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#packetMirroring for packet mirrorings. - Kind string `json:"kind,omitempty"` - - // MirroredResources: PacketMirroring mirroredResourceInfos. - // MirroredResourceInfo specifies a set of mirrored VM instances, - // subnetworks and/or tags for which traffic from/to all VM instances - // will be mirrored. - MirroredResources *PacketMirroringMirroredResourceInfo `json:"mirroredResources,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: Specifies the mirrored VPC network. Only packets in this - // network will be mirrored. All mirrored VMs should have a NIC in the - // given network. All mirrored subnetworks should belong to the given - // network. - Network *PacketMirroringNetworkInfo `json:"network,omitempty"` - - // Priority: The priority of applying this configuration. Priority is - // used to break ties in cases where there is more than one matching - // rule. In the case of two rules that apply for a given Instance, the - // one with the lowest-numbered priority value wins. Default value is - // 1000. Valid range is 0 through 65535. - Priority int64 `json:"priority,omitempty"` - - // Region: [Output Only] URI of the region where the packetMirroring - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CollectorIlb") 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. "CollectorIlb") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PacketMirroring) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroring +func (s *NodeTypeListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PacketMirroringAggregatedList: Contains a list of packetMirrorings. -type PacketMirroringAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of PacketMirroring resources. - Items map[string]PacketMirroringsScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *PacketMirroringAggregatedListWarning `json:"warning,omitempty"` +type NodeTypesScopedList struct { + // NodeTypes: [Output Only] A list of node types contained in this + // scope. + NodeTypes []*NodeType `json:"nodeTypes,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: [Output Only] An informational warning that appears when the + // node types list is empty. + Warning *NodeTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "NodeTypes") 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 @@ -35870,8 +35607,8 @@ type PacketMirroringAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "NodeTypes") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -35879,15 +35616,15 @@ type PacketMirroringAggregatedList struct { NullFields []string `json:"-"` } -func (s *PacketMirroringAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedList +func (s *NodeTypesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PacketMirroringAggregatedListWarning: [Output Only] Informational -// warning message. -type PacketMirroringAggregatedListWarning struct { +// NodeTypesScopedListWarning: [Output Only] An informational warning +// that appears when the node types list is empty. +type NodeTypesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -35955,7 +35692,7 @@ type PacketMirroringAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*PacketMirroringAggregatedListWarningData `json:"data,omitempty"` + Data []*NodeTypesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -35978,13 +35715,13 @@ type PacketMirroringAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *PacketMirroringAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedListWarning +func (s *NodeTypesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringAggregatedListWarningData struct { +type NodeTypesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -36015,68 +35752,114 @@ type PacketMirroringAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *PacketMirroringAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedListWarningData +func (s *NodeTypesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringFilter struct { - // IPProtocols: Protocols that apply as filter on mirrored traffic. If - // no protocols are specified, all traffic that matches the specified - // CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is - // specified, all traffic is mirrored. - IPProtocols []string `json:"IPProtocols,omitempty"` +// NotificationEndpoint: Represents a notification endpoint. A +// notification endpoint resource defines an endpoint to receive +// notifications when there are status changes detected by the +// associated health check service. For more information, see Health +// checks overview. +type NotificationEndpoint struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CidrRanges: IP CIDR ranges that apply as filter on the source - // (ingress) or destination (egress) IP in the IP header. Only IPv4 is - // supported. If no ranges are specified, all traffic that matches the - // specified IPProtocols is mirrored. If neither cidrRanges nor - // IPProtocols is specified, all traffic is mirrored. - CidrRanges []string `json:"cidrRanges,omitempty"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // Direction: Direction of traffic to mirror, either INGRESS, EGRESS, or - // BOTH. The default is BOTH. - // - // Possible values: - // "BOTH" - Default, both directions are mirrored. - // "EGRESS" - Only egress traffic is mirrored. - // "INGRESS" - Only ingress traffic is mirrored. - Direction string `json:"direction,omitempty"` + // GrpcSettings: Settings of the gRPC notification endpoint including + // the endpoint URL and the retry duration. + GrpcSettings *NotificationEndpointGrpcSettings `json:"grpcSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPProtocols") to - // unconditionally include in API requests. By default, fields with + // Id: [Output Only] A unique identifier for this resource type. The + // server generates this identifier. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#notificationEndpoint for notification endpoints. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Region: [Output Only] URL of the region where the notification + // endpoint resides. This field applies only to the regional resource. + // You must specify this field as part of the HTTP request URL. It is + // not settable as a field in the request body. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with // empty 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. "IPProtocols") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *PacketMirroringFilter) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringFilter +func (s *NotificationEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpoint raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringForwardingRuleInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the forwarding - // rule; defined by the server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` +// NotificationEndpointGrpcSettings: Represents a gRPC setting that +// describes one gRPC notification endpoint and the retry duration +// attempting to send notification to this endpoint. +type NotificationEndpointGrpcSettings struct { + // Authority: Optional. If specified, this field is used to set the + // authority header by the sender of notifications. See + // https://tools.ietf.org/html/rfc7540#section-8.1.2.3 + Authority string `json:"authority,omitempty"` - // Url: Resource URL to the forwarding rule representing the ILB - // configured as destination of the mirrored traffic. - Url string `json:"url,omitempty"` + // Endpoint: Endpoint to which gRPC notifications are sent. This must be + // a valid gRPCLB DNS name. + Endpoint string `json:"endpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // PayloadName: Optional. If specified, this field is used to populate + // the "name" field in gRPC requests. + PayloadName string `json:"payloadName,omitempty"` + + // ResendInterval: Optional. This field is used to configure how often + // to send a full update of all non-healthy backends. If unspecified, + // full updates are not sent. If specified, must be in the range between + // 600 seconds to 3600 seconds. Nanos are disallowed. Can only be set + // for regional notification endpoints. + ResendInterval *Duration `json:"resendInterval,omitempty"` + + // RetryDurationSec: How much time (in seconds) is spent attempting + // notification retries until a successful response is received. Default + // is 30s. Limit is 20m (1200s). Must be a positive number. + RetryDurationSec int64 `json:"retryDurationSec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Authority") 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 @@ -36084,32 +35867,31 @@ type PacketMirroringForwardingRuleInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Authority") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PacketMirroringForwardingRuleInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringForwardingRuleInfo +func (s *NotificationEndpointGrpcSettings) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpointGrpcSettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PacketMirroringList: Contains a list of PacketMirroring resources. -type PacketMirroringList struct { +type NotificationEndpointList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of PacketMirroring resources. - Items []*PacketMirroring `json:"items,omitempty"` + // Items: A list of NotificationEndpoint resources. + Items []*NotificationEndpoint `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#packetMirroring - // for packetMirrorings. + // Kind: [Output Only] Type of the resource. Always + // compute#notificationEndpoint for notification endpoints. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -36124,7 +35906,7 @@ type PacketMirroringList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *PacketMirroringListWarning `json:"warning,omitempty"` + Warning *NotificationEndpointListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -36147,15 +35929,15 @@ type PacketMirroringList struct { NullFields []string `json:"-"` } -func (s *PacketMirroringList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringList +func (s *NotificationEndpointList) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpointList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PacketMirroringListWarning: [Output Only] Informational warning +// NotificationEndpointListWarning: [Output Only] Informational warning // message. -type PacketMirroringListWarning struct { +type NotificationEndpointListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -36223,7 +36005,7 @@ type PacketMirroringListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*PacketMirroringListWarningData `json:"data,omitempty"` + Data []*NotificationEndpointListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -36246,13 +36028,13 @@ type PacketMirroringListWarning struct { NullFields []string `json:"-"` } -func (s *PacketMirroringListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringListWarning +func (s *NotificationEndpointListWarning) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpointListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringListWarningData struct { +type NotificationEndpointListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -36283,95 +36065,166 @@ type PacketMirroringListWarningData struct { NullFields []string `json:"-"` } -func (s *PacketMirroringListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringListWarningData +func (s *NotificationEndpointListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NotificationEndpointListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringMirroredResourceInfo struct { - // Instances: A set of virtual machine instances that are being - // mirrored. They must live in zones contained in the same region as - // this packetMirroring. Note that this config will apply only to those - // network interfaces of the Instances that belong to the network - // specified in this packetMirroring. You may specify a maximum of 50 - // Instances. - Instances []*PacketMirroringMirroredResourceInfoInstanceInfo `json:"instances,omitempty"` +// Operation: Represents an Operation resource. Google Compute Engine +// has three Operation resources: * Global +// (/compute/docs/reference/rest/beta/globalOperations) * Regional +// (/compute/docs/reference/rest/beta/regionOperations) * Zonal +// (/compute/docs/reference/rest/beta/zoneOperations) You can use an +// operation resource to manage asynchronous API requests. For more +// information, read Handling API responses. Operations can be global, +// regional or zonal. - For global operations, use the +// `globalOperations` resource. - For regional operations, use the +// `regionOperations` resource. - For zonal operations, use the +// `zonalOperations` resource. For more information, read Global, +// Regional, and Zonal Resources. +type Operation struct { + // ClientOperationId: [Output Only] The value of `requestId` if you + // provided it in the request. Not present otherwise. + ClientOperationId string `json:"clientOperationId,omitempty"` - // Subnetworks: A set of subnetworks for which traffic from/to all VM - // instances will be mirrored. They must live in the same region as this - // packetMirroring. You may specify a maximum of 5 subnetworks. - Subnetworks []*PacketMirroringMirroredResourceInfoSubnetInfo `json:"subnetworks,omitempty"` + // CreationTimestamp: [Deprecated] This field is deprecated. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Tags: A set of mirrored tags. Traffic from/to all VM instances that - // have one or more of these tags will be mirrored. - Tags []string `json:"tags,omitempty"` + // Description: [Output Only] A textual description of the operation, + // which is set when the operation is created. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") 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:"-"` + // EndTime: [Output Only] The time that this operation was completed. + // This value is in RFC3339 text format. + EndTime string `json:"endTime,omitempty"` - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Error: [Output Only] If errors are generated during processing of the + // operation, this field will be populated. + Error *OperationError `json:"error,omitempty"` -func (s *PacketMirroringMirroredResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // HttpErrorMessage: [Output Only] If the operation fails, this field + // contains the HTTP error message that was returned, such as `NOT + // FOUND`. + HttpErrorMessage string `json:"httpErrorMessage,omitempty"` -type PacketMirroringMirroredResourceInfoInstanceInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the instance; - // defined by the server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` + // HttpErrorStatusCode: [Output Only] If the operation fails, this field + // contains the HTTP error status code that was returned. For example, a + // `404` means the resource was not found. + HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - // Url: Resource URL to the virtual machine instance which is being - // mirrored. - Url string `json:"url,omitempty"` + // Id: [Output Only] The unique identifier for the operation. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with + // InsertTime: [Output Only] The time that this operation was requested. + // This value is in RFC3339 text format. + InsertTime string `json:"insertTime,omitempty"` + + // Kind: [Output Only] Type of the resource. Always `compute#operation` + // for Operation resources. + Kind string `json:"kind,omitempty"` + + // Name: [Output Only] Name of the operation. + Name string `json:"name,omitempty"` + + // OperationGroupId: [Output Only] An ID that represents a group of + // operations, such as when a group of operations results from a + // `bulkInsert` API request. + OperationGroupId string `json:"operationGroupId,omitempty"` + + // OperationType: [Output Only] The type of operation, such as `insert`, + // `update`, or `delete`, and so on. + OperationType string `json:"operationType,omitempty"` + + // Progress: [Output Only] An optional progress indicator that ranges + // from 0 to 100. There is no requirement that this be linear or support + // any granularity of operations. This should not be used to guess when + // the operation will be complete. This number should monotonically + // increase as the operation progresses. + Progress int64 `json:"progress,omitempty"` + + // Region: [Output Only] The URL of the region where the operation + // resides. Only applicable when performing regional operations. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // StartTime: [Output Only] The time that this operation was started by + // the server. This value is in RFC3339 text format. + StartTime string `json:"startTime,omitempty"` + + // Status: [Output Only] The status of the operation, which can be one + // of the following: `PENDING`, `RUNNING`, or `DONE`. + // + // Possible values: + // "DONE" + // "PENDING" + // "RUNNING" + Status string `json:"status,omitempty"` + + // StatusMessage: [Output Only] An optional textual description of the + // current status of the operation. + StatusMessage string `json:"statusMessage,omitempty"` + + // TargetId: [Output Only] The unique target ID, which identifies a + // specific incarnation of the target resource. + TargetId uint64 `json:"targetId,omitempty,string"` + + // TargetLink: [Output Only] The URL of the resource that the operation + // modifies. For operations related to creating a snapshot, this points + // to the persistent disk that the snapshot was created from. + TargetLink string `json:"targetLink,omitempty"` + + // User: [Output Only] User who requested the operation, for example: + // `user@example.com`. + User string `json:"user,omitempty"` + + // Warnings: [Output Only] If warning messages are generated during + // processing of the operation, this field will be populated. + Warnings []*OperationWarnings `json:"warnings,omitempty"` + + // Zone: [Output Only] The URL of the zone where the operation resides. + // Only applicable when performing per-zone operations. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ClientOperationId") + // to unconditionally include in API requests. By default, fields with // empty 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. "CanonicalUrl") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ClientOperationId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *PacketMirroringMirroredResourceInfoInstanceInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfoInstanceInfo +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringMirroredResourceInfoSubnetInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the subnetwork; - // defined by the server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - - // Url: Resource URL to the subnetwork for which traffic from/to all VM - // instances will be mirrored. - Url string `json:"url,omitempty"` +// OperationError: [Output Only] If errors are generated during +// processing of the operation, this field will be populated. +type OperationError struct { + // Errors: [Output Only] The array of errors encountered while + // processing this operation. + Errors []*OperationErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // ForceSendFields is a list of field names (e.g. "Errors") 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 @@ -36379,30 +36232,40 @@ type PacketMirroringMirroredResourceInfoSubnetInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PacketMirroringMirroredResourceInfoSubnetInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfoSubnetInfo +func (s *OperationError) MarshalJSON() ([]byte, error) { + type NoMethod OperationError raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringNetworkInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the network; - // defined by the server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` +type OperationErrorErrors struct { + // Code: [Output Only] The error type identifier for this error. + Code string `json:"code,omitempty"` - // Url: URL of the network resource. - Url string `json:"url,omitempty"` + // ErrorDetails: [Output Only] An optional list of messages that contain + // the error details. There is a set of defined message types to use for + // providing details.The syntax depends on the error code. For example, + // QuotaExceededInfo will have details when the error code is + // QUOTA_EXCEEDED. + ErrorDetails []*OperationErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // Location: [Output Only] Indicates the field in the request that + // caused the error. This property is optional. + Location string `json:"location,omitempty"` + + // Message: [Output Only] An optional, human-readable error message. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -36410,30 +36273,31 @@ type PacketMirroringNetworkInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PacketMirroringNetworkInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringNetworkInfo +func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { + type NoMethod OperationErrorErrors raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringsScopedList struct { - // PacketMirrorings: A list of packetMirrorings contained in this scope. - PacketMirrorings []*PacketMirroring `json:"packetMirrorings,omitempty"` +type OperationErrorErrorsErrorDetails struct { + ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - // Warning: Informational warning which replaces the list of - // packetMirrorings when the list is empty. - Warning *PacketMirroringsScopedListWarning `json:"warning,omitempty"` + Help *Help `json:"help,omitempty"` - // ForceSendFields is a list of field names (e.g. "PacketMirrorings") to + LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` + + QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorInfo") 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 @@ -36441,25 +36305,22 @@ type PacketMirroringsScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PacketMirrorings") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "ErrorInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PacketMirroringsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedList +func (s *OperationErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod OperationErrorErrorsErrorDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PacketMirroringsScopedListWarning: Informational warning which -// replaces the list of packetMirrorings when the list is empty. -type PacketMirroringsScopedListWarning struct { +type OperationWarnings struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -36527,7 +36388,7 @@ type PacketMirroringsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*PacketMirroringsScopedListWarningData `json:"data,omitempty"` + Data []*OperationWarningsData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -36550,13 +36411,13 @@ type PacketMirroringsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *PacketMirroringsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedListWarning +func (s *OperationWarnings) MarshalJSON() ([]byte, error) { + type NoMethod OperationWarnings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PacketMirroringsScopedListWarningData struct { +type OperationWarningsData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -36587,272 +36448,182 @@ type PacketMirroringsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *PacketMirroringsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedListWarningData +func (s *OperationWarningsData) MarshalJSON() ([]byte, error) { + type NoMethod OperationWarningsData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PathMatcher: A matcher for the path portion of the URL. The -// BackendService from the longest-matched rule will serve the URL. If -// no rule was matched, the default service is used. -type PathMatcher struct { - // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy - // specifies how the Load Balancer returns error responses when - // BackendServiceor BackendBucket responds with an error. This policy - // takes effect at the PathMatcher level and applies only when no policy - // has been defined for the error code at lower levels like RouteRule - // and PathRule within this PathMatcher. If an error code does not have - // a policy defined in defaultCustomErrorResponsePolicy, then a policy - // defined for the error code in UrlMap.defaultCustomErrorResponsePolicy - // takes effect. For example, consider a UrlMap with the following - // configuration: - UrlMap.defaultCustomErrorResponsePolicy is - // configured with policies for 5xx and 4xx errors - A RouteRule for - // /coming_soon/ is configured for the error code 404. If the request is - // for www.myotherdomain.com and a 404 is encountered, the policy under - // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 - // response is encountered for the request - // www.example.com/current_events/, the pathMatcher's policy takes - // effect. If however, the request for www.example.com/coming_soon/ - // encounters a 404, the policy in RouteRule.customErrorResponsePolicy - // takes effect. If any of the requests in this example encounter a 500 - // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy - // takes effect. When used in conjunction with - // pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. - // Only once all retries are exhausted, the - // defaultCustomErrorResponsePolicy is applied. While attempting a - // retry, if load balancer is successful in reaching the service, the - // defaultCustomErrorResponsePolicy is ignored and the response from the - // service is returned to the client. defaultCustomErrorResponsePolicy - // is supported only for Global External HTTP(S) load balancing. - DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` - - // DefaultRouteAction: defaultRouteAction takes effect when none of the - // pathRules or routeRules match. The load balancer performs advanced - // routing actions, such as URL rewrites and header transformations, - // before forwarding the request to the selected backend. If - // defaultRouteAction specifies any weightedBackendServices, - // defaultService must not be set. Conversely if defaultService is set, - // defaultRouteAction cannot contain any weightedBackendServices. Only - // one of defaultRouteAction or defaultUrlRedirect must be set. URL maps - // for Classic external HTTP(S) load balancers only support the - // urlRewrite action within a path matcher's defaultRouteAction. - DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` +type OperationAggregatedList struct { + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` - // DefaultService: The full or partial URL to the BackendService - // resource. This URL is used if none of the pathRules or routeRules - // defined by this PathMatcher are matched. For example, the following - // are all valid URLs to a BackendService resource: - - // https://www.googleapis.com/compute/v1/projects/project - // /global/backendServices/backendService - - // compute/v1/projects/project/global/backendServices/backendService - - // global/backendServices/backendService If defaultRouteAction is also - // specified, advanced routing actions, such as URL rewrites, take - // effect before sending the request to the backend. However, if - // defaultService is specified, defaultRouteAction cannot contain any - // weightedBackendServices. Conversely, if defaultRouteAction specifies - // any weightedBackendServices, defaultService must not be specified. - // Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. Authorization - // requires one or more of the following Google IAM permissions on the - // specified resource default_service: - compute.backendBuckets.use - - // compute.backendServices.use - DefaultService string `json:"defaultService,omitempty"` + // Items: [Output Only] A map of scoped operation lists. + Items map[string]OperationsScopedList `json:"items,omitempty"` - // DefaultUrlRedirect: When none of the specified pathRules or - // routeRules match, the request is redirected to a URL specified by - // defaultUrlRedirect. If defaultUrlRedirect is specified, - // defaultService or defaultRouteAction must not be set. Not supported - // when the URL map is bound to a target gRPC proxy. - DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` + // Kind: [Output Only] Type of resource. Always + // `compute#operationAggregatedList` for aggregated lists of operations. + Kind string `json:"kind,omitempty"` - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than `maxResults`, use the `nextPageToken` as a value for the query + // parameter `pageToken` in the next list request. Subsequent list + // requests will have their own `nextPageToken` to continue paging + // through the results. + NextPageToken string `json:"nextPageToken,omitempty"` - // HeaderAction: Specifies changes to request and response headers that - // need to take effect for the selected backend service. HeaderAction - // specified here are applied after the matching HttpRouteRule - // HeaderAction and before the HeaderAction in the UrlMap HeaderAction - // is not supported for load balancers that have their - // loadBalancingScheme set to EXTERNAL. Not supported when the URL map - // is bound to a target gRPC proxy that has validateForProxyless field - // set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` - // Name: The name to which this PathMatcher is referred by the HostRule. - Name string `json:"name,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` - // PathRules: The list of path rules. Use this list instead of - // routeRules when routing based on simple path matching is all that's - // required. The order by which path rules are specified does not - // matter. Matches are always done on the longest-path-first basis. For - // example: a pathRule with a path /a/b/c/* will match before /a/b/* - // irrespective of the order in which those paths appear in this list. - // Within a given pathMatcher, only one of pathRules or routeRules must - // be set. - PathRules []*PathRule `json:"pathRules,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *OperationAggregatedListWarning `json:"warning,omitempty"` - // RouteRules: The list of HTTP route rules. Use this list instead of - // pathRules when advanced route matching and routing actions are - // desired. routeRules are evaluated in order of priority, from the - // lowest to highest number. Within a given pathMatcher, you can set - // only one of pathRules or routeRules. - RouteRules []*HttpRouteRule `json:"routeRules,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "DefaultCustomErrorResponsePolicy") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "DefaultCustomErrorResponsePolicy") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PathMatcher) MarshalJSON() ([]byte, error) { - type NoMethod PathMatcher +func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod OperationAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PathRule: A path-matching rule for a URL. If matched, will use the -// specified BackendService to handle the traffic arriving at this URL. -type PathRule struct { - // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how - // the Load Balancer returns error responses when BackendServiceor - // BackendBucket responds with an error. If a policy for an error code - // is not configured for the PathRule, a policy for the error code - // configured in pathMatcher.defaultCustomErrorResponsePolicy is - // applied. If one is not specified in - // pathMatcher.defaultCustomErrorResponsePolicy, the policy configured - // in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, - // consider a UrlMap with the following configuration: - - // UrlMap.defaultCustomErrorResponsePolicy are configured with policies - // for 5xx and 4xx errors - A PathRule for /coming_soon/ is configured - // for the error code 404. If the request is for www.myotherdomain.com - // and a 404 is encountered, the policy under - // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 - // response is encountered for the request - // www.example.com/current_events/, the pathMatcher's policy takes - // effect. If however, the request for www.example.com/coming_soon/ - // encounters a 404, the policy in PathRule.customErrorResponsePolicy - // takes effect. If any of the requests in this example encounter a 500 - // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy - // takes effect. customErrorResponsePolicy is supported only for Global - // External HTTP(S) load balancing. - CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` - - // Paths: The list of path patterns to match. Each must start with / and - // the only place a * is allowed is at the end following a /. The string - // fed to the path matcher does not include any text after the first ? - // or #, and those chars are not allowed here. - Paths []string `json:"paths,omitempty"` - - // RouteAction: In response to a matching path, the load balancer - // performs advanced routing actions, such as URL rewrites and header - // transformations, before forwarding the request to the selected - // backend. If routeAction specifies any weightedBackendServices, - // service must not be set. Conversely if service is set, routeAction - // cannot contain any weightedBackendServices. Only one of routeAction - // or urlRedirect must be set. URL maps for Classic external HTTP(S) - // load balancers only support the urlRewrite action within a path - // rule's routeAction. - RouteAction *HttpRouteAction `json:"routeAction,omitempty"` +// OperationAggregatedListWarning: [Output Only] Informational warning +// message. +type OperationAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // Service: The full or partial URL of the backend service resource to - // which traffic is directed if this rule is matched. If routeAction is - // also specified, advanced routing actions, such as URL rewrites, take - // effect before sending the request to the backend. However, if service - // is specified, routeAction cannot contain any weightedBackendServices. - // Conversely, if routeAction specifies any weightedBackendServices, - // service must not be specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. - Service string `json:"service,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*OperationAggregatedListWarningData `json:"data,omitempty"` - // UrlRedirect: When a path pattern is matched, the request is - // redirected to a URL specified by urlRedirect. If urlRedirect is - // specified, service or routeAction must not be set. Not supported when - // the URL map is bound to a target gRPC proxy. - UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CustomErrorResponsePolicy") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "CustomErrorResponsePolicy") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an 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. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PathRule) MarshalJSON() ([]byte, error) { - type NoMethod PathRule +func (s *OperationAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod OperationAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PerInstanceConfig struct { - // Fingerprint: Fingerprint of this per-instance config. This field can - // be used in optimistic locking. It is ignored when inserting a - // per-instance config. An up-to-date fingerprint must be provided in - // order to update an existing per-instance configuration or the field - // needs to be unset. - Fingerprint string `json:"fingerprint,omitempty"` - - // Name: The name of a per-instance configuration and its corresponding - // instance. Serves as a merge key during UpdatePerInstanceConfigs - // operations, that is, if a per-instance configuration with the same - // name exists then it will be updated, otherwise a new one will be - // created for the VM instance with the same name. An attempt to create - // a per-instance configconfiguration for a VM instance that either - // doesn't exist or is not part of the group will result in an error. - Name string `json:"name,omitempty"` - - // PreservedState: The intended preserved state for the given instance. - // Does not contain preserved state generated from a stateful policy. - PreservedState *PreservedState `json:"preservedState,omitempty"` +type OperationAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // Status: The status of applying this per-instance configuration on the - // corresponding managed instance. - // - // Possible values: - // "APPLYING" - The per-instance configuration is being applied to the - // instance, but is not yet effective, possibly waiting for the instance - // to, for example, REFRESH. - // "DELETING" - The per-instance configuration deletion is being - // applied on the instance, possibly waiting for the instance to, for - // example, REFRESH. - // "EFFECTIVE" - The per-instance configuration is effective on the - // instance, meaning that all disks, ips and metadata specified in this - // configuration are attached or set on the instance. - // "NONE" - *[Default]* The default status, when no per-instance - // configuration exists. - // "UNAPPLIED" - The per-instance configuration is set on an instance - // but not been applied yet. - // "UNAPPLIED_DELETION" - The per-instance configuration has been - // deleted, but the deletion is not yet applied. - Status string `json:"status,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -36860,112 +36631,53 @@ type PerInstanceConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod PerInstanceConfig +func (s *OperationAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod OperationAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Policy: An Identity and Access Management (IAM) policy, which -// specifies access controls for Google Cloud resources. A `Policy` is a -// collection of `bindings`. A `binding` binds one or more `members`, or -// principals, to a single `role`. Principals can be user accounts, -// service accounts, Google groups, and domains (such as G Suite). A -// `role` is a named list of permissions; each `role` can be an IAM -// predefined role or a user-created custom role. For some types of -// Google Cloud resources, a `binding` can also specify a `condition`, -// which is a logical expression that allows access to a resource only -// if the expression evaluates to `true`. A condition can add -// constraints based on attributes of the request, the resource, or -// both. To learn which resources support conditions in their IAM -// policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", -// "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { -// "role": "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - -// serviceAccount:my-project-id@appspot.gserviceaccount.com role: -// roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access -// after Sep 2020 expression: request.time < -// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` +// OperationList: Contains a list of Operation resources. +type OperationList struct { + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` - // Bindings: Associates a list of `members`, or principals, with a - // `role`. Optionally, may specify a `condition` that determines how and - // when the `bindings` are applied. Each of the `bindings` must contain - // at least one principal. The `bindings` in a `Policy` can refer to up - // to 1,500 principals; up to 250 of these principals can be Google - // groups. Each occurrence of a principal counts towards these limits. - // For example, if the `bindings` grant 50 different roles to - // `user:alice@example.com`, and not to any other principal, then you - // can add another 1,450 principals to the `bindings` in the `Policy`. - Bindings []*Binding `json:"bindings,omitempty"` + // Items: [Output Only] A list of Operation resources. + Items []*Operation `json:"items,omitempty"` - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. **Important:** If you use IAM - // Conditions, you must include the `etag` field whenever you call - // `setIamPolicy`. If you omit this field, then IAM allows you to - // overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` + // Kind: [Output Only] Type of resource. Always `compute#operations` for + // Operations resource. + Kind string `json:"kind,omitempty"` - // Rules: This is deprecated and has no effect. Do not use. - Rules []*Rule `json:"rules,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than `maxResults`, use the `nextPageToken` as a value for the query + // parameter `pageToken` in the next list request. Subsequent list + // requests will have their own `nextPageToken` to continue paging + // through the results. + NextPageToken string `json:"nextPageToken,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, - // `1`, and `3`. Requests that specify an invalid value are rejected. - // Any operation that affects conditional role bindings must specify - // version `3`. This requirement applies to the following operations: * - // Getting a policy that includes a conditional role binding * Adding a - // conditional role binding to a policy * Changing a conditional role - // binding in a policy * Removing any role binding, with or without a - // condition, from a policy that includes conditions **Important:** If - // you use IAM Conditions, you must include the `etag` field whenever - // you call `setIamPolicy`. If you omit this field, then IAM allows you - // to overwrite a version `3` policy with a version `1` policy, and all - // of the conditions in the version `3` policy are lost. If a policy - // does not include any conditions, operations on that policy may - // specify any valid version or leave the field unset. To learn which - // resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *OperationListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -36973,27 +36685,97 @@ type Policy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy +func (s *OperationList) MarshalJSON() ([]byte, error) { + type NoMethod OperationList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PreconfiguredWafSet struct { - // ExpressionSets: List of entities that are currently supported for WAF - // rules. - ExpressionSets []*WafExpressionSet `json:"expressionSets,omitempty"` +// OperationListWarning: [Output Only] Informational warning message. +type OperationListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpressionSets") to + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*OperationListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -37001,40 +36783,36 @@ type PreconfiguredWafSet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpressionSets") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PreconfiguredWafSet) MarshalJSON() ([]byte, error) { - type NoMethod PreconfiguredWafSet +func (s *OperationListWarning) MarshalJSON() ([]byte, error) { + type NoMethod OperationListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PreservedState: Preserved state for a given instance. -type PreservedState struct { - // Disks: Preserved disks defined for this instance. This map is keyed - // with the device names of the disks. - Disks map[string]PreservedStatePreservedDisk `json:"disks,omitempty"` - - // ExternalIPs: Preserved external IPs defined for this instance. This - // map is keyed with the name of the network interface. - ExternalIPs map[string]PreservedStatePreservedNetworkIp `json:"externalIPs,omitempty"` - - // InternalIPs: Preserved internal IPs defined for this instance. This - // map is keyed with the name of the network interface. - InternalIPs map[string]PreservedStatePreservedNetworkIp `json:"internalIPs,omitempty"` +type OperationListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // Metadata: Preserved metadata defined for this instance. - Metadata map[string]string `json:"metadata,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -37042,7 +36820,7 @@ type PreservedState struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API + // NullFields is a list of field names (e.g. "Key") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -37051,42 +36829,22 @@ type PreservedState struct { NullFields []string `json:"-"` } -func (s *PreservedState) MarshalJSON() ([]byte, error) { - type NoMethod PreservedState +func (s *OperationListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod OperationListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PreservedStatePreservedDisk struct { - // AutoDelete: These stateful disks will never be deleted during - // autohealing, update, instance recreate operations. This flag is used - // to configure if the disk should be deleted after it is no longer used - // by the group, e.g. when the given instance or the whole MIG is - // deleted. Note: disks attached in READ_ONLY mode cannot be - // auto-deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - - // Mode: The mode in which to attach this disk, either READ_WRITE or - // READ_ONLY. If not specified, the default is to attach the disk in - // READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple VM - // instances can use a disk in READ_ONLY mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in READ_WRITE mode. - // Only one VM instance at a time can be attached to a disk in - // READ_WRITE mode. - Mode string `json:"mode,omitempty"` +type OperationsScopedList struct { + // Operations: [Output Only] A list of operations contained in this + // scope. + Operations []*Operation `json:"operations,omitempty"` - // Source: The URL of the disk resource that is stateful and should be - // attached to the VM instance. - Source string `json:"source,omitempty"` + // Warning: [Output Only] Informational warning which replaces the list + // of operations when the list is empty. + Warning *OperationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // ForceSendFields is a list of field names (e.g. "Operations") 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 @@ -37094,7 +36852,7 @@ type PreservedStatePreservedDisk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in + // 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 @@ -37103,28 +36861,89 @@ type PreservedStatePreservedDisk struct { NullFields []string `json:"-"` } -func (s *PreservedStatePreservedDisk) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedDisk +func (s *OperationsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod OperationsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PreservedStatePreservedNetworkIp struct { - // AutoDelete: These stateful IPs will never be released during - // autohealing, update or VM instance recreate operations. This flag is - // used to configure if the IP reservation should be deleted after it is - // no longer used by the group, e.g. when the given instance or the - // whole group is deleted. +// OperationsScopedListWarning: [Output Only] Informational warning +// which replaces the list of operations when the list is empty. +type OperationsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. // // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // IpAddress: Ip address representation - IpAddress *PreservedStatePreservedNetworkIpIpAddress `json:"ipAddress,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*OperationsScopedListWarningData `json:"data,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -37132,8 +36951,8 @@ type PreservedStatePreservedNetworkIp struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -37141,21 +36960,27 @@ type PreservedStatePreservedNetworkIp struct { NullFields []string `json:"-"` } -func (s *PreservedStatePreservedNetworkIp) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedNetworkIp +func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod OperationsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PreservedStatePreservedNetworkIpIpAddress struct { - // Address: The URL of the reservation for this IP address. - Address string `json:"address,omitempty"` +type OperationsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // Literal: An IPv4 internal network address to assign to the instance - // for this network interface. - Literal string `json:"literal,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -37163,8 +36988,8 @@ type PreservedStatePreservedNetworkIpIpAddress struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -37172,127 +36997,26 @@ type PreservedStatePreservedNetworkIpIpAddress struct { NullFields []string `json:"-"` } -func (s *PreservedStatePreservedNetworkIpIpAddress) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedNetworkIpIpAddress +func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod OperationsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Project: Represents a Project resource. A project is used to organize -// resources in a Google Cloud Platform environment. For more -// information, read about the Resource Hierarchy. -type Project struct { - // CommonInstanceMetadata: Metadata key/value pairs available to all - // instances contained in this project. See Custom metadata for more - // information. - CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // DefaultNetworkTier: This signifies the default network tier used for - // configuring resources of the project and can only take the following - // values: PREMIUM, STANDARD. Initially the default network tier is - // PREMIUM. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for - // all networking products. - // "STANDARD" - Public internet quality, only limited support for - // other networking products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier - // for FIXED_STANDARD when fixed standard tier is expired or not - // configured. - DefaultNetworkTier string `json:"defaultNetworkTier,omitempty"` - - // DefaultServiceAccount: [Output Only] Default service account used by - // VMs running in this project. - DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` - - // Description: An optional textual description of the resource. - Description string `json:"description,omitempty"` - - // EnabledFeatures: Restricted features enabled for use on this project. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. This is *not* the project ID, - // and is just a unique ID used by Compute Engine to identify resources. - Id uint64 `json:"id,omitempty,string"` +type OrganizationSecurityPoliciesListAssociationsResponse struct { + // Associations: A list of associations. + Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#project for - // projects. + // Kind: [Output Only] Type of securityPolicy associations. Always + // compute#organizationSecurityPoliciesListAssociations for lists of + // securityPolicy associations. Kind string `json:"kind,omitempty"` - // Name: The project ID. For example: my-example-project. Use the - // project ID to make requests to Compute Engine. - Name string `json:"name,omitempty"` - - // Quotas: [Output Only] Quotas assigned to this project. - Quotas []*Quota `json:"quotas,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // UsageExportLocation: The naming prefix for daily usage reports and - // the Google Cloud Storage bucket where they are stored. - UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` - - // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs - // running in this project. - // - // Possible values: - // "GLOBAL_DEFAULT" - // "UNSPECIFIED_VM_DNS_SETTING" - // "ZONAL_DEFAULT" - // "ZONAL_ONLY" - VmDnsSetting string `json:"vmDnsSetting,omitempty"` - - // XpnProjectStatus: [Output Only] The role this project has in a shared - // VPC configuration. Currently, only projects with the host role, which - // is specified by the value HOST, are differentiated. - // - // Possible values: - // "HOST" - // "UNSPECIFIED_XPN_PROJECT_STATUS" - XpnProjectStatus string `json:"xpnProjectStatus,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "CommonInstanceMetadata") 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. "CommonInstanceMetadata") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Project) MarshalJSON() ([]byte, error) { - type NoMethod Project - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ProjectsDisableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "XpnResource") to + // ForceSendFields is a list of field names (e.g. "Associations") 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 @@ -37300,7 +37024,7 @@ type ProjectsDisableXpnResourceRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "XpnResource") to include + // NullFields is a list of field names (e.g. "Associations") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -37309,62 +37033,92 @@ type ProjectsDisableXpnResourceRequest struct { NullFields []string `json:"-"` } -func (s *ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsDisableXpnResourceRequest +func (s *OrganizationSecurityPoliciesListAssociationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod OrganizationSecurityPoliciesListAssociationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ProjectsEnableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` +// OutlierDetection: Settings controlling the eviction of unhealthy +// hosts from the load balancing pool for the backend service. +type OutlierDetection struct { + // BaseEjectionTime: The base time that a host is ejected for. The real + // ejection time is equal to the base ejection time multiplied by the + // number of times the host has been ejected. Defaults to 30000ms or + // 30s. + BaseEjectionTime *Duration `json:"baseEjectionTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "XpnResource") 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:"-"` + // ConsecutiveErrors: Number of errors before a host is ejected from the + // connection pool. When the backend host is accessed over HTTP, a 5xx + // return code qualifies as an error. Defaults to 5. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. + ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"` - // NullFields is a list of field names (e.g. "XpnResource") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // ConsecutiveGatewayFailure: The number of consecutive gateway failures + // (502, 503, 504 status or connection errors that are mapped to one of + // those status codes) before a consecutive gateway failure ejection + // occurs. Defaults to 3. Not supported when the backend service is + // referenced by a URL map that is bound to target gRPC proxy that has + // validateForProxyless field set to true. + ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` -func (s *ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsEnableXpnResourceRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // EnforcingConsecutiveErrors: The percentage chance that a host will be + // actually ejected when an outlier status is detected through + // consecutive 5xx. This setting can be used to disable ejection or to + // ramp it up slowly. Defaults to 0. Not supported when the backend + // service is referenced by a URL map that is bound to target gRPC proxy + // that has validateForProxyless field set to true. + EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` -type ProjectsGetXpnResources struct { - // Kind: [Output Only] Type of resource. Always - // compute#projectsGetXpnResources for lists of service resources (a.k.a - // service projects) - Kind string `json:"kind,omitempty"` + // EnforcingConsecutiveGatewayFailure: The percentage chance that a host + // will be actually ejected when an outlier status is detected through + // consecutive gateway failures. This setting can be used to disable + // ejection or to ramp it up slowly. Defaults to 100. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. + EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // EnforcingSuccessRate: The percentage chance that a host will be + // actually ejected when an outlier status is detected through success + // rate statistics. This setting can be used to disable ejection or to + // ramp it up slowly. Defaults to 100. + EnforcingSuccessRate int64 `json:"enforcingSuccessRate,omitempty"` - // Resources: Service resources (a.k.a service projects) attached to - // this project as their shared VPC host. - Resources []*XpnResourceId `json:"resources,omitempty"` + // Interval: Time interval between ejection analysis sweeps. This can + // result in both new ejections as well as hosts being returned to + // service. Defaults to 1 second. + Interval *Duration `json:"interval,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // MaxEjectionPercent: Maximum percentage of hosts in the load balancing + // pool for the backend service that can be ejected. Defaults to 50%. + MaxEjectionPercent int64 `json:"maxEjectionPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // SuccessRateMinimumHosts: The number of hosts in a cluster that must + // have enough request volume to detect success rate outliers. If the + // number of hosts is less than this setting, outlier detection via + // success rate statistics is not performed for any host in the cluster. + // Defaults to 5. + SuccessRateMinimumHosts int64 `json:"successRateMinimumHosts,omitempty"` + + // SuccessRateRequestVolume: The minimum number of total requests that + // must be collected in one interval (as defined by the interval + // duration above) to include this host in success rate based outlier + // detection. If the volume is lower than this setting, outlier + // detection via success rate statistics is not performed for that host. + // Defaults to 100. + SuccessRateRequestVolume int64 `json:"successRateRequestVolume,omitempty"` + + // SuccessRateStdevFactor: This factor is used to determine the ejection + // threshold for success rate outlier ejection. The ejection threshold + // is the difference between the mean success rate, and the product of + // this factor and the standard deviation of the mean success rate: mean + // - (stdev * success_rate_stdev_factor). This factor is divided by a + // thousand to get a double. That is, if the desired factor is 1.9, the + // runtime value should be 1900. Defaults to 1900. + SuccessRateStdevFactor int64 `json:"successRateStdevFactor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BaseEjectionTime") 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 @@ -37372,65 +37126,59 @@ type ProjectsGetXpnResources struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BaseEjectionTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsGetXpnResources +func (s *OutlierDetection) MarshalJSON() ([]byte, error) { + type NoMethod OutlierDetection raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ProjectsListXpnHostsRequest struct { - // Organization: Optional organization ID managed by Cloud Resource - // Manager, for which to list shared VPC host projects. If not - // specified, the organization will be inferred from the project. - Organization string `json:"organization,omitempty"` +// PacketIntervals: Next free: 7 +type PacketIntervals struct { + // AvgMs: Average observed inter-packet interval in milliseconds. + AvgMs int64 `json:"avgMs,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Organization") 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:"-"` + // Duration: From how long ago in the past these intervals were + // observed. + // + // Possible values: + // "DURATION_UNSPECIFIED" + // "HOUR" + // "MAX" - From BfdSession object creation time. + // "MINUTE" + Duration string `json:"duration,omitempty"` - // NullFields is a list of field names (e.g. "Organization") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // MaxMs: Maximum observed inter-packet interval in milliseconds. + MaxMs int64 `json:"maxMs,omitempty,string"` -func (s *ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsListXpnHostsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // MinMs: Minimum observed inter-packet interval in milliseconds. + MinMs int64 `json:"minMs,omitempty,string"` -type ProjectsSetDefaultNetworkTierRequest struct { - // NetworkTier: Default network tier to be set. + // NumIntervals: Number of inter-packet intervals from which these + // statistics were derived. + NumIntervals int64 `json:"numIntervals,omitempty,string"` + + // Type: The type of packets for which inter-packet intervals were + // computed. // // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for - // all networking products. - // "STANDARD" - Public internet quality, only limited support for - // other networking products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier - // for FIXED_STANDARD when fixed standard tier is expired or not - // configured. - NetworkTier string `json:"networkTier,omitempty"` + // "LOOPBACK" - Only applies to Echo packets. This shows the intervals + // between sending and receiving the same packet. + // "RECEIVE" - Intervals between received packets. + // "TRANSMIT" - Intervals between transmitted packets. + // "TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkTier") to + // ForceSendFields is a list of field names (e.g. "AvgMs") 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 @@ -37438,26 +37186,34 @@ type ProjectsSetDefaultNetworkTierRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkTier") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AvgMs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ProjectsSetDefaultNetworkTierRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetDefaultNetworkTierRequest +func (s *PacketIntervals) MarshalJSON() ([]byte, error) { + type NoMethod PacketIntervals raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicAdvertisedPrefix: A public advertised prefix represents an -// aggregated IP prefix or netblock which customers bring to cloud. The -// IP prefix is a single unit of route advertisement and is announced -// globally to the internet. -type PublicAdvertisedPrefix struct { +// PacketMirroring: Represents a Packet Mirroring resource. Packet +// Mirroring clones the traffic of specified instances in your Virtual +// Private Cloud (VPC) network and forwards it to a collector +// destination, such as an instance group of an internal TCP/UDP load +// balancer, for analysis or examination. For more information about +// setting up Packet Mirroring, see Using Packet Mirroring. +type PacketMirroring struct { + // CollectorIlb: The Forwarding Rule resource of type + // loadBalancingScheme=INTERNAL that will be used as collector for + // mirrored traffic. The specified forwarding rule must have + // isMirroringCollector set to true. + CollectorIlb *PacketMirroringForwardingRuleInfo `json:"collectorIlb,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -37466,32 +37222,34 @@ type PublicAdvertisedPrefix struct { // property when you create the resource. Description string `json:"description,omitempty"` - // DnsVerificationIp: The IPv4 address to be used for reverse DNS - // verification. - DnsVerificationIp string `json:"dnsVerificationIp,omitempty"` + // Enable: Indicates whether or not this packet mirroring takes effect. + // If set to FALSE, this packet mirroring policy will not be enforced on + // the network. The default is TRUE. + // + // Possible values: + // "FALSE" + // "TRUE" + Enable string `json:"enable,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a new PublicAdvertisedPrefix. An - // up-to-date fingerprint must be provided in order to update the - // PublicAdvertisedPrefix, otherwise the request will fail with error - // 412 conditionNotMet. To see the latest fingerprint, make a get() - // request to retrieve a PublicAdvertisedPrefix. - Fingerprint string `json:"fingerprint,omitempty"` + // Filter: Filter for mirrored traffic. If unspecified, all traffic is + // mirrored. + Filter *PacketMirroringFilter `json:"filter,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server generates this identifier. + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // IpCidrRange: The IPv4 address range, in CIDR format, represented by - // this public advertised prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Kind: [Output Only] Type of the resource. Always - // compute#publicAdvertisedPrefix for public advertised prefixes. + // compute#packetMirroring for packet mirrorings. Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource + // MirroredResources: PacketMirroring mirroredResourceInfos. + // MirroredResourceInfo specifies a set of mirrored VM instances, + // subnetworks and/or tags for which traffic from/to all VM instances + // will be mirrored. + MirroredResources *PacketMirroringMirroredResourceInfo `json:"mirroredResources,omitempty"` + + // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means @@ -37500,75 +37258,63 @@ type PublicAdvertisedPrefix struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // PublicDelegatedPrefixs: [Output Only] The list of public delegated - // prefixes that exist for this public advertised prefix. - PublicDelegatedPrefixs []*PublicAdvertisedPrefixPublicDelegatedPrefix `json:"publicDelegatedPrefixs,omitempty"` + // Network: Specifies the mirrored VPC network. Only packets in this + // network will be mirrored. All mirrored VMs should have a NIC in the + // given network. All mirrored subnetworks should belong to the given + // network. + Network *PacketMirroringNetworkInfo `json:"network,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // Priority: The priority of applying this configuration. Priority is + // used to break ties in cases where there is more than one matching + // rule. In the case of two rules that apply for a given Instance, the + // one with the lowest-numbered priority value wins. Default value is + // 1000. Valid range is 0 through 65535. + Priority int64 `json:"priority,omitempty"` - // SharedSecret: [Output Only] The shared secret to be used for reverse - // DNS verification. - SharedSecret string `json:"sharedSecret,omitempty"` + // Region: [Output Only] URI of the region where the packetMirroring + // resides. + Region string `json:"region,omitempty"` - // Status: The status of the public advertised prefix. Possible values - // include: - `INITIAL`: RPKI validation is complete. - - // `PTR_CONFIGURED`: User has configured the PTR. - `VALIDATED`: Reverse - // DNS lookup is successful. - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS - // lookup failed. - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is - // being configured. - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is - // fully configured. - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being - // removed. - // - // Possible values: - // "INITIAL" - RPKI validation is complete. - // "PREFIX_CONFIGURATION_COMPLETE" - The prefix is fully configured. - // "PREFIX_CONFIGURATION_IN_PROGRESS" - The prefix is being - // configured. - // "PREFIX_REMOVAL_IN_PROGRESS" - The prefix is being removed. - // "PTR_CONFIGURED" - User has configured the PTR. - // "REVERSE_DNS_LOOKUP_FAILED" - Reverse DNS lookup failed. - // "VALIDATED" - Reverse DNS lookup is successful. - Status string `json:"status,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CollectorIlb") 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CollectorIlb") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PublicAdvertisedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefix +func (s *PacketMirroring) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroring raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicAdvertisedPrefixList struct { +// PacketMirroringAggregatedList: Contains a list of packetMirrorings. +type PacketMirroringAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of PublicAdvertisedPrefix resources. - Items []*PublicAdvertisedPrefix `json:"items,omitempty"` + // Items: A list of PacketMirroring resources. + Items map[string]PacketMirroringsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always - // compute#publicAdvertisedPrefix for public advertised prefixes. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -37582,8 +37328,11 @@ type PublicAdvertisedPrefixList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *PublicAdvertisedPrefixListWarning `json:"warning,omitempty"` + Warning *PacketMirroringAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -37606,15 +37355,15 @@ type PublicAdvertisedPrefixList struct { NullFields []string `json:"-"` } -func (s *PublicAdvertisedPrefixList) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixList +func (s *PacketMirroringAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicAdvertisedPrefixListWarning: [Output Only] Informational +// PacketMirroringAggregatedListWarning: [Output Only] Informational // warning message. -type PublicAdvertisedPrefixListWarning struct { +type PacketMirroringAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -37682,7 +37431,7 @@ type PublicAdvertisedPrefixListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*PublicAdvertisedPrefixListWarningData `json:"data,omitempty"` + Data []*PacketMirroringAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -37705,13 +37454,13 @@ type PublicAdvertisedPrefixListWarning struct { NullFields []string `json:"-"` } -func (s *PublicAdvertisedPrefixListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixListWarning +func (s *PacketMirroringAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicAdvertisedPrefixListWarningData struct { +type PacketMirroringAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -37742,35 +37491,36 @@ type PublicAdvertisedPrefixListWarningData struct { NullFields []string `json:"-"` } -func (s *PublicAdvertisedPrefixListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixListWarningData +func (s *PacketMirroringAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicAdvertisedPrefixPublicDelegatedPrefix: Represents a CIDR range -// which can be used to assign addresses. -type PublicAdvertisedPrefixPublicDelegatedPrefix struct { - // IpRange: The IP address range of the public delegated prefix - IpRange string `json:"ipRange,omitempty"` - - // Name: The name of the public delegated prefix - Name string `json:"name,omitempty"` - - // Project: The project number of the public delegated prefix - Project string `json:"project,omitempty"` +type PacketMirroringFilter struct { + // IPProtocols: Protocols that apply as filter on mirrored traffic. If + // no protocols are specified, all traffic that matches the specified + // CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is + // specified, all traffic is mirrored. + IPProtocols []string `json:"IPProtocols,omitempty"` - // Region: The region of the public delegated prefix if it is regional. - // If absent, the prefix is global. - Region string `json:"region,omitempty"` + // CidrRanges: IP CIDR ranges that apply as filter on the source + // (ingress) or destination (egress) IP in the IP header. Only IPv4 is + // supported. If no ranges are specified, all traffic that matches the + // specified IPProtocols is mirrored. If neither cidrRanges nor + // IPProtocols is specified, all traffic is mirrored. + CidrRanges []string `json:"cidrRanges,omitempty"` - // Status: The status of the public delegated prefix. Possible values - // are: INITIALIZING: The public delegated prefix is being initialized - // and addresses cannot be created yet. ANNOUNCED: The public delegated - // prefix is active. - Status string `json:"status,omitempty"` + // Direction: Direction of traffic to mirror, either INGRESS, EGRESS, or + // BOTH. The default is BOTH. + // + // Possible values: + // "BOTH" - Default, both directions are mirrored. + // "EGRESS" - Only egress traffic is mirrored. + // "INGRESS" - Only ingress traffic is mirrored. + Direction string `json:"direction,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpRange") to + // ForceSendFields is a list of field names (e.g. "IPProtocols") 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 @@ -37778,142 +37528,64 @@ type PublicAdvertisedPrefixPublicDelegatedPrefix struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpRange") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "IPProtocols") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PublicAdvertisedPrefixPublicDelegatedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixPublicDelegatedPrefix +func (s *PacketMirroringFilter) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicDelegatedPrefix: A PublicDelegatedPrefix resource represents an -// IP block within a PublicAdvertisedPrefix that is configured within a -// single cloud scope (global or region). IPs in the block can be -// allocated to resources within that scope. Public delegated prefixes -// may be further broken up into smaller IP blocks in the same scope as -// the parent block. -type PublicDelegatedPrefix struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a new PublicDelegatedPrefix. An - // up-to-date fingerprint must be provided in order to update the - // PublicDelegatedPrefix, otherwise the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve a PublicDelegatedPrefix. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The unique identifier for the resource type. The - // server generates this identifier. - Id uint64 `json:"id,omitempty,string"` - - // IpCidrRange: The IPv4 address range, in CIDR format, represented by - // this public delegated prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // IsLiveMigration: If true, the prefix will be live migrated. - IsLiveMigration bool `json:"isLiveMigration,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#publicDelegatedPrefix for public delegated prefixes. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ParentPrefix: The URL of parent prefix. Either PublicAdvertisedPrefix - // or PublicDelegatedPrefix. - ParentPrefix string `json:"parentPrefix,omitempty"` - - // PublicDelegatedSubPrefixs: The list of sub public delegated prefixes - // that exist for this public delegated prefix. - PublicDelegatedSubPrefixs []*PublicDelegatedPrefixPublicDelegatedSubPrefix `json:"publicDelegatedSubPrefixs,omitempty"` - - // Region: [Output Only] URL of the region where the public delegated - // prefix resides. This field applies only to the region resource. You - // must specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the public delegated prefix, - // which can be one of following values: - `INITIALIZING` The public - // delegated prefix is being initialized and addresses cannot be created - // yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live - // migration prefix and is active. - `ANNOUNCED` The public delegated - // prefix is active. - `DELETING` The public delegated prefix is being - // deprovsioned. - // - // Possible values: - // "ANNOUNCED" - The public delegated prefix is active. - // "DELETING" - The public delegated prefix is being deprovsioned. - // "INITIALIZING" - The public delegated prefix is being initialized - // and addresses cannot be created yet. - // "READY_TO_ANNOUNCE" - The public delegated prefix is currently - // withdrawn but ready to be announced. - Status string `json:"status,omitempty"` +type PacketMirroringForwardingRuleInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the forwarding + // rule; defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Url: Resource URL to the forwarding rule representing the ILB + // configured as destination of the mirrored traffic. + Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefix +func (s *PacketMirroringForwardingRuleInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringForwardingRuleInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicDelegatedPrefixAggregatedList struct { +// PacketMirroringList: Contains a list of PacketMirroring resources. +type PacketMirroringList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of PublicDelegatedPrefixesScopedList resources. - Items map[string]PublicDelegatedPrefixesScopedList `json:"items,omitempty"` + // Items: A list of PacketMirroring resources. + Items []*PacketMirroring `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always - // compute#publicDelegatedPrefixAggregatedList for aggregated lists of - // public delegated prefixes. + // Kind: [Output Only] Type of resource. Always compute#packetMirroring + // for packetMirrorings. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -37927,11 +37599,8 @@ type PublicDelegatedPrefixAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicDelegatedPrefixAggregatedListWarning `json:"warning,omitempty"` + Warning *PacketMirroringListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -37954,15 +37623,15 @@ type PublicDelegatedPrefixAggregatedList struct { NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedList +func (s *PacketMirroringList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicDelegatedPrefixAggregatedListWarning: [Output Only] -// Informational warning message. -type PublicDelegatedPrefixAggregatedListWarning struct { +// PacketMirroringListWarning: [Output Only] Informational warning +// message. +type PacketMirroringListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -38030,7 +37699,7 @@ type PublicDelegatedPrefixAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*PublicDelegatedPrefixAggregatedListWarningData `json:"data,omitempty"` + Data []*PacketMirroringListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -38053,13 +37722,13 @@ type PublicDelegatedPrefixAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedListWarning +func (s *PacketMirroringListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicDelegatedPrefixAggregatedListWarningData struct { +type PacketMirroringListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -38090,43 +37759,31 @@ type PublicDelegatedPrefixAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedListWarningData +func (s *PacketMirroringListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicDelegatedPrefixList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of PublicDelegatedPrefix resources. - Items []*PublicDelegatedPrefix `json:"items,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#publicDelegatedPrefixList for public delegated prefixes. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` +type PacketMirroringMirroredResourceInfo struct { + // Instances: A set of virtual machine instances that are being + // mirrored. They must live in zones contained in the same region as + // this packetMirroring. Note that this config will apply only to those + // network interfaces of the Instances that belong to the network + // specified in this packetMirroring. You may specify a maximum of 50 + // Instances. + Instances []*PacketMirroringMirroredResourceInfoInstanceInfo `json:"instances,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicDelegatedPrefixListWarning `json:"warning,omitempty"` + // Subnetworks: A set of subnetworks for which traffic from/to all VM + // instances will be mirrored. They must live in the same region as this + // packetMirroring. You may specify a maximum of 5 subnetworks. + Subnetworks []*PacketMirroringMirroredResourceInfoSubnetInfo `json:"subnetworks,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Tags: A set of mirrored tags. Traffic from/to all VM instances that + // have one or more of these tags will be mirrored. + Tags []string `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Instances") 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 @@ -38134,8 +37791,8 @@ type PublicDelegatedPrefixList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -38143,89 +37800,22 @@ type PublicDelegatedPrefixList struct { NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixList +func (s *PacketMirroringMirroredResourceInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicDelegatedPrefixListWarning: [Output Only] Informational warning -// message. -type PublicDelegatedPrefixListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*PublicDelegatedPrefixListWarningData `json:"data,omitempty"` +type PacketMirroringMirroredResourceInfoInstanceInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the instance; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // Url: Resource URL to the virtual machine instance which is being + // mirrored. + Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") 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 @@ -38233,36 +37823,31 @@ type PublicDelegatedPrefixListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixListWarning +func (s *PacketMirroringMirroredResourceInfoInstanceInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfoInstanceInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicDelegatedPrefixListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type PacketMirroringMirroredResourceInfoSubnetInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the subnetwork; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // Url: Resource URL to the subnetwork for which traffic from/to all VM + // instances will be mirrored. + Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") 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 @@ -38270,55 +37855,30 @@ type PublicDelegatedPrefixListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixListWarningData +func (s *PacketMirroringMirroredResourceInfoSubnetInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfoSubnetInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicDelegatedPrefixPublicDelegatedSubPrefix: Represents a sub -// PublicDelegatedPrefix. -type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { - // DelegateeProject: Name of the project scoping this - // PublicDelegatedSubPrefix. - DelegateeProject string `json:"delegateeProject,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // IpCidrRange: The IPv4 address range, in CIDR format, represented by - // this sub public delegated prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // IsAddress: Whether the sub prefix is delegated to create Address - // resources in the delegatee project. - IsAddress bool `json:"isAddress,omitempty"` - - // Name: The name of the sub public delegated prefix. - Name string `json:"name,omitempty"` - - // Region: [Output Only] The region of the sub public delegated prefix - // if it is regional. If absent, the sub prefix is global. - Region string `json:"region,omitempty"` +type PacketMirroringNetworkInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the network; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Status: [Output Only] The status of the sub public delegated prefix. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - Status string `json:"status,omitempty"` + // Url: URL of the network resource. + Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "DelegateeProject") to + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") 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 @@ -38326,60 +37886,56 @@ type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DelegateeProject") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixPublicDelegatedSubPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixPublicDelegatedSubPrefix +func (s *PacketMirroringNetworkInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringNetworkInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicDelegatedPrefixesScopedList struct { - // PublicDelegatedPrefixes: [Output Only] A list of - // PublicDelegatedPrefixes contained in this scope. - PublicDelegatedPrefixes []*PublicDelegatedPrefix `json:"publicDelegatedPrefixes,omitempty"` +type PacketMirroringsScopedList struct { + // PacketMirrorings: A list of packetMirrorings contained in this scope. + PacketMirrorings []*PacketMirroring `json:"packetMirrorings,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of public delegated prefixes when the list is empty. - Warning *PublicDelegatedPrefixesScopedListWarning `json:"warning,omitempty"` + // Warning: Informational warning which replaces the list of + // packetMirrorings when the list is empty. + Warning *PacketMirroringsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "PublicDelegatedPrefixes") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "PacketMirrorings") 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. "PublicDelegatedPrefixes") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "PacketMirrorings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedList +func (s *PacketMirroringsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PublicDelegatedPrefixesScopedListWarning: [Output Only] Informational -// warning which replaces the list of public delegated prefixes when the -// list is empty. -type PublicDelegatedPrefixesScopedListWarning struct { +// PacketMirroringsScopedListWarning: Informational warning which +// replaces the list of packetMirrorings when the list is empty. +type PacketMirroringsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -38447,7 +38003,7 @@ type PublicDelegatedPrefixesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*PublicDelegatedPrefixesScopedListWarningData `json:"data,omitempty"` + Data []*PacketMirroringsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -38470,13 +38026,13 @@ type PublicDelegatedPrefixesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedListWarning +func (s *PacketMirroringsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PublicDelegatedPrefixesScopedListWarningData struct { +type PacketMirroringsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -38507,236 +38063,272 @@ type PublicDelegatedPrefixesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *PublicDelegatedPrefixesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedListWarningData +func (s *PacketMirroringsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Quota: A quotas entry. -type Quota struct { - // Limit: [Output Only] Quota limit for this metric. - Limit float64 `json:"limit,omitempty"` +// PathMatcher: A matcher for the path portion of the URL. The +// BackendService from the longest-matched rule will serve the URL. If +// no rule was matched, the default service is used. +type PathMatcher struct { + // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy + // specifies how the Load Balancer returns error responses when + // BackendServiceor BackendBucket responds with an error. This policy + // takes effect at the PathMatcher level and applies only when no policy + // has been defined for the error code at lower levels like RouteRule + // and PathRule within this PathMatcher. If an error code does not have + // a policy defined in defaultCustomErrorResponsePolicy, then a policy + // defined for the error code in UrlMap.defaultCustomErrorResponsePolicy + // takes effect. For example, consider a UrlMap with the following + // configuration: - UrlMap.defaultCustomErrorResponsePolicy is + // configured with policies for 5xx and 4xx errors - A RouteRule for + // /coming_soon/ is configured for the error code 404. If the request is + // for www.myotherdomain.com and a 404 is encountered, the policy under + // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 + // response is encountered for the request + // www.example.com/current_events/, the pathMatcher's policy takes + // effect. If however, the request for www.example.com/coming_soon/ + // encounters a 404, the policy in RouteRule.customErrorResponsePolicy + // takes effect. If any of the requests in this example encounter a 500 + // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy + // takes effect. When used in conjunction with + // pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. + // Only once all retries are exhausted, the + // defaultCustomErrorResponsePolicy is applied. While attempting a + // retry, if load balancer is successful in reaching the service, the + // defaultCustomErrorResponsePolicy is ignored and the response from the + // service is returned to the client. defaultCustomErrorResponsePolicy + // is supported only for Global External HTTP(S) load balancing. + DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` - // Metric: [Output Only] Name of the quota metric. - // - // Possible values: - // "A2_CPUS" - // "AFFINITY_GROUPS" - // "AUTOSCALERS" - // "BACKEND_BUCKETS" - // "BACKEND_SERVICES" - // "C2D_CPUS" - // "C2_CPUS" - // "C3_CPUS" - // "COMMITMENTS" - // "COMMITTED_A2_CPUS" - // "COMMITTED_C2D_CPUS" - // "COMMITTED_C2_CPUS" - // "COMMITTED_C3_CPUS" - // "COMMITTED_CPUS" - // "COMMITTED_E2_CPUS" - // "COMMITTED_LICENSES" - // "COMMITTED_LOCAL_SSD_TOTAL_GB" - // "COMMITTED_M3_CPUS" - // "COMMITTED_MEMORY_OPTIMIZED_CPUS" - // "COMMITTED_N2A_CPUS" - // "COMMITTED_N2D_CPUS" - // "COMMITTED_N2_CPUS" - // "COMMITTED_NVIDIA_A100_80GB_GPUS" - // "COMMITTED_NVIDIA_A100_GPUS" - // "COMMITTED_NVIDIA_K80_GPUS" - // "COMMITTED_NVIDIA_L4_GPUS" - // "COMMITTED_NVIDIA_P100_GPUS" - // "COMMITTED_NVIDIA_P4_GPUS" - // "COMMITTED_NVIDIA_T4_GPUS" - // "COMMITTED_NVIDIA_V100_GPUS" - // "COMMITTED_T2A_CPUS" - // "COMMITTED_T2D_CPUS" - // "CPUS" - Guest CPUs - // "CPUS_ALL_REGIONS" - // "DISKS_TOTAL_GB" - // "E2_CPUS" - // "EXTERNAL_MANAGED_FORWARDING_RULES" - // "EXTERNAL_NETWORK_LB_FORWARDING_RULES" - // "EXTERNAL_PROTOCOL_FORWARDING_RULES" - // "EXTERNAL_VPN_GATEWAYS" - // "FIREWALLS" - // "FORWARDING_RULES" - // "GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES" - // "GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES" - // "GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES" - // "GLOBAL_INTERNAL_ADDRESSES" - // "GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES" - // "GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES" - // "GPUS_ALL_REGIONS" - // "HEALTH_CHECKS" - // "IMAGES" - // "INSTANCES" - // "INSTANCE_GROUPS" - // "INSTANCE_GROUP_MANAGERS" - // "INSTANCE_TEMPLATES" - // "INTERCONNECTS" - // "INTERCONNECT_ATTACHMENTS_PER_REGION" - // "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS" - // "INTERCONNECT_TOTAL_GBPS" - // "INTERNAL_ADDRESSES" - // "INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES" - // "IN_PLACE_SNAPSHOTS" - // "IN_USE_ADDRESSES" - // "IN_USE_BACKUP_SCHEDULES" - // "IN_USE_SNAPSHOT_SCHEDULES" - // "LOCAL_SSD_TOTAL_GB" - // "M1_CPUS" - // "M2_CPUS" - // "M3_CPUS" - // "MACHINE_IMAGES" - // "N2A_CPUS" - // "N2D_CPUS" - // "N2_CPUS" - // "NETWORKS" - // "NETWORK_ATTACHMENTS" - // "NETWORK_ENDPOINT_GROUPS" - // "NETWORK_FIREWALL_POLICIES" - // "NET_LB_SECURITY_POLICIES_PER_REGION" - // "NET_LB_SECURITY_POLICY_RULES_PER_REGION" - // "NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION" - // "NODE_GROUPS" - // "NODE_TEMPLATES" - // "NVIDIA_A100_80GB_GPUS" - // "NVIDIA_A100_GPUS" - // "NVIDIA_K80_GPUS" - // "NVIDIA_L4_GPUS" - // "NVIDIA_P100_GPUS" - // "NVIDIA_P100_VWS_GPUS" - // "NVIDIA_P4_GPUS" - // "NVIDIA_P4_VWS_GPUS" - // "NVIDIA_T4_GPUS" - // "NVIDIA_T4_VWS_GPUS" - // "NVIDIA_V100_GPUS" - // "PACKET_MIRRORINGS" - // "PD_EXTREME_TOTAL_PROVISIONED_IOPS" - // "PREEMPTIBLE_CPUS" - // "PREEMPTIBLE_LOCAL_SSD_GB" - // "PREEMPTIBLE_NVIDIA_A100_80GB_GPUS" - // "PREEMPTIBLE_NVIDIA_A100_GPUS" - // "PREEMPTIBLE_NVIDIA_K80_GPUS" - // "PREEMPTIBLE_NVIDIA_L4_GPUS" - // "PREEMPTIBLE_NVIDIA_P100_GPUS" - // "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_P4_GPUS" - // "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_V100_GPUS" - // "PRIVATE_V6_ACCESS_SUBNETWORKS" - // "PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK" - // "PSC_INTERNAL_LB_FORWARDING_RULES" - // "PUBLIC_ADVERTISED_PREFIXES" - // "PUBLIC_DELEGATED_PREFIXES" - // "REGIONAL_AUTOSCALERS" - // "REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES" - // "REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES" - // "REGIONAL_INSTANCE_GROUP_MANAGERS" - // "REGIONAL_INTERNAL_LB_BACKEND_SERVICES" - // "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES" - // "RESERVATIONS" - // "RESOURCE_POLICIES" - // "ROUTERS" - // "ROUTES" - // "SECURITY_POLICIES" - // "SECURITY_POLICIES_PER_REGION" - // "SECURITY_POLICY_ADVANCED_RULES_PER_REGION" - // "SECURITY_POLICY_CEVAL_RULES" - // "SECURITY_POLICY_RULES" - // "SECURITY_POLICY_RULES_PER_REGION" - // "SERVICE_ATTACHMENTS" - // "SNAPSHOTS" - The total number of snapshots allowed for a single - // project. - // "SSD_TOTAL_GB" - // "SSL_CERTIFICATES" - // "STATIC_ADDRESSES" - // "STATIC_BYOIP_ADDRESSES" - // "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES" - // "SUBNETWORKS" - // "T2A_CPUS" - // "T2D_CPUS" - // "TARGET_HTTPS_PROXIES" - // "TARGET_HTTP_PROXIES" - // "TARGET_INSTANCES" - // "TARGET_POOLS" - // "TARGET_SSL_PROXIES" - // "TARGET_TCP_PROXIES" - // "TARGET_VPN_GATEWAYS" - // "URL_MAPS" - // "VPN_GATEWAYS" - // "VPN_TUNNELS" - // "XPN_SERVICE_PROJECTS" - Metric string `json:"metric,omitempty"` + // DefaultRouteAction: defaultRouteAction takes effect when none of the + // pathRules or routeRules match. The load balancer performs advanced + // routing actions, such as URL rewrites and header transformations, + // before forwarding the request to the selected backend. If + // defaultRouteAction specifies any weightedBackendServices, + // defaultService must not be set. Conversely if defaultService is set, + // defaultRouteAction cannot contain any weightedBackendServices. Only + // one of defaultRouteAction or defaultUrlRedirect must be set. URL maps + // for Classic external HTTP(S) load balancers only support the + // urlRewrite action within a path matcher's defaultRouteAction. + DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` - // Owner: [Output Only] Owning resource. This is the resource on which - // this quota is applied. - Owner string `json:"owner,omitempty"` + // DefaultService: The full or partial URL to the BackendService + // resource. This URL is used if none of the pathRules or routeRules + // defined by this PathMatcher are matched. For example, the following + // are all valid URLs to a BackendService resource: - + // https://www.googleapis.com/compute/v1/projects/project + // /global/backendServices/backendService - + // compute/v1/projects/project/global/backendServices/backendService - + // global/backendServices/backendService If defaultRouteAction is also + // specified, advanced routing actions, such as URL rewrites, take + // effect before sending the request to the backend. However, if + // defaultService is specified, defaultRouteAction cannot contain any + // weightedBackendServices. Conversely, if defaultRouteAction specifies + // any weightedBackendServices, defaultService must not be specified. + // Only one of defaultService, defaultUrlRedirect , or + // defaultRouteAction.weightedBackendService must be set. Authorization + // requires one or more of the following Google IAM permissions on the + // specified resource default_service: - compute.backendBuckets.use - + // compute.backendServices.use + DefaultService string `json:"defaultService,omitempty"` - // Usage: [Output Only] Current usage of this metric. - Usage float64 `json:"usage,omitempty"` + // DefaultUrlRedirect: When none of the specified pathRules or + // routeRules match, the request is redirected to a URL specified by + // defaultUrlRedirect. If defaultUrlRedirect is specified, + // defaultService or defaultRouteAction must not be set. Not supported + // when the URL map is bound to a target gRPC proxy. + DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "Limit") 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. + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // HeaderAction: Specifies changes to request and response headers that + // need to take effect for the selected backend service. HeaderAction + // specified here are applied after the matching HttpRouteRule + // HeaderAction and before the HeaderAction in the UrlMap HeaderAction + // is not supported for load balancers that have their + // loadBalancingScheme set to EXTERNAL. Not supported when the URL map + // is bound to a target gRPC proxy that has validateForProxyless field + // set to true. + HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + + // Name: The name to which this PathMatcher is referred by the HostRule. + Name string `json:"name,omitempty"` + + // PathRules: The list of path rules. Use this list instead of + // routeRules when routing based on simple path matching is all that's + // required. The order by which path rules are specified does not + // matter. Matches are always done on the longest-path-first basis. For + // example: a pathRule with a path /a/b/c/* will match before /a/b/* + // irrespective of the order in which those paths appear in this list. + // Within a given pathMatcher, only one of pathRules or routeRules must + // be set. + PathRules []*PathRule `json:"pathRules,omitempty"` + + // RouteRules: The list of HTTP route rules. Use this list instead of + // pathRules when advanced route matching and routing actions are + // desired. routeRules are evaluated in order of priority, from the + // lowest to highest number. Within a given pathMatcher, you can set + // only one of pathRules or routeRules. + RouteRules []*HttpRouteRule `json:"routeRules,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultCustomErrorResponsePolicy") 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. "Limit") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. + // "DefaultCustomErrorResponsePolicy") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Quota) MarshalJSON() ([]byte, error) { - type NoMethod Quota +func (s *PathMatcher) MarshalJSON() ([]byte, error) { + type NoMethod PathMatcher raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *Quota) UnmarshalJSON(data []byte) error { - type NoMethod Quota - var s1 struct { - Limit gensupport.JSONFloat64 `json:"limit"` - Usage gensupport.JSONFloat64 `json:"usage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Limit = float64(s1.Limit) - s.Usage = float64(s1.Usage) - return nil +// PathRule: A path-matching rule for a URL. If matched, will use the +// specified BackendService to handle the traffic arriving at this URL. +type PathRule struct { + // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how + // the Load Balancer returns error responses when BackendServiceor + // BackendBucket responds with an error. If a policy for an error code + // is not configured for the PathRule, a policy for the error code + // configured in pathMatcher.defaultCustomErrorResponsePolicy is + // applied. If one is not specified in + // pathMatcher.defaultCustomErrorResponsePolicy, the policy configured + // in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, + // consider a UrlMap with the following configuration: - + // UrlMap.defaultCustomErrorResponsePolicy are configured with policies + // for 5xx and 4xx errors - A PathRule for /coming_soon/ is configured + // for the error code 404. If the request is for www.myotherdomain.com + // and a 404 is encountered, the policy under + // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 + // response is encountered for the request + // www.example.com/current_events/, the pathMatcher's policy takes + // effect. If however, the request for www.example.com/coming_soon/ + // encounters a 404, the policy in PathRule.customErrorResponsePolicy + // takes effect. If any of the requests in this example encounter a 500 + // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy + // takes effect. customErrorResponsePolicy is supported only for Global + // External HTTP(S) load balancing. + CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` + + // Paths: The list of path patterns to match. Each must start with / and + // the only place a * is allowed is at the end following a /. The string + // fed to the path matcher does not include any text after the first ? + // or #, and those chars are not allowed here. + Paths []string `json:"paths,omitempty"` + + // RouteAction: In response to a matching path, the load balancer + // performs advanced routing actions, such as URL rewrites and header + // transformations, before forwarding the request to the selected + // backend. If routeAction specifies any weightedBackendServices, + // service must not be set. Conversely if service is set, routeAction + // cannot contain any weightedBackendServices. Only one of routeAction + // or urlRedirect must be set. URL maps for Classic external HTTP(S) + // load balancers only support the urlRewrite action within a path + // rule's routeAction. + RouteAction *HttpRouteAction `json:"routeAction,omitempty"` + + // Service: The full or partial URL of the backend service resource to + // which traffic is directed if this rule is matched. If routeAction is + // also specified, advanced routing actions, such as URL rewrites, take + // effect before sending the request to the backend. However, if service + // is specified, routeAction cannot contain any weightedBackendServices. + // Conversely, if routeAction specifies any weightedBackendServices, + // service must not be specified. Only one of urlRedirect, service or + // routeAction.weightedBackendService must be set. + Service string `json:"service,omitempty"` + + // UrlRedirect: When a path pattern is matched, the request is + // redirected to a URL specified by urlRedirect. If urlRedirect is + // specified, service or routeAction must not be set. Not supported when + // the URL map is bound to a target gRPC proxy. + UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CustomErrorResponsePolicy") 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. + // "CustomErrorResponsePolicy") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` } -// QuotaExceededInfo: Additional details for quota exceeded error for -// resource quota. -type QuotaExceededInfo struct { - // Dimensions: The map holding related quota dimensions. - Dimensions map[string]string `json:"dimensions,omitempty"` +func (s *PathRule) MarshalJSON() ([]byte, error) { + type NoMethod PathRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Limit: Current effective quota limit. The limit's unit depends on the - // quota type or metric. - Limit float64 `json:"limit,omitempty"` +type PerInstanceConfig struct { + // Fingerprint: Fingerprint of this per-instance config. This field can + // be used in optimistic locking. It is ignored when inserting a + // per-instance config. An up-to-date fingerprint must be provided in + // order to update an existing per-instance configuration or the field + // needs to be unset. + Fingerprint string `json:"fingerprint,omitempty"` - // LimitName: The name of the quota limit. - LimitName string `json:"limitName,omitempty"` + // Name: The name of a per-instance configuration and its corresponding + // instance. Serves as a merge key during UpdatePerInstanceConfigs + // operations, that is, if a per-instance configuration with the same + // name exists then it will be updated, otherwise a new one will be + // created for the VM instance with the same name. An attempt to create + // a per-instance configconfiguration for a VM instance that either + // doesn't exist or is not part of the group will result in an error. + Name string `json:"name,omitempty"` - // MetricName: The Compute Engine quota metric name. - MetricName string `json:"metricName,omitempty"` + // PreservedState: The intended preserved state for the given instance. + // Does not contain preserved state generated from a stateful policy. + PreservedState *PreservedState `json:"preservedState,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dimensions") to + // Status: The status of applying this per-instance configuration on the + // corresponding managed instance. + // + // Possible values: + // "APPLYING" - The per-instance configuration is being applied to the + // instance, but is not yet effective, possibly waiting for the instance + // to, for example, REFRESH. + // "DELETING" - The per-instance configuration deletion is being + // applied on the instance, possibly waiting for the instance to, for + // example, REFRESH. + // "EFFECTIVE" - The per-instance configuration is effective on the + // instance, meaning that all disks, ips and metadata specified in this + // configuration are attached or set on the instance. + // "NONE" - *[Default]* The default status, when no per-instance + // configuration exists. + // "UNAPPLIED" - The per-instance configuration is set on an instance + // but not been applied yet. + // "UNAPPLIED_DELETION" - The per-instance configuration has been + // deleted, but the deletion is not yet applied. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fingerprint") 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 @@ -38744,8 +38336,190 @@ type QuotaExceededInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dimensions") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod PerInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Rules: This is deprecated and has no effect. Do not use. + Rules []*Rule `json:"rules,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PreconfiguredWafSet struct { + // ExpressionSets: List of entities that are currently supported for WAF + // rules. + ExpressionSets []*WafExpressionSet `json:"expressionSets,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpressionSets") 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. "ExpressionSets") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PreconfiguredWafSet) MarshalJSON() ([]byte, error) { + type NoMethod PreconfiguredWafSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PreservedState: Preserved state for a given instance. +type PreservedState struct { + // Disks: Preserved disks defined for this instance. This map is keyed + // with the device names of the disks. + Disks map[string]PreservedStatePreservedDisk `json:"disks,omitempty"` + + // ExternalIPs: Preserved external IPs defined for this instance. This + // map is keyed with the name of the network interface. + ExternalIPs map[string]PreservedStatePreservedNetworkIp `json:"externalIPs,omitempty"` + + // InternalIPs: Preserved internal IPs defined for this instance. This + // map is keyed with the name of the network interface. + InternalIPs map[string]PreservedStatePreservedNetworkIp `json:"internalIPs,omitempty"` + + // Metadata: Preserved metadata defined for this instance. + Metadata map[string]string `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disks") 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. "Disks") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -38753,43 +38527,111 @@ type QuotaExceededInfo struct { NullFields []string `json:"-"` } -func (s *QuotaExceededInfo) MarshalJSON() ([]byte, error) { - type NoMethod QuotaExceededInfo +func (s *PreservedState) MarshalJSON() ([]byte, error) { + type NoMethod PreservedState raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *QuotaExceededInfo) UnmarshalJSON(data []byte) error { - type NoMethod QuotaExceededInfo - var s1 struct { - Limit gensupport.JSONFloat64 `json:"limit"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Limit = float64(s1.Limit) - return nil +type PreservedStatePreservedDisk struct { + // AutoDelete: These stateful disks will never be deleted during + // autohealing, update, instance recreate operations. This flag is used + // to configure if the disk should be deleted after it is no longer used + // by the group, e.g. when the given instance or the whole MIG is + // deleted. Note: disks attached in READ_ONLY mode cannot be + // auto-deleted. + // + // Possible values: + // "NEVER" + // "ON_PERMANENT_INSTANCE_DELETION" + AutoDelete string `json:"autoDelete,omitempty"` + + // Mode: The mode in which to attach this disk, either READ_WRITE or + // READ_ONLY. If not specified, the default is to attach the disk in + // READ_WRITE mode. + // + // Possible values: + // "READ_ONLY" - Attaches this disk in read-only mode. Multiple VM + // instances can use a disk in READ_ONLY mode at a time. + // "READ_WRITE" - *[Default]* Attaches this disk in READ_WRITE mode. + // Only one VM instance at a time can be attached to a disk in + // READ_WRITE mode. + Mode string `json:"mode,omitempty"` + + // Source: The URL of the disk resource that is stateful and should be + // attached to the VM instance. + Source string `json:"source,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoDelete") 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. "AutoDelete") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } -// Reference: Represents a reference to a resource. -type Reference struct { - // Kind: [Output Only] Type of the resource. Always compute#reference - // for references. - Kind string `json:"kind,omitempty"` +func (s *PreservedStatePreservedDisk) MarshalJSON() ([]byte, error) { + type NoMethod PreservedStatePreservedDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ReferenceType: A description of the reference type with no implied - // semantics. Possible values include: 1. MEMBER_OF - ReferenceType string `json:"referenceType,omitempty"` +type PreservedStatePreservedNetworkIp struct { + // AutoDelete: These stateful IPs will never be released during + // autohealing, update or VM instance recreate operations. This flag is + // used to configure if the IP reservation should be deleted after it is + // no longer used by the group, e.g. when the given instance or the + // whole group is deleted. + // + // Possible values: + // "NEVER" + // "ON_PERMANENT_INSTANCE_DELETION" + AutoDelete string `json:"autoDelete,omitempty"` - // Referrer: URL of the resource which refers to the target. - Referrer string `json:"referrer,omitempty"` + // IpAddress: Ip address representation + IpAddress *PreservedStatePreservedNetworkIpIpAddress `json:"ipAddress,omitempty"` - // Target: URL of the resource to which this reference points. - Target string `json:"target,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // NullFields is a list of field names (e.g. "AutoDelete") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PreservedStatePreservedNetworkIp) MarshalJSON() ([]byte, error) { + type NoMethod PreservedStatePreservedNetworkIp + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PreservedStatePreservedNetworkIpIpAddress struct { + // Address: The URL of the reservation for this IP address. + Address string `json:"address,omitempty"` + + // Literal: An IPv4 internal network address to assign to the instance + // for this network interface. + Literal string `json:"literal,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Address") 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 @@ -38797,8 +38639,8 @@ type Reference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -38806,102 +38648,127 @@ type Reference struct { NullFields []string `json:"-"` } -func (s *Reference) MarshalJSON() ([]byte, error) { - type NoMethod Reference +func (s *PreservedStatePreservedNetworkIpIpAddress) MarshalJSON() ([]byte, error) { + type NoMethod PreservedStatePreservedNetworkIpIpAddress raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Region: Represents a Region resource. A region is a geographical area -// where a resource is located. For more information, read Regions and -// Zones. -type Region struct { +// Project: Represents a Project resource. A project is used to organize +// resources in a Google Cloud Platform environment. For more +// information, read about the Resource Hierarchy. +type Project struct { + // CommonInstanceMetadata: Metadata key/value pairs available to all + // instances contained in this project. See Custom metadata for more + // information. + CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with - // this region. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + // DefaultNetworkTier: This signifies the default network tier used for + // configuring resources of the project and can only take the following + // values: PREMIUM, STANDARD. Initially the default network tier is + // PREMIUM. + // + // Possible values: + // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. + // "PREMIUM" - High quality, Google-grade network tier, support for + // all networking products. + // "STANDARD" - Public internet quality, only limited support for + // other networking products. + // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier + // for FIXED_STANDARD when fixed standard tier is expired or not + // configured. + DefaultNetworkTier string `json:"defaultNetworkTier,omitempty"` - // Description: [Output Only] Textual description of the resource. + // DefaultServiceAccount: [Output Only] Default service account used by + // VMs running in this project. + DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` + + // Description: An optional textual description of the resource. Description string `json:"description,omitempty"` + // EnabledFeatures: Restricted features enabled for use on this project. + EnabledFeatures []string `json:"enabledFeatures,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // identifier is defined by the server. This is *not* the project ID, + // and is just a unique ID used by Compute Engine to identify resources. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#region for - // regions. + // Kind: [Output Only] Type of the resource. Always compute#project for + // projects. Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. + // Name: The project ID. For example: my-example-project. Use the + // project ID to make requests to Compute Engine. Name string `json:"name,omitempty"` - // Quotas: [Output Only] Quotas assigned to this region. + // Quotas: [Output Only] Quotas assigned to this project. Quotas []*Quota `json:"quotas,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] Status of the region, either UP or DOWN. + // UsageExportLocation: The naming prefix for daily usage reports and + // the Google Cloud Storage bucket where they are stored. + UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` + + // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs + // running in this project. // // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` + // "GLOBAL_DEFAULT" + // "UNSPECIFIED_VM_DNS_SETTING" + // "ZONAL_DEFAULT" + // "ZONAL_ONLY" + VmDnsSetting string `json:"vmDnsSetting,omitempty"` - // Zones: [Output Only] A list of zones available in this region, in the - // form of resource URLs. - Zones []string `json:"zones,omitempty"` + // XpnProjectStatus: [Output Only] The role this project has in a shared + // VPC configuration. Currently, only projects with the host role, which + // is specified by the value HOST, are differentiated. + // + // Possible values: + // "HOST" + // "UNSPECIFIED_XPN_PROJECT_STATUS" + XpnProjectStatus string `json:"xpnProjectStatus,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "CommonInstanceMetadata") 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "CommonInstanceMetadata") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *Region) MarshalJSON() ([]byte, error) { - type NoMethod Region +func (s *Project) MarshalJSON() ([]byte, error) { + type NoMethod Project raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionAddressesMoveRequest struct { - // Description: An optional destination address description if intended - // to be different from the source. - Description string `json:"description,omitempty"` - - // DestinationAddress: The URL of the destination address to move to. - // This can be a full or partial URL. For example, the following are all - // valid URLs to a address: - - // https://www.googleapis.com/compute/v1/projects/project/regions/region - // /addresses/address - - // projects/project/regions/region/addresses/address Note that - // destination project must be different from the source project. So - // /regions/region/addresses/address is not valid partial url. - DestinationAddress string `json:"destinationAddress,omitempty"` +type ProjectsDisableXpnResourceRequest struct { + // XpnResource: Service resource (a.k.a service project) ID. + XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "XpnResource") 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 @@ -38909,7 +38776,7 @@ type RegionAddressesMoveRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include + // NullFields is a list of field names (e.g. "XpnResource") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -38918,22 +38785,43 @@ type RegionAddressesMoveRequest struct { NullFields []string `json:"-"` } -func (s *RegionAddressesMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionAddressesMoveRequest +func (s *ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProjectsDisableXpnResourceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionAutoscalerList: Contains a list of autoscalers. -type RegionAutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +type ProjectsEnableXpnResourceRequest struct { + // XpnResource: Service resource (a.k.a service project) ID. + XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` + // ForceSendFields is a list of field names (e.g. "XpnResource") 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:"-"` - // Kind: Type of resource. + // NullFields is a list of field names (e.g. "XpnResource") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProjectsEnableXpnResourceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ProjectsGetXpnResources struct { + // Kind: [Output Only] Type of resource. Always + // compute#projectsGetXpnResources for lists of service resources (a.k.a + // service projects) Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -38944,17 +38832,15 @@ type RegionAutoscalerList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *RegionAutoscalerListWarning `json:"warning,omitempty"` + // Resources: Service resources (a.k.a service projects) attached to + // this project as their shared VPC host. + Resources []*XpnResourceId `json:"resources,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Kind") 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 @@ -38962,7 +38848,7 @@ type RegionAutoscalerList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Kind") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -38971,89 +38857,19 @@ type RegionAutoscalerList struct { NullFields []string `json:"-"` } -func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerList +func (s *ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { + type NoMethod ProjectsGetXpnResources raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionAutoscalerListWarning: [Output Only] Informational warning -// message. -type RegionAutoscalerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*RegionAutoscalerListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` +type ProjectsListXpnHostsRequest struct { + // Organization: Optional organization ID managed by Cloud Resource + // Manager, for which to list shared VPC host projects. If not + // specified, the organization will be inferred from the project. + Organization string `json:"organization,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Organization") 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 @@ -39061,36 +38877,36 @@ type RegionAutoscalerListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Organization") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *RegionAutoscalerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerListWarning +func (s *ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProjectsListXpnHostsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionAutoscalerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` +type ProjectsSetDefaultNetworkTierRequest struct { + // NetworkTier: Default network tier to be set. + // + // Possible values: + // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. + // "PREMIUM" - High quality, Google-grade network tier, support for + // all networking products. + // "STANDARD" - Public internet quality, only limited support for + // other networking products. + // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier + // for FIXED_STANDARD when fixed standard tier is expired or not + // configured. + NetworkTier string `json:"networkTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "NetworkTier") 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 @@ -39098,59 +38914,137 @@ type RegionAutoscalerListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NetworkTier") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerListWarningData +func (s *ProjectsSetDefaultNetworkTierRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProjectsSetDefaultNetworkTierRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionCommitmentsUpdateReservationsRequest struct { - // Reservations: A list of two reservations to transfer GPUs and local - // SSD between. - Reservations []*Reservation `json:"reservations,omitempty"` +// PublicAdvertisedPrefix: A public advertised prefix represents an +// aggregated IP prefix or netblock which customers bring to cloud. The +// IP prefix is a single unit of route advertisement and is announced +// globally to the internet. +type PublicAdvertisedPrefix struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reservations") to - // unconditionally include in API requests. By default, fields with + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // DnsVerificationIp: The IPv4 address to be used for reverse DNS + // verification. + DnsVerificationIp string `json:"dnsVerificationIp,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a new PublicAdvertisedPrefix. An + // up-to-date fingerprint must be provided in order to update the + // PublicAdvertisedPrefix, otherwise the request will fail with error + // 412 conditionNotMet. To see the latest fingerprint, make a get() + // request to retrieve a PublicAdvertisedPrefix. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource type. The + // server generates this identifier. + Id uint64 `json:"id,omitempty,string"` + + // IpCidrRange: The IPv4 address range, in CIDR format, represented by + // this public advertised prefix. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#publicAdvertisedPrefix for public advertised prefixes. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // PublicDelegatedPrefixs: [Output Only] The list of public delegated + // prefixes that exist for this public advertised prefix. + PublicDelegatedPrefixs []*PublicAdvertisedPrefixPublicDelegatedPrefix `json:"publicDelegatedPrefixs,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SharedSecret: [Output Only] The shared secret to be used for reverse + // DNS verification. + SharedSecret string `json:"sharedSecret,omitempty"` + + // Status: The status of the public advertised prefix. Possible values + // include: - `INITIAL`: RPKI validation is complete. - + // `PTR_CONFIGURED`: User has configured the PTR. - `VALIDATED`: Reverse + // DNS lookup is successful. - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS + // lookup failed. - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is + // being configured. - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is + // fully configured. - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being + // removed. + // + // Possible values: + // "INITIAL" - RPKI validation is complete. + // "PREFIX_CONFIGURATION_COMPLETE" - The prefix is fully configured. + // "PREFIX_CONFIGURATION_IN_PROGRESS" - The prefix is being + // configured. + // "PREFIX_REMOVAL_IN_PROGRESS" - The prefix is being removed. + // "PTR_CONFIGURED" - User has configured the PTR. + // "REVERSE_DNS_LOOKUP_FAILED" - Reverse DNS lookup failed. + // "VALIDATED" - Reverse DNS lookup is successful. + Status string `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // 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. "Reservations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *RegionCommitmentsUpdateReservationsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionCommitmentsUpdateReservationsRequest +func (s *PublicAdvertisedPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefix raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionDiskTypeList struct { +type PublicAdvertisedPrefixList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` + // Items: A list of PublicAdvertisedPrefix resources. + Items []*PublicAdvertisedPrefix `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#regionDiskTypeList for region disk types. + // Kind: [Output Only] Type of the resource. Always + // compute#publicAdvertisedPrefix for public advertised prefixes. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -39165,7 +39059,7 @@ type RegionDiskTypeList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *RegionDiskTypeListWarning `json:"warning,omitempty"` + Warning *PublicAdvertisedPrefixListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -39188,15 +39082,15 @@ type RegionDiskTypeList struct { NullFields []string `json:"-"` } -func (s *RegionDiskTypeList) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeList +func (s *PublicAdvertisedPrefixList) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionDiskTypeListWarning: [Output Only] Informational warning -// message. -type RegionDiskTypeListWarning struct { +// PublicAdvertisedPrefixListWarning: [Output Only] Informational +// warning message. +type PublicAdvertisedPrefixListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -39264,7 +39158,7 @@ type RegionDiskTypeListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RegionDiskTypeListWarningData `json:"data,omitempty"` + Data []*PublicAdvertisedPrefixListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -39287,13 +39181,13 @@ type RegionDiskTypeListWarning struct { NullFields []string `json:"-"` } -func (s *RegionDiskTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeListWarning +func (s *PublicAdvertisedPrefixListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionDiskTypeListWarningData struct { +type PublicAdvertisedPrefixListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -39324,74 +39218,35 @@ type RegionDiskTypeListWarningData struct { NullFields []string `json:"-"` } -func (s *RegionDiskTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionDisksAddResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be added to this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") 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. "ResourcePolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionDisksAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksAddResourcePoliciesRequest +func (s *PublicAdvertisedPrefixListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionDisksRemoveResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be removed from this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` +// PublicAdvertisedPrefixPublicDelegatedPrefix: Represents a CIDR range +// which can be used to assign addresses. +type PublicAdvertisedPrefixPublicDelegatedPrefix struct { + // IpRange: The IP address range of the public delegated prefix + IpRange string `json:"ipRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") 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:"-"` + // Name: The name of the public delegated prefix + Name string `json:"name,omitempty"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // Project: The project number of the public delegated prefix + Project string `json:"project,omitempty"` -func (s *RegionDisksRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksRemoveResourcePoliciesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Region: The region of the public delegated prefix if it is regional. + // If absent, the prefix is global. + Region string `json:"region,omitempty"` -type RegionDisksResizeRequest struct { - // SizeGb: The new size of the regional persistent disk, which is - // specified in GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` + // Status: The status of the public delegated prefix. Possible values + // are: INITIALIZING: The public delegated prefix is being initialized + // and addresses cannot be created yet. ANNOUNCED: The public delegated + // prefix is active. + Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "SizeGb") to + // ForceSendFields is a list of field names (e.g. "IpRange") 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 @@ -39399,8 +39254,8 @@ type RegionDisksResizeRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "IpRange") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -39408,33 +39263,107 @@ type RegionDisksResizeRequest struct { NullFields []string `json:"-"` } -func (s *RegionDisksResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksResizeRequest +func (s *PublicAdvertisedPrefixPublicDelegatedPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixPublicDelegatedPrefix raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionDisksStartAsyncReplicationRequest struct { - // AsyncSecondaryDisk: The secondary disk to start asynchronous - // replication to. You can provide this as a partial or full URL to the - // resource. For example, the following are valid values: - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone - // /disks/disk - - // https://www.googleapis.com/compute/v1/projects/project/regions/region - // /disks/disk - projects/project/zones/zone/disks/disk - - // projects/project/regions/region/disks/disk - zones/zone/disks/disk - - // regions/region/disks/disk - AsyncSecondaryDisk string `json:"asyncSecondaryDisk,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AsyncSecondaryDisk") - // to unconditionally include in API requests. By default, fields with +// PublicDelegatedPrefix: A PublicDelegatedPrefix resource represents an +// IP block within a PublicAdvertisedPrefix that is configured within a +// single cloud scope (global or region). IPs in the block can be +// allocated to resources within that scope. Public delegated prefixes +// may be further broken up into smaller IP blocks in the same scope as +// the parent block. +type PublicDelegatedPrefix struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a new PublicDelegatedPrefix. An + // up-to-date fingerprint must be provided in order to update the + // PublicDelegatedPrefix, otherwise the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve a PublicDelegatedPrefix. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource type. The + // server generates this identifier. + Id uint64 `json:"id,omitempty,string"` + + // IpCidrRange: The IPv4 address range, in CIDR format, represented by + // this public delegated prefix. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // IsLiveMigration: If true, the prefix will be live migrated. + IsLiveMigration bool `json:"isLiveMigration,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#publicDelegatedPrefix for public delegated prefixes. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // ParentPrefix: The URL of parent prefix. Either PublicAdvertisedPrefix + // or PublicDelegatedPrefix. + ParentPrefix string `json:"parentPrefix,omitempty"` + + // PublicDelegatedSubPrefixs: The list of sub public delegated prefixes + // that exist for this public delegated prefix. + PublicDelegatedSubPrefixs []*PublicDelegatedPrefixPublicDelegatedSubPrefix `json:"publicDelegatedSubPrefixs,omitempty"` + + // Region: [Output Only] URL of the region where the public delegated + // prefix resides. This field applies only to the region resource. You + // must specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: [Output Only] The status of the public delegated prefix, + // which can be one of following values: - `INITIALIZING` The public + // delegated prefix is being initialized and addresses cannot be created + // yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live + // migration prefix and is active. - `ANNOUNCED` The public delegated + // prefix is active. - `DELETING` The public delegated prefix is being + // deprovsioned. + // + // Possible values: + // "ANNOUNCED" - The public delegated prefix is active. + // "DELETING" - The public delegated prefix is being deprovsioned. + // "INITIALIZING" - The public delegated prefix is being initialized + // and addresses cannot be created yet. + // "READY_TO_ANNOUNCE" - The public delegated prefix is currently + // withdrawn but ready to be announced. + Status string `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // 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. "AsyncSecondaryDisk") to + // NullFields is a list of field names (e.g. "CreationTimestamp") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -39444,22 +39373,23 @@ type RegionDisksStartAsyncReplicationRequest struct { NullFields []string `json:"-"` } -func (s *RegionDisksStartAsyncReplicationRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksStartAsyncReplicationRequest +func (s *PublicDelegatedPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefix raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionInstanceGroupList: Contains a list of InstanceGroup resources. -type RegionInstanceGroupList struct { +type PublicDelegatedPrefixAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` + // Items: A list of PublicDelegatedPrefixesScopedList resources. + Items map[string]PublicDelegatedPrefixesScopedList `json:"items,omitempty"` - // Kind: The resource type. + // Kind: [Output Only] Type of the resource. Always + // compute#publicDelegatedPrefixAggregatedList for aggregated lists of + // public delegated prefixes. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -39473,8 +39403,11 @@ type RegionInstanceGroupList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupListWarning `json:"warning,omitempty"` + Warning *PublicDelegatedPrefixAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -39497,15 +39430,15 @@ type RegionInstanceGroupList struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupList +func (s *PublicDelegatedPrefixAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionInstanceGroupListWarning: [Output Only] Informational warning -// message. -type RegionInstanceGroupListWarning struct { +// PublicDelegatedPrefixAggregatedListWarning: [Output Only] +// Informational warning message. +type PublicDelegatedPrefixAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -39573,7 +39506,7 @@ type RegionInstanceGroupListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RegionInstanceGroupListWarningData `json:"data,omitempty"` + Data []*PublicDelegatedPrefixAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -39596,13 +39529,13 @@ type RegionInstanceGroupListWarning struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupListWarning +func (s *PublicDelegatedPrefixAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupListWarningData struct { +type PublicDelegatedPrefixAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -39633,55 +39566,22 @@ type RegionInstanceGroupListWarningData struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerDeleteInstanceConfigReq: -// RegionInstanceGroupManagers.deletePerInstanceConfigs -type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { - // Names: The list of instance names for which we want to delete - // per-instance configs on this managed instance group. - Names []string `json:"names,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Names") 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. "Names") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagerDeleteInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerDeleteInstanceConfigReq +func (s *PublicDelegatedPrefixAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionInstanceGroupManagerList: Contains a list of managed instance -// groups. -type RegionInstanceGroupManagerList struct { +type PublicDelegatedPrefixList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` + // Items: A list of PublicDelegatedPrefix resources. + Items []*PublicDelegatedPrefix `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupManagerList for a list of managed instance - // groups that exist in th regional scope. + // Kind: [Output Only] Type of the resource. Always + // compute#publicDelegatedPrefixList for public delegated prefixes. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -39696,7 +39596,7 @@ type RegionInstanceGroupManagerList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagerListWarning `json:"warning,omitempty"` + Warning *PublicDelegatedPrefixListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -39719,15 +39619,15 @@ type RegionInstanceGroupManagerList struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerList +func (s *PublicDelegatedPrefixList) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionInstanceGroupManagerListWarning: [Output Only] Informational -// warning message. -type RegionInstanceGroupManagerListWarning struct { +// PublicDelegatedPrefixListWarning: [Output Only] Informational warning +// message. +type PublicDelegatedPrefixListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -39795,7 +39695,7 @@ type RegionInstanceGroupManagerListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RegionInstanceGroupManagerListWarningData `json:"data,omitempty"` + Data []*PublicDelegatedPrefixListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -39818,13 +39718,13 @@ type RegionInstanceGroupManagerListWarning struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerListWarning +func (s *PublicDelegatedPrefixListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagerListWarningData struct { +type PublicDelegatedPrefixListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -39855,59 +39755,54 @@ type RegionInstanceGroupManagerListWarningData struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerListWarningData +func (s *PublicDelegatedPrefixListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionInstanceGroupManagerPatchInstanceConfigReq: -// RegionInstanceGroupManagers.patchPerInstanceConfigs -type RegionInstanceGroupManagerPatchInstanceConfigReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert - // or patch on this managed instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` +// PublicDelegatedPrefixPublicDelegatedSubPrefix: Represents a sub +// PublicDelegatedPrefix. +type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { + // DelegateeProject: Name of the project scoping this + // PublicDelegatedSubPrefix. + DelegateeProject string `json:"delegateeProject,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") - // 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:"-"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // IpCidrRange: The IPv4 address range, in CIDR format, represented by + // this sub public delegated prefix. + IpCidrRange string `json:"ipCidrRange,omitempty"` -func (s *RegionInstanceGroupManagerPatchInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerPatchInstanceConfigReq - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // IsAddress: Whether the sub prefix is delegated to create Address + // resources in the delegatee project. + IsAddress bool `json:"isAddress,omitempty"` -// RegionInstanceGroupManagerUpdateInstanceConfigReq: -// RegionInstanceGroupManagers.updatePerInstanceConfigs -type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert - // or patch on this managed instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` + // Name: The name of the sub public delegated prefix. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") - // to unconditionally include in API requests. By default, fields with + // Region: [Output Only] The region of the sub public delegated prefix + // if it is regional. If absent, the sub prefix is global. + Region string `json:"region,omitempty"` + + // Status: [Output Only] The status of the sub public delegated prefix. + // + // Possible values: + // "ACTIVE" + // "INACTIVE" + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DelegateeProject") 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. "PerInstanceConfigs") to + // NullFields is a list of field names (e.g. "DelegateeProject") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -39917,264 +39812,50 @@ type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagerUpdateInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerUpdateInstanceConfigReq - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersAbandonInstancesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersApplyUpdatesRequest: -// RegionInstanceGroupManagers.applyUpdatesToInstances -type RegionInstanceGroupManagersApplyUpdatesRequest struct { - // AllInstances: Flag to update all instances instead of specified list - // of “instances”. If the flag is set to true then the instances may - // not be specified in the request. - AllInstances bool `json:"allInstances,omitempty"` - - // Instances: The list of URLs of one or more instances for which you - // want to apply updates. Each URL can be a full URL or a partial URL, - // such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // MinimalAction: The minimal action that you want to perform on each - // instance during the update: - REPLACE: At minimum, delete the - // instance and create it again. - RESTART: Stop the instance and start - // it again. - REFRESH: Do not stop the instance. - NONE: Do not disrupt - // the instance at all. By default, the minimum action is NONE. If your - // update requires a more disruptive action than you set with this flag, - // the necessary action is performed to execute the update. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Updates applied in runtime, instances will not be - // disrupted. - // "REPLACE" - Old instances will be deleted. New instances will be - // created from the target template. - // "RESTART" - Every instance will be restarted. - MinimalAction string `json:"minimalAction,omitempty"` - - // MostDisruptiveAllowedAction: The most disruptive action that you want - // to perform on each instance during the update: - REPLACE: Delete the - // instance and create it again. - RESTART: Stop the instance and start - // it again. - REFRESH: Do not stop the instance. - NONE: Do not disrupt - // the instance at all. By default, the most disruptive allowed action - // is REPLACE. If your update requires a more disruptive action than you - // set with this flag, the update request will fail. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Updates applied in runtime, instances will not be - // disrupted. - // "REPLACE" - Old instances will be deleted. New instances will be - // created from the target template. - // "RESTART" - Every instance will be restarted. - MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AllInstances") 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. "AllInstances") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersApplyUpdatesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersCreateInstancesRequest: -// RegionInstanceGroupManagers.createInstances -type RegionInstanceGroupManagersCreateInstancesRequest struct { - // Instances: [Required] List of specifications of per-instance configs. - Instances []*PerInstanceConfig `json:"instances,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") 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. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersCreateInstancesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - - // SkipInstancesOnValidationError: Specifies whether the request should - // proceed despite the inclusion of instances that are not members of - // the group or that are already in the process of being deleted or - // abandoned. If this field is set to `false` and such an instance is - // specified in the request, the operation fails. The operation always - // fails if the request contains a malformed instance URL or a reference - // to an instance that exists in a zone or region other than the group's - // zone or region. - SkipInstancesOnValidationError bool `json:"skipInstancesOnValidationError,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instances") 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. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersDeleteInstancesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListErrorsResponse struct { - // Items: [Output Only] The list of errors of the managed instance - // group. - Items []*InstanceManagedByIgmError `json:"items,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListErrorsResponse +func (s *PublicDelegatedPrefixPublicDelegatedSubPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixPublicDelegatedSubPrefix raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagersListInstanceConfigsResp struct { - // Items: [Output Only] The list of PerInstanceConfig. - Items []*PerInstanceConfig `json:"items,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagersListInstanceConfigsRespWarning `json:"warning,omitempty"` +type PublicDelegatedPrefixesScopedList struct { + // PublicDelegatedPrefixes: [Output Only] A list of + // PublicDelegatedPrefixes contained in this scope. + PublicDelegatedPrefixes []*PublicDelegatedPrefix `json:"publicDelegatedPrefixes,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: [Output Only] Informational warning which replaces the list + // of public delegated prefixes when the list is empty. + Warning *PublicDelegatedPrefixesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "PublicDelegatedPrefixes") 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. "Items") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "PublicDelegatedPrefixes") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersListInstanceConfigsResp) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsResp +func (s *PublicDelegatedPrefixesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionInstanceGroupManagersListInstanceConfigsRespWarning: [Output -// Only] Informational warning message. -type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { +// PublicDelegatedPrefixesScopedListWarning: [Output Only] Informational +// warning which replaces the list of public delegated prefixes when the +// list is empty. +type PublicDelegatedPrefixesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -40242,7 +39923,7 @@ type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RegionInstanceGroupManagersListInstanceConfigsRespWarningData `json:"data,omitempty"` + Data []*PublicDelegatedPrefixesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -40265,13 +39946,13 @@ type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersListInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarning +func (s *PublicDelegatedPrefixesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagersListInstanceConfigsRespWarningData struct { +type PublicDelegatedPrefixesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -40302,29 +39983,181 @@ type RegionInstanceGroupManagersListInstanceConfigsRespWarningData struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersListInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarningData +func (s *PublicDelegatedPrefixesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagersListInstancesResponse struct { - // ManagedInstances: A list of managed instances. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` +// Quota: A quotas entry. +type Quota struct { + // Limit: [Output Only] Quota limit for this metric. + Limit float64 `json:"limit,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // Metric: [Output Only] Name of the quota metric. + // + // Possible values: + // "A2_CPUS" + // "AFFINITY_GROUPS" + // "AUTOSCALERS" + // "BACKEND_BUCKETS" + // "BACKEND_SERVICES" + // "C2D_CPUS" + // "C2_CPUS" + // "C3_CPUS" + // "COMMITMENTS" + // "COMMITTED_A2_CPUS" + // "COMMITTED_C2D_CPUS" + // "COMMITTED_C2_CPUS" + // "COMMITTED_C3_CPUS" + // "COMMITTED_CPUS" + // "COMMITTED_E2_CPUS" + // "COMMITTED_LICENSES" + // "COMMITTED_LOCAL_SSD_TOTAL_GB" + // "COMMITTED_M3_CPUS" + // "COMMITTED_MEMORY_OPTIMIZED_CPUS" + // "COMMITTED_N2A_CPUS" + // "COMMITTED_N2D_CPUS" + // "COMMITTED_N2_CPUS" + // "COMMITTED_NVIDIA_A100_80GB_GPUS" + // "COMMITTED_NVIDIA_A100_GPUS" + // "COMMITTED_NVIDIA_K80_GPUS" + // "COMMITTED_NVIDIA_L4_GPUS" + // "COMMITTED_NVIDIA_P100_GPUS" + // "COMMITTED_NVIDIA_P4_GPUS" + // "COMMITTED_NVIDIA_T4_GPUS" + // "COMMITTED_NVIDIA_V100_GPUS" + // "COMMITTED_T2A_CPUS" + // "COMMITTED_T2D_CPUS" + // "CPUS" - Guest CPUs + // "CPUS_ALL_REGIONS" + // "DISKS_TOTAL_GB" + // "E2_CPUS" + // "EXTERNAL_MANAGED_FORWARDING_RULES" + // "EXTERNAL_NETWORK_LB_FORWARDING_RULES" + // "EXTERNAL_PROTOCOL_FORWARDING_RULES" + // "EXTERNAL_VPN_GATEWAYS" + // "FIREWALLS" + // "FORWARDING_RULES" + // "GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES" + // "GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES" + // "GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES" + // "GLOBAL_INTERNAL_ADDRESSES" + // "GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES" + // "GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES" + // "GPUS_ALL_REGIONS" + // "HEALTH_CHECKS" + // "IMAGES" + // "INSTANCES" + // "INSTANCE_GROUPS" + // "INSTANCE_GROUP_MANAGERS" + // "INSTANCE_TEMPLATES" + // "INTERCONNECTS" + // "INTERCONNECT_ATTACHMENTS_PER_REGION" + // "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS" + // "INTERCONNECT_TOTAL_GBPS" + // "INTERNAL_ADDRESSES" + // "INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES" + // "IN_PLACE_SNAPSHOTS" + // "IN_USE_ADDRESSES" + // "IN_USE_BACKUP_SCHEDULES" + // "IN_USE_SNAPSHOT_SCHEDULES" + // "LOCAL_SSD_TOTAL_GB" + // "M1_CPUS" + // "M2_CPUS" + // "M3_CPUS" + // "MACHINE_IMAGES" + // "N2A_CPUS" + // "N2D_CPUS" + // "N2_CPUS" + // "NETWORKS" + // "NETWORK_ATTACHMENTS" + // "NETWORK_ENDPOINT_GROUPS" + // "NETWORK_FIREWALL_POLICIES" + // "NET_LB_SECURITY_POLICIES_PER_REGION" + // "NET_LB_SECURITY_POLICY_RULES_PER_REGION" + // "NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION" + // "NODE_GROUPS" + // "NODE_TEMPLATES" + // "NVIDIA_A100_80GB_GPUS" + // "NVIDIA_A100_GPUS" + // "NVIDIA_K80_GPUS" + // "NVIDIA_L4_GPUS" + // "NVIDIA_P100_GPUS" + // "NVIDIA_P100_VWS_GPUS" + // "NVIDIA_P4_GPUS" + // "NVIDIA_P4_VWS_GPUS" + // "NVIDIA_T4_GPUS" + // "NVIDIA_T4_VWS_GPUS" + // "NVIDIA_V100_GPUS" + // "PACKET_MIRRORINGS" + // "PD_EXTREME_TOTAL_PROVISIONED_IOPS" + // "PREEMPTIBLE_CPUS" + // "PREEMPTIBLE_LOCAL_SSD_GB" + // "PREEMPTIBLE_NVIDIA_A100_80GB_GPUS" + // "PREEMPTIBLE_NVIDIA_A100_GPUS" + // "PREEMPTIBLE_NVIDIA_K80_GPUS" + // "PREEMPTIBLE_NVIDIA_L4_GPUS" + // "PREEMPTIBLE_NVIDIA_P100_GPUS" + // "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS" + // "PREEMPTIBLE_NVIDIA_P4_GPUS" + // "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS" + // "PREEMPTIBLE_NVIDIA_T4_GPUS" + // "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS" + // "PREEMPTIBLE_NVIDIA_V100_GPUS" + // "PRIVATE_V6_ACCESS_SUBNETWORKS" + // "PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK" + // "PSC_INTERNAL_LB_FORWARDING_RULES" + // "PUBLIC_ADVERTISED_PREFIXES" + // "PUBLIC_DELEGATED_PREFIXES" + // "REGIONAL_AUTOSCALERS" + // "REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES" + // "REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES" + // "REGIONAL_INSTANCE_GROUP_MANAGERS" + // "REGIONAL_INTERNAL_LB_BACKEND_SERVICES" + // "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES" + // "RESERVATIONS" + // "RESOURCE_POLICIES" + // "ROUTERS" + // "ROUTES" + // "SECURITY_POLICIES" + // "SECURITY_POLICIES_PER_REGION" + // "SECURITY_POLICY_ADVANCED_RULES_PER_REGION" + // "SECURITY_POLICY_CEVAL_RULES" + // "SECURITY_POLICY_RULES" + // "SECURITY_POLICY_RULES_PER_REGION" + // "SERVICE_ATTACHMENTS" + // "SNAPSHOTS" - The total number of snapshots allowed for a single + // project. + // "SSD_TOTAL_GB" + // "SSL_CERTIFICATES" + // "STATIC_ADDRESSES" + // "STATIC_BYOIP_ADDRESSES" + // "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES" + // "SUBNETWORKS" + // "T2A_CPUS" + // "T2D_CPUS" + // "TARGET_HTTPS_PROXIES" + // "TARGET_HTTP_PROXIES" + // "TARGET_INSTANCES" + // "TARGET_POOLS" + // "TARGET_SSL_PROXIES" + // "TARGET_TCP_PROXIES" + // "TARGET_VPN_GATEWAYS" + // "URL_MAPS" + // "VPN_GATEWAYS" + // "VPN_TUNNELS" + // "XPN_SERVICE_PROJECTS" + Metric string `json:"metric,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Owner: [Output Only] Owning resource. This is the resource on which + // this quota is applied. + Owner string `json:"owner,omitempty"` - // ForceSendFields is a list of field names (e.g. "ManagedInstances") to + // Usage: [Output Only] Current usage of this metric. + Usage float64 `json:"usage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Limit") 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 @@ -40332,29 +40165,54 @@ type RegionInstanceGroupManagersListInstancesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Limit") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstancesResponse +func (s *Quota) MarshalJSON() ([]byte, error) { + type NoMethod Quota raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagersRecreateRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be - // a full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` +func (s *Quota) UnmarshalJSON(data []byte) error { + type NoMethod Quota + var s1 struct { + Limit gensupport.JSONFloat64 `json:"limit"` + Usage gensupport.JSONFloat64 `json:"usage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Limit = float64(s1.Limit) + s.Usage = float64(s1.Usage) + return nil +} - // ForceSendFields is a list of field names (e.g. "Instances") to +// QuotaExceededInfo: Additional details for quota exceeded error for +// resource quota. +type QuotaExceededInfo struct { + // Dimensions: The map holding related quota dimensions. + Dimensions map[string]string `json:"dimensions,omitempty"` + + // Limit: Current effective quota limit. The limit's unit depends on the + // quota type or metric. + Limit float64 `json:"limit,omitempty"` + + // LimitName: The name of the quota limit. + LimitName string `json:"limitName,omitempty"` + + // MetricName: The Compute Engine quota metric name. + MetricName string `json:"metricName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -40362,7 +40220,7 @@ type RegionInstanceGroupManagersRecreateRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in + // NullFields is a list of field names (e.g. "Dimensions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -40371,65 +40229,116 @@ type RegionInstanceGroupManagersRecreateRequest struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersRecreateRequest +func (s *QuotaExceededInfo) MarshalJSON() ([]byte, error) { + type NoMethod QuotaExceededInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagersResizeAdvancedRequest struct { - // NoCreationRetries: If this flag is true, the managed instance group - // attempts to create all instances initiated by this resize request - // only once. If there is an error during creation, the managed instance - // group does not retry create this instance, and we will decrease the - // targetSize of the request instead. If the flag is false, the group - // attempts to recreate each instance continuously until it succeeds. - // This flag matters only in the first attempt of creation of an - // instance. After an instance is successfully created while this flag - // is enabled, the instance behaves the same way as all the other - // instances created with a regular resize request. In particular, if a - // running instance dies unexpectedly at a later time and needs to be - // recreated, this mode does not affect the recreation behavior in that - // scenario. This flag is applicable only to the current resize request. - // It does not influence other resize requests in any way. You can see - // which instances ar being created in which mode by calling the get or - // listManagedInstances API. - NoCreationRetries bool `json:"noCreationRetries,omitempty"` +func (s *QuotaExceededInfo) UnmarshalJSON(data []byte) error { + type NoMethod QuotaExceededInfo + var s1 struct { + Limit gensupport.JSONFloat64 `json:"limit"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Limit = float64(s1.Limit) + return nil +} - // TargetSize: The number of running instances that the managed instance - // group should maintain at any given time. The group automatically adds - // or removes instances to maintain the number of instances specified by - // this parameter. - TargetSize int64 `json:"targetSize,omitempty"` +// Reference: Represents a reference to a resource. +type Reference struct { + // Kind: [Output Only] Type of the resource. Always compute#reference + // for references. + Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "NoCreationRetries") - // to unconditionally include in API requests. By default, fields with + // ReferenceType: A description of the reference type with no implied + // semantics. Possible values include: 1. MEMBER_OF + ReferenceType string `json:"referenceType,omitempty"` + + // Referrer: URL of the resource which refers to the target. + Referrer string `json:"referrer,omitempty"` + + // Target: URL of the resource to which this reference points. + Target string `json:"target,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") 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. "NoCreationRetries") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersResizeAdvancedRequest +func (s *Reference) MarshalJSON() ([]byte, error) { + type NoMethod Reference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` +// Region: Represents a Region resource. A region is a geographical area +// where a resource is located. For more information, read Regions and +// Zones. +type Region struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") + // Deprecated -- [Output Only] The deprecation status associated with + // this region. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: [Output Only] Textual description of the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always compute#region for + // regions. + Kind string `json:"kind,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // Quotas: [Output Only] Quotas assigned to this region. + Quotas []*Quota `json:"quotas,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: [Output Only] Status of the region, either UP or DOWN. + // + // Possible values: + // "DOWN" + // "UP" + Status string `json:"status,omitempty"` + + // SupportsPzs: [Output Only] Reserved for future use. + SupportsPzs bool `json:"supportsPzs,omitempty"` + + // Zones: [Output Only] A list of zones available in this region, in the + // form of resource URLs. + Zones []string `json:"zones,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -40437,7 +40346,7 @@ type RegionInstanceGroupManagersSetAutoHealingRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to + // NullFields is a list of field names (e.g. "CreationTimestamp") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -40447,24 +40356,28 @@ type RegionInstanceGroupManagersSetAutoHealingRequest struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetAutoHealingRequest +func (s *Region) MarshalJSON() ([]byte, error) { + type NoMethod Region raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: Fingerprint of the target pools information, which is a - // hash of the contents. This field is used for optimistic locking when - // you update the target pool entries. This field is optional. - Fingerprint string `json:"fingerprint,omitempty"` +type RegionAddressesMoveRequest struct { + // Description: An optional destination address description if intended + // to be different from the source. + Description string `json:"description,omitempty"` - // TargetPools: The URL of all TargetPool resources to which instances - // in the instanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` + // DestinationAddress: The URL of the destination address to move to. + // This can be a full or partial URL. For example, the following are all + // valid URLs to a address: - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /addresses/address - + // projects/project/regions/region/addresses/address Note that + // destination project must be different from the source project. So + // /regions/region/addresses/address is not valid partial url. + DestinationAddress string `json:"destinationAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -40472,7 +40385,7 @@ type RegionInstanceGroupManagersSetTargetPoolsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include + // NullFields is a list of field names (e.g. "Description") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -40481,50 +40394,22 @@ type RegionInstanceGroupManagersSetTargetPoolsRequest struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetTargetPoolsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTemplateRequest struct { - // InstanceTemplate: URL of the InstanceTemplate resource from which all - // new instances will be created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with - // empty 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. "InstanceTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetTemplateRequest +func (s *RegionAddressesMoveRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionAddressesMoveRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupsListInstances struct { +// RegionAutoscalerList: Contains a list of autoscalers. +type RegionAutoscalerList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` + // Items: A list of Autoscaler resources. + Items []*Autoscaler `json:"items,omitempty"` - // Kind: The resource type. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -40539,7 +40424,7 @@ type RegionInstanceGroupsListInstances struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupsListInstancesWarning `json:"warning,omitempty"` + Warning *RegionAutoscalerListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -40562,15 +40447,15 @@ type RegionInstanceGroupsListInstances struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstances +func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) { + type NoMethod RegionAutoscalerList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionInstanceGroupsListInstancesWarning: [Output Only] Informational -// warning message. -type RegionInstanceGroupsListInstancesWarning struct { +// RegionAutoscalerListWarning: [Output Only] Informational warning +// message. +type RegionAutoscalerListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -40638,7 +40523,7 @@ type RegionInstanceGroupsListInstancesWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RegionInstanceGroupsListInstancesWarningData `json:"data,omitempty"` + Data []*RegionAutoscalerListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -40661,13 +40546,13 @@ type RegionInstanceGroupsListInstancesWarning struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesWarning +func (s *RegionAutoscalerListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RegionAutoscalerListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupsListInstancesWarningData struct { +type RegionAutoscalerListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -40698,64 +40583,18 @@ type RegionInstanceGroupsListInstancesWarningData struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesWarningData +func (s *RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RegionAutoscalerListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionInstanceGroupsListInstancesRequest struct { - // InstanceState: Instances in which state should be returned. Valid - // options are: 'ALL', 'RUNNING'. By default, it lists all instances. - // - // Possible values: - // "ALL" - Matches any status of the instances, running, non-running - // and others. - // "RUNNING" - Instance is in RUNNING state if it is running. - InstanceState string `json:"instanceState,omitempty"` - - // PortName: Name of port user is interested in. It is optional. If it - // is set, only information about this ports will be returned. If it is - // not set, all the named ports will be returned. Always lists all - // instances. - PortName string `json:"portName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InstanceState") 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. "InstanceState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. Use this optional property to prevent conflicts when - // multiple users change the named ports settings concurrently. Obtain - // the fingerprint with the instanceGroups.get method. Then, include the - // fingerprint in your request to ensure that you do not overwrite - // changes that were applied from another concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` +type RegionCommitmentsUpdateReservationsRequest struct { + // Reservations: A list of two reservations to transfer GPUs and local + // SSD between. + Reservations []*Reservation `json:"reservations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // ForceSendFields is a list of field names (e.g. "Reservations") 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 @@ -40763,7 +40602,7 @@ type RegionInstanceGroupsSetNamedPortsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include + // NullFields is a list of field names (e.g. "Reservations") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -40772,23 +40611,22 @@ type RegionInstanceGroupsSetNamedPortsRequest struct { NullFields []string `json:"-"` } -func (s *RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsSetNamedPortsRequest +func (s *RegionCommitmentsUpdateReservationsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionCommitmentsUpdateReservationsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionList: Contains a list of region resources. -type RegionList struct { +type RegionDiskTypeList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of Region resources. - Items []*Region `json:"items,omitempty"` + // Items: A list of DiskType resources. + Items []*DiskType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#regionList for - // lists of regions. + // Kind: [Output Only] Type of resource. Always + // compute#regionDiskTypeList for region disk types. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -40803,7 +40641,7 @@ type RegionList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *RegionListWarning `json:"warning,omitempty"` + Warning *RegionDiskTypeListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -40826,14 +40664,15 @@ type RegionList struct { NullFields []string `json:"-"` } -func (s *RegionList) MarshalJSON() ([]byte, error) { - type NoMethod RegionList +func (s *RegionDiskTypeList) MarshalJSON() ([]byte, error) { + type NoMethod RegionDiskTypeList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RegionListWarning: [Output Only] Informational warning message. -type RegionListWarning struct { +// RegionDiskTypeListWarning: [Output Only] Informational warning +// message. +type RegionDiskTypeListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -40901,7 +40740,7 @@ type RegionListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RegionListWarningData `json:"data,omitempty"` + Data []*RegionDiskTypeListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -40924,13 +40763,13 @@ type RegionListWarning struct { NullFields []string `json:"-"` } -func (s *RegionListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionListWarning +func (s *RegionDiskTypeListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RegionDiskTypeListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionListWarningData struct { +type RegionDiskTypeListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -40961,103 +40800,17 @@ type RegionListWarningData struct { NullFields []string `json:"-"` } -func (s *RegionListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse struct { - // FirewallPolicys: Effective firewalls from firewall policy. - FirewallPolicys []*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - - // Firewalls: Effective firewalls on the network. - Firewalls []*Firewall `json:"firewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") 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. "FirewallPolicys") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] The display name of the firewall policy. - DisplayName string `json:"displayName,omitempty"` - - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` - - // Rules: The rules that apply to the network. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - - // Type: [Output Only] The type of the firewall policy. Can be one of - // HIERARCHY, NETWORK, NETWORK_REGIONAL. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "NETWORK_REGIONAL" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy +func (s *RegionDiskTypeListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RegionDiskTypeListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` +type RegionDisksAddResourcePoliciesRequest struct { + // ResourcePolicies: Resource policies to be added to this disk. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to + // ForceSendFields is a list of field names (e.g. "ResourcePolicies") 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 @@ -41065,7 +40818,7 @@ type RegionSetLabelsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to + // NullFields is a list of field names (e.g. "ResourcePolicies") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -41075,56 +40828,17 @@ type RegionSetLabelsRequest struct { NullFields []string `json:"-"` } -func (s *RegionSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionSetLabelsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RegionSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - - // Etag: Flatten Policy to create a backward compatible wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - - // Policy: REQUIRED: The complete policy to be applied to the - // 'resource'. The size of the policy is limited to a few 10s of KB. An - // empty policy is in general a valid policy but certain services (like - // Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Bindings") 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. "Bindings") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RegionSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionSetPolicyRequest +func (s *RegionDisksAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionDisksAddResourcePoliciesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionTargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. - SslCertificates []string `json:"sslCertificates,omitempty"` +type RegionDisksRemoveResourcePoliciesRequest struct { + // ResourcePolicies: Resource policies to be removed from this disk. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to + // ForceSendFields is a list of field names (e.g. "ResourcePolicies") 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 @@ -41132,7 +40846,7 @@ type RegionTargetHttpsProxiesSetSslCertificatesRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to + // NullFields is a list of field names (e.g. "ResourcePolicies") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -41142,17 +40856,18 @@ type RegionTargetHttpsProxiesSetSslCertificatesRequest struct { NullFields []string `json:"-"` } -func (s *RegionTargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionTargetHttpsProxiesSetSslCertificatesRequest +func (s *RegionDisksRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionDisksRemoveResourcePoliciesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RegionUrlMapsValidateRequest struct { - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` +type RegionDisksResizeRequest struct { + // SizeGb: The new size of the regional persistent disk, which is + // specified in GB. + SizeGb int64 `json:"sizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Resource") to + // ForceSendFields is a list of field names (e.g. "SizeGb") 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 @@ -41160,8 +40875,8 @@ type RegionUrlMapsValidateRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "SizeGb") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -41169,34 +40884,33 @@ type RegionUrlMapsValidateRequest struct { NullFields []string `json:"-"` } -func (s *RegionUrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionUrlMapsValidateRequest +func (s *RegionDisksResizeRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionDisksResizeRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RequestMirrorPolicy: A policy that specifies how requests intended -// for the route's backends are shadowed to a separate mirrored backend -// service. The load balancer doesn't wait for responses from the shadow -// service. Before sending traffic to the shadow service, the host or -// authority header is suffixed with -shadow. -type RequestMirrorPolicy struct { - // BackendService: The full or partial URL to the BackendService - // resource being mirrored to. The backend service configured for a - // mirroring policy must reference backends that are of the same type as - // the original backend service matched in the URL map. Serverless NEG - // backends are not currently supported as a mirrored backend service. - BackendService string `json:"backendService,omitempty"` +type RegionDisksStartAsyncReplicationRequest struct { + // AsyncSecondaryDisk: The secondary disk to start asynchronous + // replication to. You can provide this as a partial or full URL to the + // resource. For example, the following are valid values: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /disks/disk - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /disks/disk - projects/project/zones/zone/disks/disk - + // projects/project/regions/region/disks/disk - zones/zone/disks/disk - + // regions/region/disks/disk + AsyncSecondaryDisk string `json:"asyncSecondaryDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AsyncSecondaryDisk") + // 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. "BackendService") to + // NullFields is a list of field names (e.g. "AsyncSecondaryDisk") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -41206,187 +40920,22 @@ type RequestMirrorPolicy struct { NullFields []string `json:"-"` } -func (s *RequestMirrorPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RequestMirrorPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Reservation: Represents a reservation resource. A reservation ensures -// that capacity is held in a specific zone even if the reserved VMs are -// not running. For more information, read Reserving zonal resources. -type Reservation struct { - // Commitment: [Output Only] Full or partial URL to a parent commitment. - // This field displays for reservations that are tied to a commitment. - Commitment string `json:"commitment,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#reservations - // for reservations. - Kind string `json:"kind,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // ResourcePolicies: Resource policies to be added to this reservation. - // The key is defined by user, and the value is resource policy url. - // This is to define placement policy with reservation. - ResourcePolicies map[string]string `json:"resourcePolicies,omitempty"` - - // ResourceStatus: [Output Only] Status information for Reservation - // resource. - ResourceStatus *AllocationResourceStatus `json:"resourceStatus,omitempty"` - - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // ShareSettings: Specify share-settings to create a shared reservation. - // This property is optional. For more information about the syntax and - // options for this field and its subfields, see the guide for creating - // a shared reservation. - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - - // SpecificReservation: Reservation for instances with specific machine - // shapes. - SpecificReservation *AllocationSpecificSKUReservation `json:"specificReservation,omitempty"` - - // SpecificReservationRequired: Indicates whether the reservation can be - // consumed by VMs with affinity for "any" reservation. If the field is - // set, then only VMs that target the reservation by name can consume - // from this reservation. - SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - - // Status: [Output Only] The status of the reservation. - // - // Possible values: - // "CREATING" - Resources are being allocated for the reservation. - // "DELETING" - Reservation is currently being deleted. - // "INVALID" - // "READY" - Reservation has allocated all its resources. - // "UPDATING" - Reservation is currently being resized. - Status string `json:"status,omitempty"` - - // Zone: Zone in which the reservation resides. A zone must be provided - // if the reservation is created within a commitment. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Commitment") 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. "Commitment") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Reservation) MarshalJSON() ([]byte, error) { - type NoMethod Reservation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ReservationAffinity: Specifies the reservations that this instance -// can consume from. -type ReservationAffinity struct { - // ConsumeReservationType: Specifies the type of reservation from which - // this instance can consume resources: ANY_RESERVATION (default), - // SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved - // instances for examples. - // - // Possible values: - // "ANY_RESERVATION" - Consume any allocation available. - // "NO_RESERVATION" - Do not consume from any allocated capacity. - // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. - // Must specify key value fields for specifying the reservations. - // "SPECIFIC_THEN_ANY_RESERVATION" - Prefer to consume from a specific - // reservation, but still consume any reservation available if the - // specified reservation is not available or exhausted. Must specify key - // value fields for specifying the reservations. - // "UNSPECIFIED" - ConsumeReservationType string `json:"consumeReservationType,omitempty"` - - // Key: Corresponds to the label key of a reservation resource. To - // target a SPECIFIC_RESERVATION by name, specify - // googleapis.com/reservation-name as the key and specify the name of - // your reservation as its value. - Key string `json:"key,omitempty"` - - // Values: Corresponds to the label values of a reservation resource. - // This can be either a name to a reservation in the same project or - // "projects/different-project/reservations/some-reservation-name" to - // target a shared reservation in the same zone but in a different - // project. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ConsumeReservationType") 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. "ConsumeReservationType") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ReservationAffinity) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAffinity +func (s *RegionDisksStartAsyncReplicationRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionDisksStartAsyncReplicationRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReservationAggregatedList: Contains a list of reservations. -type ReservationAggregatedList struct { +// RegionInstanceGroupList: Contains a list of InstanceGroup resources. +type RegionInstanceGroupList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of Allocation resources. - Items map[string]ReservationsScopedList `json:"items,omitempty"` + // Items: A list of InstanceGroup resources. + Items []*InstanceGroup `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: The resource type. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -41400,11 +40949,8 @@ type ReservationAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ReservationAggregatedListWarning `json:"warning,omitempty"` + Warning *RegionInstanceGroupListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -41427,15 +40973,15 @@ type ReservationAggregatedList struct { NullFields []string `json:"-"` } -func (s *ReservationAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedList +func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReservationAggregatedListWarning: [Output Only] Informational warning +// RegionInstanceGroupListWarning: [Output Only] Informational warning // message. -type ReservationAggregatedListWarning struct { +type RegionInstanceGroupListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -41503,7 +41049,7 @@ type ReservationAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ReservationAggregatedListWarningData `json:"data,omitempty"` + Data []*RegionInstanceGroupListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -41526,13 +41072,13 @@ type ReservationAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *ReservationAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedListWarning +func (s *RegionInstanceGroupListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ReservationAggregatedListWarningData struct { +type RegionInstanceGroupListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -41563,22 +41109,55 @@ type ReservationAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *ReservationAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedListWarningData +func (s *RegionInstanceGroupListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ReservationList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. +// RegionInstanceGroupManagerDeleteInstanceConfigReq: +// RegionInstanceGroupManagers.deletePerInstanceConfigs +type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { + // Names: The list of instance names for which we want to delete + // per-instance configs on this managed instance group. + Names []string `json:"names,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Names") 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. "Names") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagerDeleteInstanceConfigReq) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagerDeleteInstanceConfigReq + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RegionInstanceGroupManagerList: Contains a list of managed instance +// groups. +type RegionInstanceGroupManagerList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Allocation resources. - Items []*Reservation `json:"items,omitempty"` + // Items: A list of InstanceGroupManager resources. + Items []*InstanceGroupManager `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#reservationsList - // for listsof reservations + // Kind: [Output Only] The resource type, which is always + // compute#instanceGroupManagerList for a list of managed instance + // groups that exist in th regional scope. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -41593,7 +41172,7 @@ type ReservationList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *ReservationListWarning `json:"warning,omitempty"` + Warning *RegionInstanceGroupManagerListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -41616,14 +41195,15 @@ type ReservationList struct { NullFields []string `json:"-"` } -func (s *ReservationList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationList +func (s *RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagerList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReservationListWarning: [Output Only] Informational warning message. -type ReservationListWarning struct { +// RegionInstanceGroupManagerListWarning: [Output Only] Informational +// warning message. +type RegionInstanceGroupManagerListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -41691,7 +41271,7 @@ type ReservationListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ReservationListWarningData `json:"data,omitempty"` + Data []*RegionInstanceGroupManagerListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -41714,13 +41294,13 @@ type ReservationListWarning struct { NullFields []string `json:"-"` } -func (s *ReservationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationListWarning +func (s *RegionInstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagerListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ReservationListWarningData struct { +type RegionInstanceGroupManagerListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -41751,26 +41331,28 @@ type ReservationListWarningData struct { NullFields []string `json:"-"` } -func (s *ReservationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationListWarningData +func (s *RegionInstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagerListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ReservationsResizeRequest struct { - // SpecificSkuCount: Number of allocated resources can be resized with - // minimum = 1 and maximum = 1000. - SpecificSkuCount int64 `json:"specificSkuCount,omitempty,string"` +// RegionInstanceGroupManagerPatchInstanceConfigReq: +// RegionInstanceGroupManagers.patchPerInstanceConfigs +type RegionInstanceGroupManagerPatchInstanceConfigReq struct { + // PerInstanceConfigs: The list of per-instance configurations to insert + // or patch on this managed instance group. + PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "SpecificSkuCount") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") + // 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. "SpecificSkuCount") to + // NullFields is a list of field names (e.g. "PerInstanceConfigs") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -41780,21 +41362,50 @@ type ReservationsResizeRequest struct { NullFields []string `json:"-"` } -func (s *ReservationsResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsResizeRequest +func (s *RegionInstanceGroupManagerPatchInstanceConfigReq) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagerPatchInstanceConfigReq raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ReservationsScopedList struct { - // Reservations: A list of reservations contained in this scope. - Reservations []*Reservation `json:"reservations,omitempty"` +// RegionInstanceGroupManagerUpdateInstanceConfigReq: +// RegionInstanceGroupManagers.updatePerInstanceConfigs +type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { + // PerInstanceConfigs: The list of per-instance configurations to insert + // or patch on this managed instance group. + PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // Warning: Informational warning which replaces the list of - // reservations when the list is empty. - Warning *ReservationsScopedListWarning `json:"warning,omitempty"` + // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Reservations") to + // NullFields is a list of field names (e.g. "PerInstanceConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagerUpdateInstanceConfigReq) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagerUpdateInstanceConfigReq + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersAbandonInstancesRequest struct { + // Instances: The URLs of one or more instances to abandon. This can be + // a full URL or a partial URL, such as + // zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -41802,98 +41413,69 @@ type ReservationsScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reservations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ReservationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedList +func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersAbandonInstancesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReservationsScopedListWarning: Informational warning which replaces -// the list of reservations when the list is empty. -type ReservationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. +// RegionInstanceGroupManagersApplyUpdatesRequest: +// RegionInstanceGroupManagers.applyUpdatesToInstances +type RegionInstanceGroupManagersApplyUpdatesRequest struct { + // AllInstances: Flag to update all instances instead of specified list + // of “instances”. If the flag is set to true then the instances may + // not be specified in the request. + AllInstances bool `json:"allInstances,omitempty"` + + // Instances: The list of URLs of one or more instances for which you + // want to apply updates. Each URL can be a full URL or a partial URL, + // such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + + // MinimalAction: The minimal action that you want to perform on each + // instance during the update: - REPLACE: At minimum, delete the + // instance and create it again. - RESTART: Stop the instance and start + // it again. - REFRESH: Do not stop the instance. - NONE: Do not disrupt + // the instance at all. By default, the minimum action is NONE. If your + // update requires a more disruptive action than you set with this flag, + // the necessary action is performed to execute the update. // // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*ReservationsScopedListWarningData `json:"data,omitempty"` + // "NONE" - Do not perform any action. + // "REFRESH" - Updates applied in runtime, instances will not be + // disrupted. + // "REPLACE" - Old instances will be deleted. New instances will be + // created from the target template. + // "RESTART" - Every instance will be restarted. + MinimalAction string `json:"minimalAction,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // MostDisruptiveAllowedAction: The most disruptive action that you want + // to perform on each instance during the update: - REPLACE: Delete the + // instance and create it again. - RESTART: Stop the instance and start + // it again. - REFRESH: Do not stop the instance. - NONE: Do not disrupt + // the instance at all. By default, the most disruptive allowed action + // is REPLACE. If your update requires a more disruptive action than you + // set with this flag, the update request will fail. + // + // Possible values: + // "NONE" - Do not perform any action. + // "REFRESH" - Updates applied in runtime, instances will not be + // disrupted. + // "REPLACE" - Old instances will be deleted. New instances will be + // created from the target template. + // "RESTART" - Every instance will be restarted. + MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "AllInstances") 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 @@ -41901,36 +41483,28 @@ type ReservationsScopedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AllInstances") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ReservationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedListWarning +func (s *RegionInstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersApplyUpdatesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ReservationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` +// RegionInstanceGroupManagersCreateInstancesRequest: +// RegionInstanceGroupManagers.createInstances +type RegionInstanceGroupManagersCreateInstancesRequest struct { + // Instances: [Required] List of specifications of per-instance configs. + Instances []*PerInstanceConfig `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Instances") 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 @@ -41938,8 +41512,8 @@ type ReservationsScopedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -41947,37 +41521,29 @@ type ReservationsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *ReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedListWarningData +func (s *RegionInstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersCreateInstancesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourceCommitment: Commitment for a particular resource (a -// Commitment is composed of one or more of these). -type ResourceCommitment struct { - // AcceleratorType: Name of the accelerator type resource. Applicable - // only when the type is ACCELERATOR. - AcceleratorType string `json:"acceleratorType,omitempty"` - - // Amount: The amount of the resource purchased (in a type-dependent - // unit, such as bytes). For vCPUs, this can just be an integer. For - // memory, this must be provided in MB. Memory must be a multiple of 256 - // MB, with up to 6.5GB of memory per every vCPU. - Amount int64 `json:"amount,omitempty,string"` +type RegionInstanceGroupManagersDeleteInstancesRequest struct { + // Instances: The URLs of one or more instances to delete. This can be a + // full URL or a partial URL, such as + // zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` - // Type: Type of resource for which this commitment applies. Possible - // values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. - // - // Possible values: - // "ACCELERATOR" - // "LOCAL_SSD" - // "MEMORY" - // "UNSPECIFIED" - // "VCPU" - Type string `json:"type,omitempty"` + // SkipInstancesOnValidationError: Specifies whether the request should + // proceed despite the inclusion of instances that are not members of + // the group or that are already in the process of being deleted or + // abandoned. If this field is set to `false` and such an instance is + // specified in the request, the operation fails. The operation always + // fails if the request contains a malformed instance URL or a reference + // to an instance that exists in a zone or region other than the group's + // zone or region. + SkipInstancesOnValidationError bool `json:"skipInstancesOnValidationError,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorType") to + // ForceSendFields is a list of field names (e.g. "Instances") 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 @@ -41985,28 +41551,39 @@ type ResourceCommitment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorType") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ResourceCommitment) MarshalJSON() ([]byte, error) { - type NoMethod ResourceCommitment +func (s *RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersDeleteInstancesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourceGroupReference struct { - // Group: A URI referencing one of the instance groups or network - // endpoint groups listed in the backend service. - Group string `json:"group,omitempty"` +type RegionInstanceGroupManagersListErrorsResponse struct { + // Items: [Output Only] The list of errors of the managed instance + // group. + Items []*InstanceManagedByIgmError `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Group") to + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Items") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -42014,7 +41591,7 @@ type ResourceGroupReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Group") to include in API + // NullFields is a list of field names (e.g. "Items") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -42023,21 +41600,32 @@ type ResourceGroupReference struct { NullFields []string `json:"-"` } -func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { - type NoMethod ResourceGroupReference +func (s *RegionInstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersListErrorsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourcePoliciesScopedList struct { - // ResourcePolicies: A list of resourcePolicies contained in this scope. - ResourcePolicies []*ResourcePolicy `json:"resourcePolicies,omitempty"` +type RegionInstanceGroupManagersListInstanceConfigsResp struct { + // Items: [Output Only] The list of PerInstanceConfig. + Items []*PerInstanceConfig `json:"items,omitempty"` - // Warning: Informational warning which replaces the list of - // resourcePolicies when the list is empty. - Warning *ResourcePoliciesScopedListWarning `json:"warning,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to + // Warning: [Output Only] Informational warning message. + Warning *RegionInstanceGroupManagersListInstanceConfigsRespWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Items") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -42045,25 +41633,24 @@ type ResourcePoliciesScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ResourcePoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedList +func (s *RegionInstanceGroupManagersListInstanceConfigsResp) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersListInstanceConfigsResp raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePoliciesScopedListWarning: Informational warning which -// replaces the list of resourcePolicies when the list is empty. -type ResourcePoliciesScopedListWarning struct { +// RegionInstanceGroupManagersListInstanceConfigsRespWarning: [Output +// Only] Informational warning message. +type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -42131,7 +41718,7 @@ type ResourcePoliciesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ResourcePoliciesScopedListWarningData `json:"data,omitempty"` + Data []*RegionInstanceGroupManagersListInstanceConfigsRespWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -42154,13 +41741,13 @@ type ResourcePoliciesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *ResourcePoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedListWarning +func (s *RegionInstanceGroupManagersListInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourcePoliciesScopedListWarningData struct { +type RegionInstanceGroupManagersListInstanceConfigsRespWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -42191,90 +41778,37 @@ type ResourcePoliciesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *ResourcePoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedListWarningData +func (s *RegionInstanceGroupManagersListInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicy: Represents a Resource Policy resource. You can use -// resource policies to schedule actions for some Compute Engine -// resources. For example, you can use them to schedule persistent disk -// snapshots. -type ResourcePolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - Description string `json:"description,omitempty"` - - // DiskConsistencyGroupPolicy: Resource policy for disk consistency - // groups. - DiskConsistencyGroupPolicy *ResourcePolicyDiskConsistencyGroupPolicy `json:"diskConsistencyGroupPolicy,omitempty"` - - // GroupPlacementPolicy: Resource policy for instances for placement - // configuration. - GroupPlacementPolicy *ResourcePolicyGroupPlacementPolicy `json:"groupPlacementPolicy,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // InstanceSchedulePolicy: Resource policy for scheduling instance - // operations. - InstanceSchedulePolicy *ResourcePolicyInstanceSchedulePolicy `json:"instanceSchedulePolicy,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#resource_policies for resource policies. - Kind string `json:"kind,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - Region string `json:"region,omitempty"` - - // ResourceStatus: [Output Only] The system status of the resource - // policy. - ResourceStatus *ResourcePolicyResourceStatus `json:"resourceStatus,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // SnapshotSchedulePolicy: Resource policy for persistent disks for - // creating snapshots. - SnapshotSchedulePolicy *ResourcePolicySnapshotSchedulePolicy `json:"snapshotSchedulePolicy,omitempty"` +type RegionInstanceGroupManagersListInstancesResponse struct { + // ManagedInstances: A list of managed instances. + ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - // Status: [Output Only] The status of resource policy creation. - // - // Possible values: - // "CREATING" - Resource policy is being created. - // "DELETING" - Resource policy is being deleted. - // "EXPIRED" - Resource policy is expired and will not run again. - // "INVALID" - // "READY" - Resource policy is ready to be used. - Status string `json:"status,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ManagedInstances") 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. "CreationTimestamp") to + // NullFields is a list of field names (e.g. "ManagedInstances") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -42284,24 +41818,189 @@ type ResourcePolicy struct { NullFields []string `json:"-"` } -func (s *ResourcePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicy +func (s *RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersListInstancesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyAggregatedList: Contains a list of resourcePolicies. -type ResourcePolicyAggregatedList struct { - Etag string `json:"etag,omitempty"` - - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +type RegionInstanceGroupManagersRecreateRequest struct { + // Instances: The URLs of one or more instances to recreate. This can be + // a full URL or a partial URL, such as + // zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` - // Items: A list of ResourcePolicy resources. - Items map[string]ResourcePoliciesScopedList `json:"items,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") 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:"-"` - // Kind: Type of resource. + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersRecreateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersResizeAdvancedRequest struct { + // NoCreationRetries: If this flag is true, the managed instance group + // attempts to create all instances initiated by this resize request + // only once. If there is an error during creation, the managed instance + // group does not retry create this instance, and we will decrease the + // targetSize of the request instead. If the flag is false, the group + // attempts to recreate each instance continuously until it succeeds. + // This flag matters only in the first attempt of creation of an + // instance. After an instance is successfully created while this flag + // is enabled, the instance behaves the same way as all the other + // instances created with a regular resize request. In particular, if a + // running instance dies unexpectedly at a later time and needs to be + // recreated, this mode does not affect the recreation behavior in that + // scenario. This flag is applicable only to the current resize request. + // It does not influence other resize requests in any way. You can see + // which instances ar being created in which mode by calling the get or + // listManagedInstances API. + NoCreationRetries bool `json:"noCreationRetries,omitempty"` + + // TargetSize: The number of running instances that the managed instance + // group should maintain at any given time. The group automatically adds + // or removes instances to maintain the number of instances specified by + // this parameter. + TargetSize int64 `json:"targetSize,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NoCreationRetries") + // 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. "NoCreationRetries") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersResizeAdvancedRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersSetAutoHealingRequest struct { + AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") + // 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. "AutoHealingPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersSetAutoHealingRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersSetTargetPoolsRequest struct { + // Fingerprint: Fingerprint of the target pools information, which is a + // hash of the contents. This field is used for optimistic locking when + // you update the target pool entries. This field is optional. + Fingerprint string `json:"fingerprint,omitempty"` + + // TargetPools: The URL of all TargetPool resources to which instances + // in the instanceGroup field are added. The target pools automatically + // apply to all of the instances in the managed instance group. + TargetPools []string `json:"targetPools,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersSetTargetPoolsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersSetTemplateRequest struct { + // InstanceTemplate: URL of the InstanceTemplate resource from which all + // new instances will be created. + InstanceTemplate string `json:"instanceTemplate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to + // unconditionally include in API requests. By default, fields with + // empty 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. "InstanceTemplate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersSetTemplateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupsListInstances struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of InstanceWithNamedPorts resources. + Items []*InstanceWithNamedPorts `json:"items,omitempty"` + + // Kind: The resource type. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -42315,17 +42014,14 @@ type ResourcePolicyAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ResourcePolicyAggregatedListWarning `json:"warning,omitempty"` + Warning *RegionInstanceGroupsListInstancesWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -42333,7 +42029,7 @@ type ResourcePolicyAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API + // NullFields is a list of field names (e.g. "Id") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -42342,15 +42038,15 @@ type ResourcePolicyAggregatedList struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedList +func (s *RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupsListInstances raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyAggregatedListWarning: [Output Only] Informational +// RegionInstanceGroupsListInstancesWarning: [Output Only] Informational // warning message. -type ResourcePolicyAggregatedListWarning struct { +type RegionInstanceGroupsListInstancesWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -42418,7 +42114,7 @@ type ResourcePolicyAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ResourcePolicyAggregatedListWarningData `json:"data,omitempty"` + Data []*RegionInstanceGroupsListInstancesWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -42441,13 +42137,13 @@ type ResourcePolicyAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedListWarning +func (s *RegionInstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupsListInstancesWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourcePolicyAggregatedListWarningData struct { +type RegionInstanceGroupsListInstancesWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -42478,29 +42174,29 @@ type ResourcePolicyAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedListWarningData +func (s *RegionInstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupsListInstancesWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyDailyCycle: Time window specified for daily operations. -type ResourcePolicyDailyCycle struct { - // DaysInCycle: Defines a schedule with units measured in days. The - // value determines how many days pass between the start of each cycle. - DaysInCycle int64 `json:"daysInCycle,omitempty"` - - // Duration: [Output only] A predetermined duration for the window, - // automatically chosen to be the smallest possible in the given - // scenario. - Duration string `json:"duration,omitempty"` +type RegionInstanceGroupsListInstancesRequest struct { + // InstanceState: Instances in which state should be returned. Valid + // options are: 'ALL', 'RUNNING'. By default, it lists all instances. + // + // Possible values: + // "ALL" - Matches any status of the instances, running, non-running + // and others. + // "RUNNING" - Instance is in RUNNING state if it is running. + InstanceState string `json:"instanceState,omitempty"` - // StartTime: Start time of the window. This must be in UTC format that - // resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For - // example, both 13:00-5 and 08:00 are valid. - StartTime string `json:"startTime,omitempty"` + // PortName: Name of port user is interested in. It is optional. If it + // is set, only information about this ports will be returned. If it is + // not set, all the named ports will be returned. Always lists all + // instances. + PortName string `json:"portName,omitempty"` - // ForceSendFields is a list of field names (e.g. "DaysInCycle") to + // ForceSendFields is a list of field names (e.g. "InstanceState") 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 @@ -42508,7 +42204,7 @@ type ResourcePolicyDailyCycle struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DaysInCycle") to include + // NullFields is a list of field names (e.g. "InstanceState") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -42517,83 +42213,25 @@ type ResourcePolicyDailyCycle struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyDailyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyDailyCycle - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyDiskConsistencyGroupPolicy: Resource policy for disk -// consistency groups. -type ResourcePolicyDiskConsistencyGroupPolicy struct { -} - -// ResourcePolicyGroupPlacementPolicy: A GroupPlacementPolicy specifies -// resource placement configuration. It specifies the failure bucket -// separation as well as network locality -type ResourcePolicyGroupPlacementPolicy struct { - // AvailabilityDomainCount: The number of availability domains to spread - // instances across. If two instances are in different availability - // domain, they are not in the same low latency network. - AvailabilityDomainCount int64 `json:"availabilityDomainCount,omitempty"` - - // Collocation: Specifies network collocation - // - // Possible values: - // "COLLOCATED" - // "UNSPECIFIED_COLLOCATION" - Collocation string `json:"collocation,omitempty"` - - // MaxDistance: Specifies the number of max logical switches. - MaxDistance int64 `json:"maxDistance,omitempty"` - - // VmCount: Number of VMs in this placement group. Google does not - // recommend that you use this field unless you use a compact policy and - // you want your policy to work only if it contains this exact number of - // VMs. - VmCount int64 `json:"vmCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AvailabilityDomainCount") 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. "AvailabilityDomainCount") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicyGroupPlacementPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyGroupPlacementPolicy +func (s *RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupsListInstancesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyHourlyCycle: Time window specified for hourly -// operations. -type ResourcePolicyHourlyCycle struct { - // Duration: [Output only] Duration of the time window, automatically - // chosen to be smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - - // HoursInCycle: Defines a schedule with units measured in hours. The - // value determines how many hours pass between the start of each cycle. - HoursInCycle int64 `json:"hoursInCycle,omitempty"` +type RegionInstanceGroupsSetNamedPortsRequest struct { + // Fingerprint: The fingerprint of the named ports information for this + // instance group. Use this optional property to prevent conflicts when + // multiple users change the named ports settings concurrently. Obtain + // the fingerprint with the instanceGroups.get method. Then, include the + // fingerprint in your request to ensure that you do not overwrite + // changes that were applied from another concurrent request. + Fingerprint string `json:"fingerprint,omitempty"` - // StartTime: Time within the window to start the operations. It must be - // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. - StartTime string `json:"startTime,omitempty"` + // NamedPorts: The list of named ports to set for this instance group. + NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to + // ForceSendFields is a list of field names (e.g. "Fingerprint") 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 @@ -42601,76 +42239,26 @@ type ResourcePolicyHourlyCycle struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ResourcePolicyHourlyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyHourlyCycle - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyInstanceSchedulePolicy: An InstanceSchedulePolicy -// specifies when and how frequent certain operations are performed on -// the instance. -type ResourcePolicyInstanceSchedulePolicy struct { - // ExpirationTime: The expiration time of the schedule. The timestamp is - // an RFC3339 string. - ExpirationTime string `json:"expirationTime,omitempty"` - - // StartTime: The start time of the schedule. The timestamp is an - // RFC3339 string. - StartTime string `json:"startTime,omitempty"` - - // TimeZone: Specifies the time zone to be used in interpreting - // Schedule.schedule. The value of this field must be a time zone name - // from the tz database: https://wikipedia.org/wiki/Tz_database. - TimeZone string `json:"timeZone,omitempty"` - - // VmStartSchedule: Specifies the schedule for starting instances. - VmStartSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStartSchedule,omitempty"` - - // VmStopSchedule: Specifies the schedule for stopping instances. - VmStopSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStopSchedule,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExpirationTime") 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. "ExpirationTime") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicyInstanceSchedulePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyInstanceSchedulePolicy +func (s *RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupsSetNamedPortsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyInstanceSchedulePolicySchedule: Schedule for an -// instance operation. -type ResourcePolicyInstanceSchedulePolicySchedule struct { - // Schedule: Specifies the frequency for the operation, using the - // unix-cron format. - Schedule string `json:"schedule,omitempty"` +type RegionInstantSnapshotsExportRequest struct { + // ExportParams: Parameters to export the changed blocks. + ExportParams *InstantSnapshotExportParams `json:"exportParams,omitempty"` - // ForceSendFields is a list of field names (e.g. "Schedule") to + // ForceSendFields is a list of field names (e.g. "ExportParams") 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 @@ -42678,33 +42266,32 @@ type ResourcePolicyInstanceSchedulePolicySchedule struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Schedule") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ExportParams") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ResourcePolicyInstanceSchedulePolicySchedule) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyInstanceSchedulePolicySchedule +func (s *RegionInstantSnapshotsExportRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstantSnapshotsExportRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourcePolicyList struct { - Etag string `json:"etag,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. +// RegionList: Contains a list of region resources. +type RegionList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of ResourcePolicy resources. - Items []*ResourcePolicy `json:"items,omitempty"` + // Items: A list of Region resources. + Items []*Region `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always - // compute#resourcePoliciesList for listsof resourcePolicies + // Kind: [Output Only] Type of resource. Always compute#regionList for + // lists of regions. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -42719,13 +42306,13 @@ type ResourcePolicyList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *ResourcePolicyListWarning `json:"warning,omitempty"` + Warning *RegionListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -42733,7 +42320,7 @@ type ResourcePolicyList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API + // NullFields is a list of field names (e.g. "Id") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -42742,15 +42329,14 @@ type ResourcePolicyList struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyList +func (s *RegionList) MarshalJSON() ([]byte, error) { + type NoMethod RegionList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyListWarning: [Output Only] Informational warning -// message. -type ResourcePolicyListWarning struct { +// RegionListWarning: [Output Only] Informational warning message. +type RegionListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -42818,7 +42404,7 @@ type ResourcePolicyListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ResourcePolicyListWarningData `json:"data,omitempty"` + Data []*RegionListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -42841,13 +42427,13 @@ type ResourcePolicyListWarning struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarning +func (s *RegionListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RegionListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourcePolicyListWarningData struct { +type RegionListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -42878,58 +42464,24 @@ type ResourcePolicyListWarningData struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarningData +func (s *RegionListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RegionListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyResourceStatus: Contains output only fields. Use this -// sub-message for all output fields set on ResourcePolicy. The internal -// structure of this "status" field should mimic the structure of -// ResourcePolicy proto specification. -type ResourcePolicyResourceStatus struct { - // InstanceSchedulePolicy: [Output Only] Specifies a set of output - // values reffering to the instance_schedule_policy system status. This - // field should have the same name as corresponding policy field. - InstanceSchedulePolicy *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus `json:"instanceSchedulePolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InstanceSchedulePolicy") 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. "InstanceSchedulePolicy") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicyResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyResourceStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse struct { + // FirewallPolicys: Effective firewalls from firewall policy. + FirewallPolicys []*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` -type ResourcePolicyResourceStatusInstanceSchedulePolicyStatus struct { - // LastRunStartTime: [Output Only] The last time the schedule - // successfully ran. The timestamp is an RFC3339 string. - LastRunStartTime string `json:"lastRunStartTime,omitempty"` + // Firewalls: Effective firewalls on the network. + Firewalls []*Firewall `json:"firewalls,omitempty"` - // NextRunStartTime: [Output Only] The next time the schedule is planned - // to run. The actual time might be slightly different. The timestamp is - // an RFC3339 string. - NextRunStartTime string `json:"nextRunStartTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "LastRunStartTime") to + // ForceSendFields is a list of field names (e.g. "FirewallPolicys") 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 @@ -42937,7 +42489,7 @@ type ResourcePolicyResourceStatusInstanceSchedulePolicyStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastRunStartTime") to + // NullFields is a list of field names (e.g. "FirewallPolicys") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -42947,31 +42499,33 @@ type ResourcePolicyResourceStatusInstanceSchedulePolicyStatus struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyResourceStatusInstanceSchedulePolicyStatus +func (s *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { + type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicySnapshotSchedulePolicy: A snapshot schedule policy -// specifies when and how frequently snapshots are to be created for the -// target disk. Also specifies how many and how long these scheduled -// snapshots should be retained. -type ResourcePolicySnapshotSchedulePolicy struct { - // RetentionPolicy: Retention policy applied to snapshots created by - // this resource policy. - RetentionPolicy *ResourcePolicySnapshotSchedulePolicyRetentionPolicy `json:"retentionPolicy,omitempty"` +type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { + // DisplayName: [Output Only] The display name of the firewall policy. + DisplayName string `json:"displayName,omitempty"` - // Schedule: A Vm Maintenance Policy specifies what kind of - // infrastructure maintenance we are allowed to perform on this VM and - // when. Schedule that is applied to disks covered by this policy. - Schedule *ResourcePolicySnapshotSchedulePolicySchedule `json:"schedule,omitempty"` + // Name: [Output Only] The name of the firewall policy. + Name string `json:"name,omitempty"` - // SnapshotProperties: Properties with which snapshots are created such - // as labels, encryption keys. - SnapshotProperties *ResourcePolicySnapshotSchedulePolicySnapshotProperties `json:"snapshotProperties,omitempty"` + // Rules: The rules that apply to the network. + Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "RetentionPolicy") to + // Type: [Output Only] The type of the firewall policy. Can be one of + // HIERARCHY, NETWORK, NETWORK_REGIONAL. + // + // Possible values: + // "HIERARCHY" + // "NETWORK" + // "NETWORK_REGIONAL" + // "UNSPECIFIED" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -42979,39 +42533,34 @@ type ResourcePolicySnapshotSchedulePolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RetentionPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ResourcePolicySnapshotSchedulePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicy +func (s *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicySnapshotSchedulePolicyRetentionPolicy: Policy for -// retention of scheduled snapshots. -type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { - // MaxRetentionDays: Maximum age of the snapshot that is allowed to be - // kept. - MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` +type RegionSetLabelsRequest struct { + // LabelFingerprint: The fingerprint of the previous set of labels for + // this resource, used to detect conflicts. The fingerprint is initially + // generated by Compute Engine and changes after every request to modify + // or update labels. You must always provide an up-to-date fingerprint + // hash in order to update or change labels. Make a get() request to the + // resource to get the latest fingerprint. + LabelFingerprint string `json:"labelFingerprint,omitempty"` - // OnSourceDiskDelete: Specifies the behavior to apply to scheduled - // snapshots when the source disk is deleted. - // - // Possible values: - // "APPLY_RETENTION_POLICY" - // "KEEP_AUTO_SNAPSHOTS" - // "UNSPECIFIED_ON_SOURCE_DISK_DELETE" - OnSourceDiskDelete string `json:"onSourceDiskDelete,omitempty"` + // Labels: The labels to set for this resource. + Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxRetentionDays") to + // ForceSendFields is a list of field names (e.g. "LabelFingerprint") 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 @@ -43019,7 +42568,7 @@ type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxRetentionDays") to + // NullFields is a list of field names (e.g. "LabelFingerprint") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -43029,62 +42578,28 @@ type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { NullFields []string `json:"-"` } -func (s *ResourcePolicySnapshotSchedulePolicyRetentionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicyRetentionPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicySchedule: A schedule for disks -// where the schedueled operations are performed. -type ResourcePolicySnapshotSchedulePolicySchedule struct { - DailySchedule *ResourcePolicyDailyCycle `json:"dailySchedule,omitempty"` - - HourlySchedule *ResourcePolicyHourlyCycle `json:"hourlySchedule,omitempty"` - - WeeklySchedule *ResourcePolicyWeeklyCycle `json:"weeklySchedule,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DailySchedule") 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. "DailySchedule") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourcePolicySnapshotSchedulePolicySchedule) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicySchedule +func (s *RegionSetLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionSetLabelsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicySnapshotSchedulePolicySnapshotProperties: Specified -// snapshot properties for scheduled snapshots created by this policy. -type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { - // ChainName: Chain name that the snapshot is created in. - ChainName string `json:"chainName,omitempty"` - - // GuestFlush: Indication to perform a 'guest aware' snapshot. - GuestFlush bool `json:"guestFlush,omitempty"` +type RegionSetPolicyRequest struct { + // Bindings: Flatten Policy to create a backwacd compatible wire-format. + // Deprecated. Use 'policy' to specify bindings. + Bindings []*Binding `json:"bindings,omitempty"` - // Labels: Labels to apply to scheduled snapshots. These can be later - // modified by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` + // Etag: Flatten Policy to create a backward compatible wire-format. + // Deprecated. Use 'policy' to specify the etag. + Etag string `json:"etag,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the auto - // snapshot (regional or multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` + // Policy: REQUIRED: The complete policy to be applied to the + // 'resource'. The size of the policy is limited to a few 10s of KB. An + // empty policy is in general a valid policy but certain services (like + // Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChainName") to + // ForceSendFields is a list of field names (e.g. "Bindings") 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 @@ -43092,7 +42607,7 @@ type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChainName") to include in + // NullFields is a list of field names (e.g. "Bindings") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -43101,19 +42616,18 @@ type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { NullFields []string `json:"-"` } -func (s *ResourcePolicySnapshotSchedulePolicySnapshotProperties) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicySnapshotProperties +func (s *RegionSetPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionSetPolicyRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcePolicyWeeklyCycle: Time window specified for weekly -// operations. -type ResourcePolicyWeeklyCycle struct { - // DayOfWeeks: Up to 7 intervals/windows, one for each day of the week. - DayOfWeeks []*ResourcePolicyWeeklyCycleDayOfWeek `json:"dayOfWeeks,omitempty"` +type RegionTargetHttpsProxiesSetSslCertificatesRequest struct { + // SslCertificates: New set of SslCertificate resources to associate + // with this TargetHttpsProxy resource. + SslCertificates []string `json:"sslCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "DayOfWeeks") to + // ForceSendFields is a list of field names (e.g. "SslCertificates") 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 @@ -43121,46 +42635,27 @@ type ResourcePolicyWeeklyCycle struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DayOfWeeks") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "SslCertificates") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *ResourcePolicyWeeklyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWeeklyCycle +func (s *RegionTargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionTargetHttpsProxiesSetSslCertificatesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourcePolicyWeeklyCycleDayOfWeek struct { - // Day: Defines a schedule that runs on specific days of the week. - // Specify one or more days. The following options are available: - // MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. - // - // Possible values: - // "FRIDAY" - // "INVALID" - // "MONDAY" - // "SATURDAY" - // "SUNDAY" - // "THURSDAY" - // "TUESDAY" - // "WEDNESDAY" - Day string `json:"day,omitempty"` - - // Duration: [Output only] Duration of the time window, automatically - // chosen to be smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - - // StartTime: Time within the window to start the operations. It must be - // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. - StartTime string `json:"startTime,omitempty"` +type RegionUrlMapsValidateRequest struct { + // Resource: Content of the UrlMap to be validated. + Resource *UrlMap `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to + // ForceSendFields is a list of field names (e.g. "Resource") 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 @@ -43168,8 +42663,8 @@ type ResourcePolicyWeeklyCycleDayOfWeek struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Resource") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -43177,23 +42672,26 @@ type ResourcePolicyWeeklyCycleDayOfWeek struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWeeklyCycleDayOfWeek +func (s *RegionUrlMapsValidateRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionUrlMapsValidateRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourceStatus: Contains output only fields. Use this sub-message for -// actual values set on Instance attributes as compared to the value -// requested by the user (intent) in their instance CRUD calls. -type ResourceStatus struct { - // PhysicalHost: [Output Only] An opaque ID of the host on which the VM - // is running. - PhysicalHost string `json:"physicalHost,omitempty"` - - Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` +// RequestMirrorPolicy: A policy that specifies how requests intended +// for the route's backends are shadowed to a separate mirrored backend +// service. The load balancer doesn't wait for responses from the shadow +// service. Before sending traffic to the shadow service, the host or +// authority header is suffixed with -shadow. +type RequestMirrorPolicy struct { + // BackendService: The full or partial URL to the BackendService + // resource being mirrored to. The backend service configured for a + // mirroring policy must reference backends that are of the same type as + // the original backend service matched in the URL map. Serverless NEG + // backends are not currently supported as a mirrored backend service. + BackendService string `json:"backendService,omitempty"` - // ForceSendFields is a list of field names (e.g. "PhysicalHost") to + // ForceSendFields is a list of field names (e.g. "BackendService") 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 @@ -43201,74 +42699,7 @@ type ResourceStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PhysicalHost") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ResourceStatusScheduling struct { - // TerminationTimestamp: Time in future when the instance will be - // terminated in RFC3339 text format. - TerminationTimestamp string `json:"terminationTimestamp,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "TerminationTimestamp") 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. "TerminationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ResourceStatusScheduling) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusScheduling - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RolloutPolicy: A rollout policy configuration. -type RolloutPolicy struct { - // DefaultRolloutTime: An optional RFC3339 timestamp on or after which - // the update is considered rolled out to any zone that is not - // explicitly stated. - DefaultRolloutTime string `json:"defaultRolloutTime,omitempty"` - - // LocationRolloutPolicies: Location based rollout policies to apply to - // the resource. Currently only zone names are supported and must be - // represented as valid URLs, like: zones/us-central1-a. The value - // expects an RFC3339 timestamp on or after which the update is - // considered rolled out to the specified location. - LocationRolloutPolicies map[string]string `json:"locationRolloutPolicies,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DefaultRolloutTime") - // 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. "DefaultRolloutTime") to + // NullFields is a list of field names (e.g. "BackendService") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -43278,145 +42709,97 @@ type RolloutPolicy struct { NullFields []string `json:"-"` } -func (s *RolloutPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPolicy +func (s *RequestMirrorPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RequestMirrorPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Route: Represents a Route resource. A route defines a path from VM -// instances in the VPC network to a specific destination. This -// destination can be inside or outside the VPC network. For more -// information, read the Routes overview. -type Route struct { - // AsPaths: [Output Only] AS path. - AsPaths []*RouteAsPath `json:"asPaths,omitempty"` +// Reservation: Represents a reservation resource. A reservation ensures +// that capacity is held in a specific zone even if the reserved VMs are +// not running. For more information, read Reserving zonal resources. +type Reservation struct { + // Commitment: [Output Only] Full or partial URL to a parent commitment. + // This field displays for reservations that are tied to a commitment. + Commitment string `json:"commitment,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // field when you create the resource. + // property when you create the resource. Description string `json:"description,omitempty"` - // DestRange: The destination range of outgoing packets that this route - // applies to. Both IPv4 and IPv6 are supported. - DestRange string `json:"destRange,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of this resource. Always compute#routes for - // Route resources. + // Kind: [Output Only] Type of the resource. Always compute#reservations + // for reservations. Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first - // character must be a lowercase letter, and all following characters - // (except for the last character) must be a dash, lowercase letter, or - // digit. The last character must be a lowercase letter or digit. + // Name: The name of the resource, provided by the client when initially + // creating the resource. The resource name must be 1-63 characters + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` - // Network: Fully-qualified URL of the network that this route applies - // to. - Network string `json:"network,omitempty"` - - // NextHopGateway: The URL to a gateway that should handle matching - // packets. You can only specify the internet gateway using a full or - // partial valid URL: projects/ - // project/global/gateways/default-internet-gateway - NextHopGateway string `json:"nextHopGateway,omitempty"` - - // NextHopIlb: The URL to a forwarding rule of type - // loadBalancingScheme=INTERNAL that should handle matching packets or - // the IP address of the forwarding Rule. For example, the following are - // all valid URLs: - 10.128.0.56 - - // https://www.googleapis.com/compute/v1/projects/project/regions/region - // /forwardingRules/forwardingRule - - // regions/region/forwardingRules/forwardingRule - NextHopIlb string `json:"nextHopIlb,omitempty"` - - // NextHopInstance: The URL to an instance that should handle matching - // packets. You can specify this as a full or partial URL. For example: - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ - NextHopInstance string `json:"nextHopInstance,omitempty"` - - // NextHopInterconnectAttachment: [Output Only] The URL to an - // InterconnectAttachment which is the next hop for the route. This - // field will only be populated for the dynamic routes generated by - // Cloud Router with a linked interconnectAttachment. - NextHopInterconnectAttachment string `json:"nextHopInterconnectAttachment,omitempty"` + // ResourcePolicies: Resource policies to be added to this reservation. + // The key is defined by user, and the value is resource policy url. + // This is to define placement policy with reservation. + ResourcePolicies map[string]string `json:"resourcePolicies,omitempty"` - // NextHopIp: The network IP address of an instance that should handle - // matching packets. Only IPv4 is supported. - NextHopIp string `json:"nextHopIp,omitempty"` + // ResourceStatus: [Output Only] Status information for Reservation + // resource. + ResourceStatus *AllocationResourceStatus `json:"resourceStatus,omitempty"` - // NextHopNetwork: The URL of the local network if it should handle - // matching packets. - NextHopNetwork string `json:"nextHopNetwork,omitempty"` + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // NextHopPeering: [Output Only] The network peering name that should - // handle matching packets, which should conform to RFC1035. - NextHopPeering string `json:"nextHopPeering,omitempty"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` - // NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching - // packets. - NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` + // ShareSettings: Specify share-settings to create a shared reservation. + // This property is optional. For more information about the syntax and + // options for this field and its subfields, see the guide for creating + // a shared reservation. + ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // Priority: The priority of this route. Priority is used to break ties - // in cases where there is more than one matching route of equal prefix - // length. In cases where multiple routes have equal prefix length, the - // one with the lowest-numbered priority value wins. The default value - // is `1000`. The priority value must be from `0` to `65535`, inclusive. - Priority int64 `json:"priority,omitempty"` + // SpecificReservation: Reservation for instances with specific machine + // shapes. + SpecificReservation *AllocationSpecificSKUReservation `json:"specificReservation,omitempty"` - // RouteStatus: [Output only] The status of the route. - // - // Possible values: - // "ACTIVE" - This route is processed and active. - // "DROPPED" - The route is dropped due to the VPC exceeding the - // dynamic route limit. For dynamic route limit, please refer to the - // Learned route example - // "INACTIVE" - This route is processed but inactive due to failure - // from the backend. The backend may have rejected the route - // "PENDING" - This route is being processed internally. The status - // will change once processed. - RouteStatus string `json:"routeStatus,omitempty"` + // SpecificReservationRequired: Indicates whether the reservation can be + // consumed by VMs with affinity for "any" reservation. If the field is + // set, then only VMs that target the reservation by name can consume + // from this reservation. + SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - // RouteType: [Output Only] The type of this route, which can be one of - // the following values: - 'TRANSIT' for a transit route that this - // router learned from another Cloud Router and will readvertise to one - // of its BGP peers - 'SUBNET' for a route from a subnet of the VPC - - // 'BGP' for a route learned from a BGP peer of this router - 'STATIC' - // for a static route + // Status: [Output Only] The status of the reservation. // // Possible values: - // "BGP" - // "STATIC" - // "SUBNET" - // "TRANSIT" - RouteType string `json:"routeType,omitempty"` - - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - - // Tags: A list of instance tags to which this route applies. - Tags []string `json:"tags,omitempty"` + // "CREATING" - Resources are being allocated for the reservation. + // "DELETING" - Reservation is currently being deleted. + // "INVALID" + // "READY" - Reservation has allocated all its resources. + // "UPDATING" - Reservation is currently being resized. + Status string `json:"status,omitempty"` - // Warnings: [Output Only] If potential misconfigurations are detected - // for this route, this field will be populated with warning messages. - Warnings []*RouteWarnings `json:"warnings,omitempty"` + // Zone: Zone in which the reservation resides. A zone must be provided + // if the reservation is created within a commitment. + Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AsPaths") to + // ForceSendFields is a list of field names (e.g. "Commitment") 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 @@ -43424,7 +42807,7 @@ type Route struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsPaths") to include in + // NullFields is a list of field names (e.g. "Commitment") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -43433,60 +42816,176 @@ type Route struct { NullFields []string `json:"-"` } -func (s *Route) MarshalJSON() ([]byte, error) { - type NoMethod Route +func (s *Reservation) MarshalJSON() ([]byte, error) { + type NoMethod Reservation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouteWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. +// ReservationAffinity: Specifies the reservations that this instance +// can consume from. +type ReservationAffinity struct { + // ConsumeReservationType: Specifies the type of reservation from which + // this instance can consume resources: ANY_RESERVATION (default), + // SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved + // instances for examples. // // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors + // "ANY_RESERVATION" - Consume any allocation available. + // "NO_RESERVATION" - Do not consume from any allocated capacity. + // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. + // Must specify key value fields for specifying the reservations. + // "SPECIFIC_THEN_ANY_RESERVATION" - Prefer to consume from a specific + // reservation, but still consume any reservation available if the + // specified reservation is not available or exhausted. Must specify key + // value fields for specifying the reservations. + // "UNSPECIFIED" + ConsumeReservationType string `json:"consumeReservationType,omitempty"` + + // Key: Corresponds to the label key of a reservation resource. To + // target a SPECIFIC_RESERVATION by name, specify + // googleapis.com/reservation-name as the key and specify the name of + // your reservation as its value. + Key string `json:"key,omitempty"` + + // Values: Corresponds to the label values of a reservation resource. + // This can be either a name to a reservation in the same project or + // "projects/different-project/reservations/some-reservation-name" to + // target a shared reservation in the same zone but in a different + // project. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ConsumeReservationType") 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. "ConsumeReservationType") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ReservationAffinity) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAffinity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReservationAggregatedList: Contains a list of reservations. +type ReservationAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of Allocation resources. + Items map[string]ReservationsScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *ReservationAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReservationAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReservationAggregatedListWarning: [Output Only] Informational warning +// message. +type ReservationAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource // that requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a @@ -43507,7 +43006,7 @@ type RouteWarnings struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RouteWarningsData `json:"data,omitempty"` + Data []*ReservationAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -43530,13 +43029,13 @@ type RouteWarnings struct { NullFields []string `json:"-"` } -func (s *RouteWarnings) MarshalJSON() ([]byte, error) { - type NoMethod RouteWarnings +func (s *ReservationAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouteWarningsData struct { +type ReservationAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -43567,65 +43066,22 @@ type RouteWarningsData struct { NullFields []string `json:"-"` } -func (s *RouteWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod RouteWarningsData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouteAsPath struct { - // AsLists: [Output Only] The AS numbers of the AS Path. - AsLists []int64 `json:"asLists,omitempty"` - - // PathSegmentType: [Output Only] The type of the AS Path, which can be - // one of the following values: - 'AS_SET': unordered set of autonomous - // systems that the route in has traversed - 'AS_SEQUENCE': ordered set - // of autonomous systems that the route has traversed - - // 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous Systems in the - // local confederation that the route has traversed - 'AS_CONFED_SET': - // unordered set of Member Autonomous Systems in the local confederation - // that the route has traversed - // - // Possible values: - // "AS_CONFED_SEQUENCE" - // "AS_CONFED_SET" - // "AS_SEQUENCE" - // "AS_SET" - PathSegmentType string `json:"pathSegmentType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AsLists") 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. "AsLists") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouteAsPath) MarshalJSON() ([]byte, error) { - type NoMethod RouteAsPath +func (s *ReservationAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ReservationAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouteList: Contains a list of Route resources. -type RouteList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. +type ReservationList struct { + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. Id string `json:"id,omitempty"` - // Items: A list of Route resources. - Items []*Route `json:"items,omitempty"` + // Items: [Output Only] A list of Allocation resources. + Items []*Reservation `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource.Always compute#reservationsList + // for listsof reservations Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -43640,7 +43096,7 @@ type RouteList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *RouteListWarning `json:"warning,omitempty"` + Warning *ReservationListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -43663,14 +43119,14 @@ type RouteList struct { NullFields []string `json:"-"` } -func (s *RouteList) MarshalJSON() ([]byte, error) { - type NoMethod RouteList +func (s *ReservationList) MarshalJSON() ([]byte, error) { + type NoMethod ReservationList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouteListWarning: [Output Only] Informational warning message. -type RouteListWarning struct { +// ReservationListWarning: [Output Only] Informational warning message. +type ReservationListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -43738,7 +43194,7 @@ type RouteListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RouteListWarningData `json:"data,omitempty"` + Data []*ReservationListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -43761,13 +43217,13 @@ type RouteListWarning struct { NullFields []string `json:"-"` } -func (s *RouteListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouteListWarning +func (s *ReservationListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ReservationListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouteListWarningData struct { +type ReservationListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -43798,80 +43254,18 @@ type RouteListWarningData struct { NullFields []string `json:"-"` } -func (s *RouteListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouteListWarningData +func (s *ReservationListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ReservationListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Router: Represents a Cloud Router resource. For more information -// about Cloud Router, read the Cloud Router overview. -type Router struct { - // Bgp: BGP information specific to this router. - Bgp *RouterBgp `json:"bgp,omitempty"` - - // BgpPeers: BGP information that must be configured into the routing - // stack to establish BGP peering. This information must specify the - // peer ASN and either the interface name, IP address, or peer IP - // address. Please refer to RFC4273. - BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EncryptedInterconnectRouter: Indicates if a router is dedicated for - // use with encrypted VLAN attachments (interconnectAttachments). - EncryptedInterconnectRouter bool `json:"encryptedInterconnectRouter,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Interfaces: Router interfaces. Each interface requires either one - // linked resource, (for example, linkedVpnTunnel), or IP address and IP - // address range (for example, ipRange), or both. - Interfaces []*RouterInterface `json:"interfaces,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - - // Md5AuthenticationKeys: Keys used for MD5 authentication. - Md5AuthenticationKeys []*RouterMd5AuthenticationKey `json:"md5AuthenticationKeys,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Nats: A list of NAT services created in this router. - Nats []*RouterNat `json:"nats,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URI of the region where the router resides. You - // must specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +type ReservationsResizeRequest struct { + // SpecificSkuCount: Number of allocated resources can be resized with + // minimum = 1 and maximum = 1000. + SpecificSkuCount int64 `json:"specificSkuCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Bgp") to + // ForceSendFields is a list of field names (e.g. "SpecificSkuCount") 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 @@ -43879,32 +43273,31 @@ type Router struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bgp") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "SpecificSkuCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *Router) MarshalJSON() ([]byte, error) { - type NoMethod Router +func (s *ReservationsResizeRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsResizeRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterAdvertisedIpRange: Description-tagged IP ranges for the router -// to advertise. -type RouterAdvertisedIpRange struct { - // Description: User-specified description for the IP range. - Description string `json:"description,omitempty"` +type ReservationsScopedList struct { + // Reservations: A list of reservations contained in this scope. + Reservations []*Reservation `json:"reservations,omitempty"` - // Range: The IP range to advertise. The value must be a CIDR-formatted - // string. - Range string `json:"range,omitempty"` + // Warning: Informational warning which replaces the list of + // reservations when the list is empty. + Warning *ReservationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "Reservations") 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 @@ -43912,7 +43305,7 @@ type RouterAdvertisedIpRange struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include + // NullFields is a list of field names (e.g. "Reservations") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -43921,71 +43314,15 @@ type RouterAdvertisedIpRange struct { NullFields []string `json:"-"` } -func (s *RouterAdvertisedIpRange) MarshalJSON() ([]byte, error) { - type NoMethod RouterAdvertisedIpRange - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedList: Contains a list of routers. -type RouterAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Router resources. - Items map[string]RoutersScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *RouterAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedList +func (s *ReservationsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterAggregatedListWarning: [Output Only] Informational warning -// message. -type RouterAggregatedListWarning struct { +// ReservationsScopedListWarning: Informational warning which replaces +// the list of reservations when the list is empty. +type ReservationsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -44053,7 +43390,7 @@ type RouterAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RouterAggregatedListWarningData `json:"data,omitempty"` + Data []*ReservationsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -44076,13 +43413,13 @@ type RouterAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *RouterAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedListWarning +func (s *ReservationsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterAggregatedListWarningData struct { +type ReservationsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -44113,57 +43450,37 @@ type RouterAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *RouterAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedListWarningData +func (s *ReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterBgp struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. The options are DEFAULT or CUSTOM. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` +// ResourceCommitment: Commitment for a particular resource (a +// Commitment is composed of one or more of these). +type ResourceCommitment struct { + // AcceleratorType: Name of the accelerator type resource. Applicable + // only when the type is ACCELERATOR. + AcceleratorType string `json:"acceleratorType,omitempty"` - // AdvertisedGroups: User-specified list of prefix groups to advertise - // in custom mode. This field can only be populated if advertise_mode is - // CUSTOM and is advertised to all peers of the router. These groups - // will be advertised in addition to any specified prefixes. Leave this - // field blank to advertise no custom groups. + // Amount: The amount of the resource purchased (in a type-dependent + // unit, such as bytes). For vCPUs, this can just be an integer. For + // memory, this must be provided in MB. Memory must be a multiple of 256 + // MB, with up to 6.5GB of memory per every vCPU. + Amount int64 `json:"amount,omitempty,string"` + + // Type: Type of resource for which this commitment applies. Possible + // values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR. // // Possible values: - // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC - // subnets). - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - - // AdvertisedIpRanges: User-specified list of individual IP ranges to - // advertise in custom mode. This field can only be populated if - // advertise_mode is CUSTOM and is advertised to all peers of the - // router. These IP ranges will be advertised in addition to any - // specified groups. Leave this field blank to advertise no custom IP - // ranges. - AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` - - // Asn: Local BGP Autonomous System Number (ASN). Must be an RFC6996 - // private ASN, either 16-bit or 32-bit. The value will be fixed for - // this router resource. All VPN tunnels that link to this router will - // have the same local ASN. - Asn int64 `json:"asn,omitempty"` - - // KeepaliveInterval: The interval in seconds between BGP keepalive - // messages that are sent to the peer. Hold time is three times the - // interval at which keepalive messages are sent, and the hold time is - // the maximum number of seconds allowed to elapse between successive - // keepalive messages that BGP receives from a peer. BGP will use the - // smaller of either the local hold time value or the peer's hold time - // value as the hold time for the BGP connection between the two peers. - // If set, this value must be between 20 and 60. The default is 20. - KeepaliveInterval int64 `json:"keepaliveInterval,omitempty"` + // "ACCELERATOR" + // "LOCAL_SSD" + // "MEMORY" + // "UNSPECIFIED" + // "VCPU" + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to + // ForceSendFields is a list of field names (e.g. "AcceleratorType") 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 @@ -44171,151 +43488,28 @@ type RouterBgp struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertiseMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AcceleratorType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *RouterBgp) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgp +func (s *ResourceCommitment) MarshalJSON() ([]byte, error) { + type NoMethod ResourceCommitment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterBgpPeer struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` - - // AdvertisedGroups: User-specified list of prefix groups to advertise - // in custom mode, which currently supports the following option: - - // ALL_SUBNETS: Advertises all of the router's own VPC subnets. This - // excludes any routes learned for subnets that use VPC Network Peering. - // Note that this field can only be populated if advertise_mode is - // CUSTOM and overrides the list defined for the router (in the "bgp" - // message). These groups are advertised in addition to any specified - // prefixes. Leave this field blank to advertise no custom groups. - // - // Possible values: - // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC - // subnets). - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - - // AdvertisedIpRanges: User-specified list of individual IP ranges to - // advertise in custom mode. This field can only be populated if - // advertise_mode is CUSTOM and overrides the list defined for the - // router (in the "bgp" message). These IP ranges are advertised in - // addition to any specified groups. Leave this field blank to advertise - // no custom IP ranges. - AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` - - // AdvertisedRoutePriority: The priority of routes advertised to this - // BGP peer. Where there is more than one matching route of maximum - // length, the routes with the lowest priority value win. - AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` - - // Bfd: BFD configuration for the BGP peering. - Bfd *RouterBgpPeerBfd `json:"bfd,omitempty"` - - // CustomLearnedIpRanges: A list of user-defined custom learned route IP - // address ranges for a BGP session. - CustomLearnedIpRanges []*RouterBgpPeerCustomLearnedIpRange `json:"customLearnedIpRanges,omitempty"` - - // CustomLearnedRoutePriority: The user-defined custom learned route - // priority for a BGP session. This value is applied to all custom - // learned route ranges for the session. You can choose a value from `0` - // to `65335`. If you don't provide a value, Google Cloud assigns a - // priority of `100` to the ranges. - CustomLearnedRoutePriority int64 `json:"customLearnedRoutePriority,omitempty"` - - // Enable: The status of the BGP peer connection. If set to FALSE, any - // active session with the peer is terminated and all associated routing - // information is removed. If set to TRUE, the peer connection can be - // established with routing information. The default is TRUE. - // - // Possible values: - // "FALSE" - // "TRUE" - Enable string `json:"enable,omitempty"` - - // EnableIpv6: Enable IPv6 traffic over BGP Peer. If not specified, it - // is disabled by default. - EnableIpv6 bool `json:"enableIpv6,omitempty"` - - // InterfaceName: Name of the interface the BGP peer is associated with. - InterfaceName string `json:"interfaceName,omitempty"` - - // IpAddress: IP address of the interface inside Google Cloud Platform. - // Only IPv4 is supported. - IpAddress string `json:"ipAddress,omitempty"` - - // Ipv6NexthopAddress: IPv6 address of the interface inside Google Cloud - // Platform. - Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` - - // ManagementType: [Output Only] The resource that configures and - // manages this BGP peer. - MANAGED_BY_USER is the default value and can - // be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP - // peer that is configured and managed by Cloud Interconnect, - // specifically by an InterconnectAttachment of type PARTNER. Google - // automatically creates, updates, and deletes this type of BGP peer - // when the PARTNER InterconnectAttachment is created, updated, or - // deleted. - // - // Possible values: - // "MANAGED_BY_ATTACHMENT" - The BGP peer is automatically created for - // PARTNER type InterconnectAttachment; Google will automatically - // create/delete this BGP peer when the PARTNER InterconnectAttachment - // is created/deleted, and Google will update the ipAddress and - // peerIpAddress when the PARTNER InterconnectAttachment is provisioned. - // This type of BGP peer cannot be created or deleted, but can be - // modified for all fields except for name, ipAddress and peerIpAddress. - // "MANAGED_BY_USER" - Default value, the BGP peer is manually created - // and managed by user. - ManagementType string `json:"managementType,omitempty"` - - // Md5AuthenticationKeyName: Present if MD5 authentication is enabled - // for the peering. Must be the name of one of the entries in the - // Router.md5_authentication_keys. The field must comply with RFC1035. - Md5AuthenticationKeyName string `json:"md5AuthenticationKeyName,omitempty"` - - // Name: Name of this BGP peer. The name must be 1-63 characters long, - // and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` - - // PeerAsn: Peer BGP Autonomous System Number (ASN). Each BGP interface - // may use a different value. - PeerAsn int64 `json:"peerAsn,omitempty"` - - // PeerIpAddress: IP address of the BGP interface outside Google Cloud - // Platform. Only IPv4 is supported. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // PeerIpv6NexthopAddress: IPv6 address of the BGP interface outside - // Google Cloud Platform. - PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` - - // RouterApplianceInstance: URI of the VM instance that is used as - // third-party router appliances such as Next Gen Firewalls, Virtual - // Routers, or Router Appliances. The VM instance must be located in - // zones contained in the same region as this Cloud Router. The VM - // instance is the peer side of the BGP session. - RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` +type ResourceGroupReference struct { + // Group: A URI referencing one of the instance groups or network + // endpoint groups listed in the backend service. + Group string `json:"group,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to + // ForceSendFields is a list of field names (e.g. "Group") 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 @@ -44323,64 +43517,38 @@ type RouterBgpPeer struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertiseMode") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Group") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeer +func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { + type NoMethod ResourceGroupReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterBgpPeerBfd struct { - // MinReceiveInterval: The minimum interval, in milliseconds, between - // BFD control packets received from the peer router. The actual value - // is negotiated between the two routers and is equal to the greater of - // this value and the transmit interval of the other router. If set, - // this value must be between 1000 and 30000. The default is 1000. - MinReceiveInterval int64 `json:"minReceiveInterval,omitempty"` - - // MinTransmitInterval: The minimum interval, in milliseconds, between - // BFD control packets transmitted to the peer router. The actual value - // is negotiated between the two routers and is equal to the greater of - // this value and the corresponding receive interval of the other - // router. If set, this value must be between 1000 and 30000. The - // default is 1000. - MinTransmitInterval int64 `json:"minTransmitInterval,omitempty"` - - // Multiplier: The number of consecutive BFD packets that must be missed - // before BFD declares that a peer is unavailable. If set, the value - // must be a value between 5 and 16. The default is 5. - Multiplier int64 `json:"multiplier,omitempty"` +type ResourcePoliciesScopedList struct { + // ResourcePolicies: A list of resourcePolicies contained in this scope. + ResourcePolicies []*ResourcePolicy `json:"resourcePolicies,omitempty"` - // SessionInitializationMode: The BFD session initialization mode for - // this BGP peer. If set to ACTIVE, the Cloud Router will initiate the - // BFD session for this BGP peer. If set to PASSIVE, the Cloud Router - // will wait for the peer router to initiate the BFD session for this - // BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The - // default is DISABLED. - // - // Possible values: - // "ACTIVE" - // "DISABLED" - // "PASSIVE" - SessionInitializationMode string `json:"sessionInitializationMode,omitempty"` + // Warning: Informational warning which replaces the list of + // resourcePolicies when the list is empty. + Warning *ResourcePoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinReceiveInterval") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ResourcePolicies") 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. "MinReceiveInterval") to + // NullFields is a list of field names (e.g. "ResourcePolicies") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -44390,20 +43558,89 @@ type RouterBgpPeerBfd struct { NullFields []string `json:"-"` } -func (s *RouterBgpPeerBfd) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeerBfd +func (s *ResourcePoliciesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePoliciesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterBgpPeerCustomLearnedIpRange struct { - // Range: The custom learned route IP address range. Must be a valid - // CIDR-formatted prefix. If an IP address is provided without a subnet - // mask, it is interpreted as, for IPv4, a `/32` singular IP address - // range, and, for IPv6, `/128`. - Range string `json:"range,omitempty"` +// ResourcePoliciesScopedListWarning: Informational warning which +// replaces the list of resourcePolicies when the list is empty. +type ResourcePoliciesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // ForceSendFields is a list of field names (e.g. "Range") to + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*ResourcePoliciesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -44411,7 +43648,7 @@ type RouterBgpPeerCustomLearnedIpRange struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Range") to include in API + // NullFields is a list of field names (e.g. "Code") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -44420,52 +43657,82 @@ type RouterBgpPeerCustomLearnedIpRange struct { NullFields []string `json:"-"` } -func (s *RouterBgpPeerCustomLearnedIpRange) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeerCustomLearnedIpRange +func (s *ResourcePoliciesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePoliciesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterInterface struct { - // IpRange: IP address and range of the interface. The IP range must be - // in the RFC3927 link-local IP address space. The value must be a - // CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not - // truncate the address as it represents the IP address of the - // interface. - IpRange string `json:"ipRange,omitempty"` +type ResourcePoliciesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // LinkedInterconnectAttachment: URI of the linked Interconnect - // attachment. It must be in the same region as the router. Each - // interface can have one linked resource, which can be a VPN tunnel, an - // Interconnect attachment, or a virtual machine instance. - LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // LinkedVpnTunnel: URI of the linked VPN tunnel, which must be in the - // same region as the router. Each interface can have one linked - // resource, which can be a VPN tunnel, an Interconnect attachment, or a - // virtual machine instance. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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:"-"` - // ManagementType: [Output Only] The resource that configures and - // manages this interface. - MANAGED_BY_USER is the default value and - // can be managed directly by users. - MANAGED_BY_ATTACHMENT is an - // interface that is configured and managed by Cloud Interconnect, - // specifically, by an InterconnectAttachment of type PARTNER. Google - // automatically creates, updates, and deletes this type of interface - // when the PARTNER InterconnectAttachment is created, updated, or - // deleted. - // - // Possible values: - // "MANAGED_BY_ATTACHMENT" - The interface is automatically created - // for PARTNER type InterconnectAttachment, Google will automatically - // create/update/delete this interface when the PARTNER - // InterconnectAttachment is created/provisioned/deleted. This type of - // interface cannot be manually managed by user. - // "MANAGED_BY_USER" - Default value, the interface is manually - // created and managed by user. - ManagementType string `json:"managementType,omitempty"` + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Name: Name of this interface entry. The name must be 1-63 characters +func (s *ResourcePoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePoliciesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourcePolicy: Represents a Resource Policy resource. You can use +// resource policies to schedule actions for some Compute Engine +// resources. For example, you can use them to schedule persistent disk +// snapshots. +type ResourcePolicy struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + Description string `json:"description,omitempty"` + + // DiskConsistencyGroupPolicy: Resource policy for disk consistency + // groups. + DiskConsistencyGroupPolicy *ResourcePolicyDiskConsistencyGroupPolicy `json:"diskConsistencyGroupPolicy,omitempty"` + + // GroupPlacementPolicy: Resource policy for instances for placement + // configuration. + GroupPlacementPolicy *ResourcePolicyGroupPlacementPolicy `json:"groupPlacementPolicy,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // InstanceSchedulePolicy: Resource policy for scheduling instance + // operations. + InstanceSchedulePolicy *ResourcePolicyInstanceSchedulePolicy `json:"instanceSchedulePolicy,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#resource_policies for resource policies. + Kind string `json:"kind,omitempty"` + + // Name: The name of the resource, provided by the client when initially + // creating the resource. The resource name must be 1-63 characters // long, and comply with RFC1035. Specifically, the name must be 1-63 // characters long and match the regular expression // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be @@ -44474,67 +43741,70 @@ type RouterInterface struct { // be a dash. Name string `json:"name,omitempty"` - // PrivateIpAddress: The regional private internal IP address that is - // used to establish BGP sessions to a VM instance acting as a - // third-party Router Appliance, such as a Next Gen Firewall, a Virtual - // Router, or an SD-WAN VM. - PrivateIpAddress string `json:"privateIpAddress,omitempty"` + Region string `json:"region,omitempty"` - // RedundantInterface: Name of the interface that will be redundant with - // the current interface you are creating. The redundantInterface must - // belong to the same Cloud Router as the interface here. To establish - // the BGP session to a Router Appliance VM, you must create two BGP - // peers. The two BGP peers must be attached to two separate interfaces - // that are redundant with each other. The redundant_interface must be - // 1-63 characters long, and comply with RFC1035. Specifically, the - // redundant_interface must be 1-63 characters long and match the - // regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters - // must be a dash, lowercase letter, or digit, except the last - // character, which cannot be a dash. - RedundantInterface string `json:"redundantInterface,omitempty"` + // ResourceStatus: [Output Only] The system status of the resource + // policy. + ResourceStatus *ResourcePolicyResourceStatus `json:"resourceStatus,omitempty"` - // Subnetwork: The URI of the subnetwork resource that this interface - // belongs to, which must be in the same region as the Cloud Router. - // When you establish a BGP session to a VM instance using this - // interface, the VM instance must belong to the same subnetwork as the - // subnetwork specified here. - Subnetwork string `json:"subnetwork,omitempty"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpRange") to - // unconditionally include in API requests. By default, fields with + // SnapshotSchedulePolicy: Resource policy for persistent disks for + // creating snapshots. + SnapshotSchedulePolicy *ResourcePolicySnapshotSchedulePolicy `json:"snapshotSchedulePolicy,omitempty"` + + // Status: [Output Only] The status of resource policy creation. + // + // Possible values: + // "CREATING" - Resource policy is being created. + // "DELETING" - Resource policy is being deleted. + // "EXPIRED" - Resource policy is expired and will not run again. + // "INVALID" + // "READY" - Resource policy is ready to be used. + Status string `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // 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. "IpRange") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *RouterInterface) MarshalJSON() ([]byte, error) { - type NoMethod RouterInterface +func (s *ResourcePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterList: Contains a list of Router resources. -type RouterList struct { +// ResourcePolicyAggregatedList: Contains a list of resourcePolicies. +type ResourcePolicyAggregatedList struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of Router resources. - Items []*Router `json:"items,omitempty"` + // Items: A list of ResourcePolicy resources. + Items map[string]ResourcePoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -44548,14 +43818,17 @@ type RouterList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *RouterListWarning `json:"warning,omitempty"` + Warning *ResourcePolicyAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -44563,7 +43836,7 @@ type RouterList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Etag") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -44572,14 +43845,15 @@ type RouterList struct { NullFields []string `json:"-"` } -func (s *RouterList) MarshalJSON() ([]byte, error) { - type NoMethod RouterList +func (s *ResourcePolicyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterListWarning: [Output Only] Informational warning message. -type RouterListWarning struct { +// ResourcePolicyAggregatedListWarning: [Output Only] Informational +// warning message. +type ResourcePolicyAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -44647,7 +43921,7 @@ type RouterListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RouterListWarningData `json:"data,omitempty"` + Data []*ResourcePolicyAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -44670,13 +43944,13 @@ type RouterListWarning struct { NullFields []string `json:"-"` } -func (s *RouterListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouterListWarning +func (s *ResourcePolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterListWarningData struct { +type ResourcePolicyAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -44707,25 +43981,29 @@ type RouterListWarningData struct { NullFields []string `json:"-"` } -func (s *RouterListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouterListWarningData +func (s *ResourcePolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterMd5AuthenticationKey struct { - // Key: [Input only] Value of the key. For patch and update calls, it - // can be skipped to copy the value from the previous configuration. - // This is allowed if the key with the same name existed before the - // operation. Maximum length is 80 characters. Can only contain - // printable ASCII characters. - Key string `json:"key,omitempty"` - - // Name: Name used to identify the key. Must be unique within a router. - // Must be referenced by at least one bgpPeer. Must comply with RFC1035. - Name string `json:"name,omitempty"` +// ResourcePolicyDailyCycle: Time window specified for daily operations. +type ResourcePolicyDailyCycle struct { + // DaysInCycle: Defines a schedule with units measured in days. The + // value determines how many days pass between the start of each cycle. + DaysInCycle int64 `json:"daysInCycle,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // Duration: [Output only] A predetermined duration for the window, + // automatically chosen to be the smallest possible in the given + // scenario. + Duration string `json:"duration,omitempty"` + + // StartTime: Start time of the window. This must be in UTC format that + // resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For + // example, both 13:00-5 and 08:00 are valid. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DaysInCycle") 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 @@ -44733,206 +44011,92 @@ type RouterMd5AuthenticationKey struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DaysInCycle") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *RouterMd5AuthenticationKey) MarshalJSON() ([]byte, error) { - type NoMethod RouterMd5AuthenticationKey +func (s *ResourcePolicyDailyCycle) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyDailyCycle raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterNat: Represents a Nat resource. It enables the VMs within the -// specified subnetworks to access Internet without external IP -// addresses. It specifies a list of subnetworks (and the ranges within) -// that want to use NAT. Customers can also provide the external IPs -// that would be used for NAT. GCP would auto-allocate ephemeral IPs if -// no external IPs are provided. -type RouterNat struct { - // AutoNetworkTier: The network tier to use when automatically reserving - // IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, - // PREMIUM tier will be used. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for - // all networking products. - // "STANDARD" - Public internet quality, only limited support for - // other networking products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier - // for FIXED_STANDARD when fixed standard tier is expired or not - // configured. - AutoNetworkTier string `json:"autoNetworkTier,omitempty"` - - // DrainNatIps: A list of URLs of the IP resources to be drained. These - // IPs must be valid static external IPs that have been assigned to the - // NAT. These IPs should be used for updating/patching a NAT only. - DrainNatIps []string `json:"drainNatIps,omitempty"` - - // EnableDynamicPortAllocation: Enable Dynamic Port Allocation. If not - // specified, it is disabled by default. If set to true, - Dynamic Port - // Allocation will be enabled on this NAT config. - - // enableEndpointIndependentMapping cannot be set to true. - If minPorts - // is set, minPortsPerVm must be set to a power of two greater than or - // equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will - // be allocated to a VM from this NAT config. - EnableDynamicPortAllocation bool `json:"enableDynamicPortAllocation,omitempty"` +// ResourcePolicyDiskConsistencyGroupPolicy: Resource policy for disk +// consistency groups. +type ResourcePolicyDiskConsistencyGroupPolicy struct { +} - EnableEndpointIndependentMapping bool `json:"enableEndpointIndependentMapping,omitempty"` +// ResourcePolicyGroupPlacementPolicy: A GroupPlacementPolicy specifies +// resource placement configuration. It specifies the failure bucket +// separation as well as network locality +type ResourcePolicyGroupPlacementPolicy struct { + // AvailabilityDomainCount: The number of availability domains to spread + // instances across. If two instances are in different availability + // domain, they are not in the same low latency network. + AvailabilityDomainCount int64 `json:"availabilityDomainCount,omitempty"` - // EndpointTypes: List of NAT-ted endpoint types supported by the Nat - // Gateway. If the list is empty, then it will be equivalent to include - // ENDPOINT_TYPE_VM + // Collocation: Specifies network collocation // // Possible values: - // "ENDPOINT_TYPE_SWG" - This is used for Secure Web Gateway - // endpoints. - // "ENDPOINT_TYPE_VM" - This is the default. - EndpointTypes []string `json:"endpointTypes,omitempty"` - - // IcmpIdleTimeoutSec: Timeout (in seconds) for ICMP connections. - // Defaults to 30s if not set. - IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` - - // LogConfig: Configure logging on this NAT. - LogConfig *RouterNatLogConfig `json:"logConfig,omitempty"` - - // MaxPortsPerVm: Maximum number of ports allocated to a VM from this - // NAT config when Dynamic Port Allocation is enabled. If Dynamic Port - // Allocation is not enabled, this field has no effect. If Dynamic Port - // Allocation is enabled, and this field is set, it must be set to a - // power of two greater than minPortsPerVm, or 64 if minPortsPerVm is - // not set. If Dynamic Port Allocation is enabled and this field is not - // set, a maximum of 65536 ports will be allocated to a VM from this NAT - // config. - MaxPortsPerVm int64 `json:"maxPortsPerVm,omitempty"` - - // MinPortsPerVm: Minimum number of ports allocated to a VM from this - // NAT config. If not set, a default number of ports is allocated to a - // VM. This is rounded up to the nearest power of 2. For example, if the - // value of this field is 50, at least 64 ports are allocated to a VM. - MinPortsPerVm int64 `json:"minPortsPerVm,omitempty"` + // "COLLOCATED" + // "UNSPECIFIED_COLLOCATION" + Collocation string `json:"collocation,omitempty"` - // Name: Unique name of this Nat service. The name must be 1-63 - // characters long and comply with RFC1035. - Name string `json:"name,omitempty"` + // MaxDistance: Specifies the number of max logical switches. + MaxDistance int64 `json:"maxDistance,omitempty"` - // NatIpAllocateOption: Specify the NatIpAllocateOption, which can take - // one of the following values: - MANUAL_ONLY: Uses only Nat IP - // addresses provided by customers. When there are not enough specified - // Nat IPs, the Nat service fails for new VMs. - AUTO_ONLY: Nat IPs are - // allocated by Google Cloud Platform; customers can't specify any Nat - // IPs. When choosing AUTO_ONLY, then nat_ip should be empty. - // - // Possible values: - // "AUTO_ONLY" - Nat IPs are allocated by GCP; customers can not - // specify any Nat IPs. - // "MANUAL_ONLY" - Only use Nat IPs provided by customers. When - // specified Nat IPs are not enough then the Nat service fails for new + // VmCount: Number of VMs in this placement group. Google does not + // recommend that you use this field unless you use a compact policy and + // you want your policy to work only if it contains this exact number of // VMs. - NatIpAllocateOption string `json:"natIpAllocateOption,omitempty"` - - // NatIps: A list of URLs of the IP resources used for this Nat service. - // These IP addresses must be valid static external IP addresses - // assigned to the project. - NatIps []string `json:"natIps,omitempty"` - - // Rules: A list of rules associated with this NAT. - Rules []*RouterNatRule `json:"rules,omitempty"` - - // SourceSubnetworkIpRangesToNat: Specify the Nat option, which can take - // one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of - // the IP ranges in every Subnetwork are allowed to Nat. - - // ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges - // in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list - // of Subnetworks are allowed to Nat (specified in the field subnetwork - // below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. - // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or - // ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any - // other Router.Nat section in any Router for this network in this - // region. - // - // Possible values: - // "ALL_SUBNETWORKS_ALL_IP_RANGES" - All the IP ranges in every - // Subnetwork are allowed to Nat. - // "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES" - All the primary IP ranges - // in every Subnetwork are allowed to Nat. - // "LIST_OF_SUBNETWORKS" - A list of Subnetworks are allowed to Nat - // (specified in the field subnetwork below) - SourceSubnetworkIpRangesToNat string `json:"sourceSubnetworkIpRangesToNat,omitempty"` - - // Subnetworks: A list of Subnetwork resources whose traffic should be - // translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS - // is selected for the SubnetworkIpRangeToNatOption above. - Subnetworks []*RouterNatSubnetworkToNat `json:"subnetworks,omitempty"` - - // TcpEstablishedIdleTimeoutSec: Timeout (in seconds) for TCP - // established connections. Defaults to 1200s if not set. - TcpEstablishedIdleTimeoutSec int64 `json:"tcpEstablishedIdleTimeoutSec,omitempty"` - - // TcpTimeWaitTimeoutSec: Timeout (in seconds) for TCP connections that - // are in TIME_WAIT state. Defaults to 120s if not set. - TcpTimeWaitTimeoutSec int64 `json:"tcpTimeWaitTimeoutSec,omitempty"` - - // TcpTransitoryIdleTimeoutSec: Timeout (in seconds) for TCP transitory - // connections. Defaults to 30s if not set. - TcpTransitoryIdleTimeoutSec int64 `json:"tcpTransitoryIdleTimeoutSec,omitempty"` - - // UdpIdleTimeoutSec: Timeout (in seconds) for UDP connections. Defaults - // to 30s if not set. - UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` + VmCount int64 `json:"vmCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoNetworkTier") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AvailabilityDomainCount") 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. "AutoNetworkTier") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "AvailabilityDomainCount") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *RouterNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNat +func (s *ResourcePolicyGroupPlacementPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyGroupPlacementPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterNatLogConfig: Configuration of logging on a NAT. -type RouterNatLogConfig struct { - // Enable: Indicates whether or not to export logs. This is false by - // default. - Enable bool `json:"enable,omitempty"` +// ResourcePolicyHourlyCycle: Time window specified for hourly +// operations. +type ResourcePolicyHourlyCycle struct { + // Duration: [Output only] Duration of the time window, automatically + // chosen to be smallest possible in the given scenario. + Duration string `json:"duration,omitempty"` - // Filter: Specify the desired filtering of logs on this NAT. If - // unspecified, logs are exported for all connections handled by this - // NAT. This option can take one of the following values: - ERRORS_ONLY: - // Export logs only for connection failures. - TRANSLATIONS_ONLY: Export - // logs only for successful connections. - ALL: Export logs for all - // connections, successful and unsuccessful. - // - // Possible values: - // "ALL" - Export logs for all (successful and unsuccessful) - // connections. - // "ERRORS_ONLY" - Export logs for connection failures only. - // "TRANSLATIONS_ONLY" - Export logs for successful connections only. - Filter string `json:"filter,omitempty"` + // HoursInCycle: Defines a schedule with units measured in hours. The + // value determines how many hours pass between the start of each cycle. + HoursInCycle int64 `json:"hoursInCycle,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to + // StartTime: Time within the window to start the operations. It must be + // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Duration") 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 @@ -44940,8 +44104,8 @@ type RouterNatLogConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Duration") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -44949,80 +44113,44 @@ type RouterNatLogConfig struct { NullFields []string `json:"-"` } -func (s *RouterNatLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatLogConfig +func (s *ResourcePolicyHourlyCycle) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyHourlyCycle raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterNatRule struct { - // Action: The action to be enforced for traffic that matches this rule. - Action *RouterNatRuleAction `json:"action,omitempty"` - - // Description: An optional description of this rule. - Description string `json:"description,omitempty"` - - // Match: CEL expression that specifies the match condition that egress - // traffic from a VM is evaluated against. If it evaluates to true, the - // corresponding `action` is enforced. The following examples are valid - // match expressions for public NAT: "inIpRange(destination.ip, - // '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')" - // "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'" The - // following example is a valid match expression for private NAT: - // "nexthop.hub == - // 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-proje - // ct/global/hub/hub-1'" - Match string `json:"match,omitempty"` - - // RuleNumber: An integer uniquely identifying a rule in the list. The - // rule number must be a positive value between 0 and 65000, and must be - // unique among rules within a NAT. - RuleNumber int64 `json:"ruleNumber,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") 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:"-"` +// ResourcePolicyInstanceSchedulePolicy: An InstanceSchedulePolicy +// specifies when and how frequent certain operations are performed on +// the instance. +type ResourcePolicyInstanceSchedulePolicy struct { + // ExpirationTime: The expiration time of the schedule. The timestamp is + // an RFC3339 string. + ExpirationTime string `json:"expirationTime,omitempty"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // StartTime: The start time of the schedule. The timestamp is an + // RFC3339 string. + StartTime string `json:"startTime,omitempty"` -func (s *RouterNatRule) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // TimeZone: Specifies the time zone to be used in interpreting + // Schedule.schedule. The value of this field must be a time zone name + // from the tz database: https://wikipedia.org/wiki/Tz_database. + TimeZone string `json:"timeZone,omitempty"` -type RouterNatRuleAction struct { - // SourceNatActiveIps: A list of URLs of the IP resources used for this - // NAT rule. These IP addresses must be valid static external IP - // addresses assigned to the project. This field is used for public NAT. - SourceNatActiveIps []string `json:"sourceNatActiveIps,omitempty"` + // VmStartSchedule: Specifies the schedule for starting instances. + VmStartSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStartSchedule,omitempty"` - // SourceNatDrainIps: A list of URLs of the IP resources to be drained. - // These IPs must be valid static external IPs that have been assigned - // to the NAT. These IPs should be used for updating/patching a NAT rule - // only. This field is used for public NAT. - SourceNatDrainIps []string `json:"sourceNatDrainIps,omitempty"` + // VmStopSchedule: Specifies the schedule for stopping instances. + VmStopSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStopSchedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceNatActiveIps") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExpirationTime") 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. "SourceNatActiveIps") to + // NullFields is a list of field names (e.g. "ExpirationTime") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -45032,76 +44160,20 @@ type RouterNatRuleAction struct { NullFields []string `json:"-"` } -func (s *RouterNatRuleAction) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatRuleAction - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterNatSubnetworkToNat: Defines the IP ranges that want to use NAT -// for a subnetwork. -type RouterNatSubnetworkToNat struct { - // Name: URL for the subnetwork resource that will use NAT. - Name string `json:"name,omitempty"` - - // SecondaryIpRangeNames: A list of the secondary ranges of the - // Subnetwork that are allowed to use NAT. This can be populated only if - // "LIST_OF_SECONDARY_IP_RANGES" is one of the values in - // source_ip_ranges_to_nat. - SecondaryIpRangeNames []string `json:"secondaryIpRangeNames,omitempty"` - - // SourceIpRangesToNat: Specify the options for NAT ranges in the - // Subnetwork. All options of a single value are valid except - // NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple - // values is: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] - // Default: [ALL_IP_RANGES] - // - // Possible values: - // "ALL_IP_RANGES" - The primary and all the secondary ranges are - // allowed to Nat. - // "LIST_OF_SECONDARY_IP_RANGES" - A list of secondary ranges are - // allowed to Nat. - // "PRIMARY_IP_RANGE" - The primary range is allowed to Nat. - SourceIpRangesToNat []string `json:"sourceIpRangesToNat,omitempty"` - - // 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 *RouterNatSubnetworkToNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatSubnetworkToNat +func (s *ResourcePolicyInstanceSchedulePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyInstanceSchedulePolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RouterStatus struct { - // BestRoutes: Best routes for this router's network. - BestRoutes []*Route `json:"bestRoutes,omitempty"` - - // BestRoutesForRouter: Best routes learned by this router. - BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` - - BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` - - NatStatus []*RouterStatusNatStatus `json:"natStatus,omitempty"` - - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` +// ResourcePolicyInstanceSchedulePolicySchedule: Schedule for an +// instance operation. +type ResourcePolicyInstanceSchedulePolicySchedule struct { + // Schedule: Specifies the frequency for the operation, using the + // unix-cron format. + Schedule string `json:"schedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "BestRoutes") to + // ForceSendFields is a list of field names (e.g. "Schedule") 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 @@ -45109,7 +44181,7 @@ type RouterStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BestRoutes") to include in + // NullFields is a list of field names (e.g. "Schedule") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -45118,286 +44190,45 @@ type RouterStatus struct { NullFields []string `json:"-"` } -func (s *RouterStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RouterStatusBgpPeerStatus struct { - // AdvertisedRoutes: Routes that were advertised to the remote BGP peer - AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` - - BfdStatus *BfdStatus `json:"bfdStatus,omitempty"` - - // EnableIpv6: Enable IPv6 traffic over BGP Peer. If not specified, it - // is disabled by default. - EnableIpv6 bool `json:"enableIpv6,omitempty"` - - // IpAddress: IP address of the local BGP interface. - IpAddress string `json:"ipAddress,omitempty"` - - // Ipv6NexthopAddress: IPv6 address of the local BGP interface. - Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` - - // LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - - // Md5AuthEnabled: Informs whether MD5 authentication is enabled on this - // BGP peer. - Md5AuthEnabled bool `json:"md5AuthEnabled,omitempty"` - - // Name: Name of this BGP peer. Unique within the Routers resource. - Name string `json:"name,omitempty"` - - // NumLearnedRoutes: Number of routes learned from the remote BGP Peer. - NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"` - - // PeerIpAddress: IP address of the remote BGP interface. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - - // PeerIpv6NexthopAddress: IPv6 address of the remote BGP interface. - PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` - - // RouterApplianceInstance: [Output only] URI of the VM instance that is - // used as third-party router appliances such as Next Gen Firewalls, - // Virtual Routers, or Router Appliances. The VM instance is the peer - // side of the BGP session. - RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` - - // State: The state of the BGP session. For a list of possible values - // for this field, see BGP session states. - State string `json:"state,omitempty"` - - // Status: Status of the BGP peer: {UP, DOWN} - // - // Possible values: - // "DOWN" - // "UNKNOWN" - // "UP" - Status string `json:"status,omitempty"` - - // StatusReason: Indicates why particular status was returned. - // - // Possible values: - // "MD5_AUTH_INTERNAL_PROBLEM" - Indicates internal problems with - // configuration of MD5 authentication. This particular reason can only - // be returned when md5AuthEnabled is true and status is DOWN. - // "STATUS_REASON_UNSPECIFIED" - StatusReason string `json:"statusReason,omitempty"` - - // Uptime: Time this session has been up. Format: 14 years, 51 weeks, 6 - // days, 23 hours, 59 minutes, 59 seconds - Uptime string `json:"uptime,omitempty"` - - // UptimeSeconds: Time this session has been up, in seconds. Format: 145 - UptimeSeconds string `json:"uptimeSeconds,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") 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. "AdvertisedRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusBgpPeerStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RouterStatusNatStatus: Status of a NAT contained in this router. -type RouterStatusNatStatus struct { - // AutoAllocatedNatIps: A list of IPs auto-allocated for NAT. Example: - // ["1.1.1.1", "129.2.16.89"] - AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` - - // DrainAutoAllocatedNatIps: A list of IPs auto-allocated for NAT that - // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. - DrainAutoAllocatedNatIps []string `json:"drainAutoAllocatedNatIps,omitempty"` - - // DrainUserAllocatedNatIps: A list of IPs user-allocated for NAT that - // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. - DrainUserAllocatedNatIps []string `json:"drainUserAllocatedNatIps,omitempty"` - - // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will - // be greater than 0 only if user-specified IPs are NOT enough to allow - // all configured VMs to use NAT. This value is meaningful only when - // auto-allocation of NAT IPs is *not* used. - MinExtraNatIpsNeeded int64 `json:"minExtraNatIpsNeeded,omitempty"` - - // Name: Unique name of this NAT. - Name string `json:"name,omitempty"` - - // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., Nics) - // that can use NAT. - NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - - // RuleStatus: Status of rules in this NAT. - RuleStatus []*RouterStatusNatStatusNatRuleStatus `json:"ruleStatus,omitempty"` - - // UserAllocatedNatIpResources: A list of fully qualified URLs of - // reserved IP address resources. - UserAllocatedNatIpResources []string `json:"userAllocatedNatIpResources,omitempty"` - - // UserAllocatedNatIps: A list of IPs user-allocated for NAT. They will - // be raw IP strings like "179.12.26.133". - UserAllocatedNatIps []string `json:"userAllocatedNatIps,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AutoAllocatedNatIps") - // 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. "AutoAllocatedNatIps") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *RouterStatusNatStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusNatStatus +func (s *ResourcePolicyInstanceSchedulePolicySchedule) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyInstanceSchedulePolicySchedule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterStatusNatStatusNatRuleStatus: Status of a NAT Rule contained in -// this NAT. -type RouterStatusNatStatusNatRuleStatus struct { - // ActiveNatIps: A list of active IPs for NAT. Example: ["1.1.1.1", - // "179.12.26.133"]. - ActiveNatIps []string `json:"activeNatIps,omitempty"` - - // DrainNatIps: A list of IPs for NAT that are in drain mode. Example: - // ["1.1.1.1", "179.12.26.133"]. - DrainNatIps []string `json:"drainNatIps,omitempty"` - - // MinExtraIpsNeeded: The number of extra IPs to allocate. This will be - // greater than 0 only if the existing IPs in this NAT Rule are NOT - // enough to allow all configured VMs to use NAT. - MinExtraIpsNeeded int64 `json:"minExtraIpsNeeded,omitempty"` - - // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., NICs) - // that have NAT Mappings from this NAT Rule. - NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - - // RuleNumber: Rule number of the rule. - RuleNumber int64 `json:"ruleNumber,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActiveNatIps") 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:"-"` +type ResourcePolicyList struct { + Etag string `json:"etag,omitempty"` - // NullFields is a list of field names (e.g. "ActiveNatIps") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` -func (s *RouterStatusNatStatusNatRuleStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusNatStatusNatRuleStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Items: [Output Only] A list of ResourcePolicy resources. + Items []*ResourcePolicy `json:"items,omitempty"` -type RouterStatusResponse struct { - // Kind: Type of resource. + // Kind: [Output Only] Type of resource.Always + // compute#resourcePoliciesList for listsof resourcePolicies Kind string `json:"kind,omitempty"` - Result *RouterStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` -func (s *RouterStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` -type RoutersPreviewResponse struct { - // Resource: Preview of given router. - Resource *Router `json:"resource,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *ResourcePolicyListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Resource") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RoutersPreviewResponse) MarshalJSON() ([]byte, error) { - type NoMethod RoutersPreviewResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RoutersScopedList struct { - // Routers: A list of routers contained in this scope. - Routers []*Router `json:"routers,omitempty"` - - // Warning: Informational warning which replaces the list of routers - // when the list is empty. - Warning *RoutersScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Routers") to + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -45405,8 +44236,8 @@ type RoutersScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Routers") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -45414,15 +44245,15 @@ type RoutersScopedList struct { NullFields []string `json:"-"` } -func (s *RoutersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedList +func (s *ResourcePolicyList) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RoutersScopedListWarning: Informational warning which replaces the -// list of routers when the list is empty. -type RoutersScopedListWarning struct { +// ResourcePolicyListWarning: [Output Only] Informational warning +// message. +type ResourcePolicyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -45490,7 +44321,7 @@ type RoutersScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*RoutersScopedListWarningData `json:"data,omitempty"` + Data []*ResourcePolicyListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -45513,13 +44344,13 @@ type RoutersScopedListWarning struct { NullFields []string `json:"-"` } -func (s *RoutersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedListWarning +func (s *ResourcePolicyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type RoutersScopedListWarningData struct { +type ResourcePolicyListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -45550,45 +44381,58 @@ type RoutersScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *RoutersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedListWarningData +func (s *ResourcePolicyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Rule: This is deprecated and has no effect. Do not use. -type Rule struct { - // Action: This is deprecated and has no effect. Do not use. - // - // Possible values: - // "ALLOW" - This is deprecated and has no effect. Do not use. - // "ALLOW_WITH_LOG" - This is deprecated and has no effect. Do not - // use. - // "DENY" - This is deprecated and has no effect. Do not use. - // "DENY_WITH_LOG" - This is deprecated and has no effect. Do not use. - // "LOG" - This is deprecated and has no effect. Do not use. - // "NO_ACTION" - This is deprecated and has no effect. Do not use. - Action string `json:"action,omitempty"` - - // Conditions: This is deprecated and has no effect. Do not use. - Conditions []*Condition `json:"conditions,omitempty"` +// ResourcePolicyResourceStatus: Contains output only fields. Use this +// sub-message for all output fields set on ResourcePolicy. The internal +// structure of this "status" field should mimic the structure of +// ResourcePolicy proto specification. +type ResourcePolicyResourceStatus struct { + // InstanceSchedulePolicy: [Output Only] Specifies a set of output + // values reffering to the instance_schedule_policy system status. This + // field should have the same name as corresponding policy field. + InstanceSchedulePolicy *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus `json:"instanceSchedulePolicy,omitempty"` - // Description: This is deprecated and has no effect. Do not use. - Description string `json:"description,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "InstanceSchedulePolicy") 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:"-"` - // Ins: This is deprecated and has no effect. Do not use. - Ins []string `json:"ins,omitempty"` + // NullFields is a list of field names (e.g. "InstanceSchedulePolicy") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // LogConfigs: This is deprecated and has no effect. Do not use. - LogConfigs []*LogConfig `json:"logConfigs,omitempty"` +func (s *ResourcePolicyResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyResourceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // NotIns: This is deprecated and has no effect. Do not use. - NotIns []string `json:"notIns,omitempty"` +type ResourcePolicyResourceStatusInstanceSchedulePolicyStatus struct { + // LastRunStartTime: [Output Only] The last time the schedule + // successfully ran. The timestamp is an RFC3339 string. + LastRunStartTime string `json:"lastRunStartTime,omitempty"` - // Permissions: This is deprecated and has no effect. Do not use. - Permissions []string `json:"permissions,omitempty"` + // NextRunStartTime: [Output Only] The next time the schedule is planned + // to run. The actual time might be slightly different. The timestamp is + // an RFC3339 string. + NextRunStartTime string `json:"nextRunStartTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to + // ForceSendFields is a list of field names (e.g. "LastRunStartTime") 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 @@ -45596,86 +44440,41 @@ type Rule struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "LastRunStartTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *Rule) MarshalJSON() ([]byte, error) { - type NoMethod Rule +func (s *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyResourceStatusInstanceSchedulePolicyStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SSLHealthCheck struct { - // Port: The TCP port number to which the health check prober sends - // packets. The default value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - - // PortSpecification: Specifies how a port is selected for health - // checking. Can be one of the following values: USE_FIXED_PORT: - // Specifies a port number explicitly using the port field in the health - // check. Supported by backend services for pass-through load balancers - // and backend services for proxy load balancers. Not supported by - // target pools. The health check supports all backends supported by the - // backend service provided the backend can be health checked. For - // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network - // endpoint groups, and instance group backends. USE_NAMED_PORT: Not - // supported. USE_SERVING_PORT: Provides an indirect method of - // specifying the health check port by referring to the backend service. - // Only supported by backend services for proxy load balancers. Not - // supported by target pools. Not supported by backend services for - // pass-through load balancers. Supports all backends that can be health - // checked; for example, GCE_VM_IP_PORT network endpoint groups and - // instance group backends. For GCE_VM_IP_PORT network endpoint group - // backends, the health check uses the port number specified for each - // endpoint in the network endpoint group. For instance group backends, - // the health check uses the port number determined by looking up the - // backend service's named port in the instance group's list of named - // ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is - // used for health checking. Applies to network endpoint group and - // instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the - // health check uses the port number specified on each endpoint in the - // network endpoint group. For instance group backends, the health check - // uses the port number specified for the backend service's named port - // defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` +// ResourcePolicySnapshotSchedulePolicy: A snapshot schedule policy +// specifies when and how frequently snapshots are to be created for the +// target disk. Also specifies how many and how long these scheduled +// snapshots should be retained. +type ResourcePolicySnapshotSchedulePolicy struct { + // RetentionPolicy: Retention policy applied to snapshots created by + // this resource policy. + RetentionPolicy *ResourcePolicySnapshotSchedulePolicyRetentionPolicy `json:"retentionPolicy,omitempty"` - // Request: Instructs the health check prober to send this exact ASCII - // string, up to 1024 bytes in length, after establishing the TCP - // connection and SSL handshake. - Request string `json:"request,omitempty"` + // Schedule: A Vm Maintenance Policy specifies what kind of + // infrastructure maintenance we are allowed to perform on this VM and + // when. Schedule that is applied to disks covered by this policy. + Schedule *ResourcePolicySnapshotSchedulePolicySchedule `json:"schedule,omitempty"` - // Response: Creates a content-based SSL health check. In addition to - // establishing a TCP connection and the TLS handshake, you can - // configure the health check to pass only when the backend sends this - // exact response ASCII string, up to 1024 bytes in length. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp - Response string `json:"response,omitempty"` + // SnapshotProperties: Properties with which snapshots are created such + // as labels, encryption keys. + SnapshotProperties *ResourcePolicySnapshotSchedulePolicySnapshotProperties `json:"snapshotProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "Port") to + // ForceSendFields is a list of field names (e.g. "RetentionPolicy") 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 @@ -45683,109 +44482,72 @@ type SSLHealthCheck struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "RetentionPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod SSLHealthCheck +func (s *ResourcePolicySnapshotSchedulePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SavedAttachedDisk: DEPRECATED: Please use compute#savedDisk instead. -// An instance-attached disk resource. -type SavedAttachedDisk struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is deleted (but not when the disk is detached from the - // instance). - AutoDelete bool `json:"autoDelete,omitempty"` - - // Boot: Indicates that this is a boot disk. The virtual machine will - // use the first partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - - // DeviceName: Specifies the name of the disk attached to the source - // instance. - DeviceName string `json:"deviceName,omitempty"` - - // DiskEncryptionKey: The encryption key for the disk. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // DiskSizeGb: The size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // DiskType: [Output Only] URL of the disk type resource. For example: - // projects/project /zones/zone/diskTypes/pd-standard or pd-ssd - DiskType string `json:"diskType,omitempty"` - - // GuestOsFeatures: A list of features to enable on the guest operating - // system. Applicable only for bootable images. Read Enabling guest - // operating system features to see a list of available options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - - // Index: Specifies zero-based index of the disk that is attached to the - // source instance. - Index int64 `json:"index,omitempty"` +// ResourcePolicySnapshotSchedulePolicyRetentionPolicy: Policy for +// retention of scheduled snapshots. +type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { + // MaxRetentionDays: Maximum age of the snapshot that is allowed to be + // kept. + MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` - // Interface: Specifies the disk interface to use for attaching this - // disk, which is either SCSI or NVME. + // OnSourceDiskDelete: Specifies the behavior to apply to scheduled + // snapshots when the source disk is deleted. // // Possible values: - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#attachedDisk - // for attached disks. - Kind string `json:"kind,omitempty"` + // "APPLY_RETENTION_POLICY" + // "KEEP_AUTO_SNAPSHOTS" + // "UNSPECIFIED_ON_SOURCE_DISK_DELETE" + OnSourceDiskDelete string `json:"onSourceDiskDelete,omitempty"` - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxRetentionDays") 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:"-"` - // Mode: The mode in which this disk is attached to the source instance, - // either READ_WRITE or READ_ONLY. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple - // virtual machines can use a disk in read-only mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in read-write mode. - // Only one virtual machine at a time can be attached to a disk in - // read-write mode. - Mode string `json:"mode,omitempty"` + // NullFields is a list of field names (e.g. "MaxRetentionDays") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // Source: Specifies a URL of the disk attached to the source instance. - Source string `json:"source,omitempty"` +func (s *ResourcePolicySnapshotSchedulePolicyRetentionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicyRetentionPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // StorageBytes: [Output Only] A size of the storage used by the disk's - // snapshot by this machine image. - StorageBytes int64 `json:"storageBytes,omitempty,string"` +// ResourcePolicySnapshotSchedulePolicySchedule: A schedule for disks +// where the schedueled operations are performed. +type ResourcePolicySnapshotSchedulePolicySchedule struct { + DailySchedule *ResourcePolicyDailyCycle `json:"dailySchedule,omitempty"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes - // is in a stable state or it is being adjusted as a result of shared - // storage reallocation. This status can either be UPDATING, meaning the - // size of the snapshot is being updated, or UP_TO_DATE, meaning the - // size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` + HourlySchedule *ResourcePolicyHourlyCycle `json:"hourlySchedule,omitempty"` - // Type: Specifies the type of the attached disk, either SCRATCH or - // PERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` + WeeklySchedule *ResourcePolicyWeeklyCycle `json:"weeklySchedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // ForceSendFields is a list of field names (e.g. "DailySchedule") 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 @@ -45793,56 +44555,39 @@ type SavedAttachedDisk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DailySchedule") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SavedAttachedDisk) MarshalJSON() ([]byte, error) { - type NoMethod SavedAttachedDisk +func (s *ResourcePolicySnapshotSchedulePolicySchedule) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicySchedule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SavedDisk: An instance-attached disk resource. -type SavedDisk struct { - // Architecture: [Output Only] The architecture of the attached disk. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture - // is not set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#savedDisk - // for attached disks. - Kind string `json:"kind,omitempty"` +// ResourcePolicySnapshotSchedulePolicySnapshotProperties: Specified +// snapshot properties for scheduled snapshots created by this policy. +type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { + // ChainName: Chain name that the snapshot is created in. + ChainName string `json:"chainName,omitempty"` - // SourceDisk: Specifies a URL of the disk attached to the source - // instance. - SourceDisk string `json:"sourceDisk,omitempty"` + // GuestFlush: Indication to perform a 'guest aware' snapshot. + GuestFlush bool `json:"guestFlush,omitempty"` - // StorageBytes: [Output Only] Size of the individual disk snapshot used - // by this machine image. - StorageBytes int64 `json:"storageBytes,omitempty,string"` + // Labels: Labels to apply to scheduled snapshots. These can be later + // modified by the setLabels method. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes - // is in a stable state or it is being adjusted as a result of shared - // storage reallocation. This status can either be UPDATING, meaning the - // size of the snapshot is being updated, or UP_TO_DATE, meaning the - // size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` + // StorageLocations: Cloud Storage bucket storage location of the auto + // snapshot (regional or multi-regional). + StorageLocations []string `json:"storageLocations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to + // ForceSendFields is a list of field names (e.g. "ChainName") 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 @@ -45850,46 +44595,28 @@ type SavedDisk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ChainName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SavedDisk) MarshalJSON() ([]byte, error) { - type NoMethod SavedDisk +func (s *ResourcePolicySnapshotSchedulePolicySnapshotProperties) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicySnapshotSchedulePolicySnapshotProperties raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ScalingScheduleStatus struct { - // LastStartTime: [Output Only] The last time the scaling schedule - // became active. Note: this is a timestamp when a schedule actually - // became active, not when it was planned to do so. The timestamp is in - // RFC3339 text format. - LastStartTime string `json:"lastStartTime,omitempty"` - - // NextStartTime: [Output Only] The next time the scaling schedule is to - // become active. Note: this is a timestamp when a schedule is planned - // to run, but the actual time might be slightly different. The - // timestamp is in RFC3339 text format. - NextStartTime string `json:"nextStartTime,omitempty"` - - // State: [Output Only] The current state of a scaling schedule. - // - // Possible values: - // "ACTIVE" - The current autoscaling recommendation is influenced by - // this scaling schedule. - // "DISABLED" - This scaling schedule has been disabled by the user. - // "OBSOLETE" - This scaling schedule will never become active again. - // "READY" - The current autoscaling recommendation is not influenced - // by this scaling schedule. - State string `json:"state,omitempty"` +// ResourcePolicyWeeklyCycle: Time window specified for weekly +// operations. +type ResourcePolicyWeeklyCycle struct { + // DayOfWeeks: Up to 7 intervals/windows, one for each day of the week. + DayOfWeeks []*ResourcePolicyWeeklyCycleDayOfWeek `json:"dayOfWeeks,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastStartTime") to + // ForceSendFields is a list of field names (e.g. "DayOfWeeks") 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 @@ -45897,118 +44624,46 @@ type ScalingScheduleStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastStartTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DayOfWeeks") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ScalingScheduleStatus) MarshalJSON() ([]byte, error) { - type NoMethod ScalingScheduleStatus +func (s *ResourcePolicyWeeklyCycle) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyWeeklyCycle raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Scheduling: Sets the scheduling options for an Instance. -type Scheduling struct { - // AutomaticRestart: Specifies whether the instance should be - // automatically restarted if it is terminated by Compute Engine (not - // terminated by a user). You can only set the automatic restart option - // for standard instances. Preemptible instances cannot be automatically - // restarted. By default, this is set to true so an instance is - // automatically restarted if it is terminated by Compute Engine. - AutomaticRestart *bool `json:"automaticRestart,omitempty"` - - // HostErrorTimeoutSeconds: Specify the time in seconds for host error - // detection, the value must be within the range of [90, 330] with the - // increment of 30, if unset, the default behavior of host error - // recovery will be used. - HostErrorTimeoutSeconds int64 `json:"hostErrorTimeoutSeconds,omitempty"` - - // InstanceTerminationAction: Specifies the termination action for the - // instance. - // - // Possible values: - // "DELETE" - Delete the VM. - // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This - // value is unused. - // "STOP" - Stop the VM without storing in-memory content. default - // action. - InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` - - // LocationHint: An opaque location hint used to place the instance - // close to other resources. This field is for use by internal tools - // that use the public API. - LocationHint string `json:"locationHint,omitempty"` - - // MaintenanceFreezeDurationHours: Specifies the number of hours after - // VM instance creation where the VM won't be scheduled for maintenance. - MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - - // MaintenanceInterval: Specifies the frequency of planned maintenance - // events. The accepted values are: `PERIODIC`. - // - // Possible values: - // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, minimizing the number of maintenance operations (live - // migrations or terminations) on an individual VM. This may mean a VM - // will take longer to receive an update than if it was configured for - // AS_NEEDED. Security updates will still be applied as soon as they are - // available. - MaintenanceInterval string `json:"maintenanceInterval,omitempty"` - - // MaxRunDuration: Specifies the max run duration for the given - // instance. If specified, the instance termination action will be - // performed at the end of the run duration. - MaxRunDuration *Duration `json:"maxRunDuration,omitempty"` - - // MinNodeCpus: The minimum number of virtual CPUs this instance will - // consume when running on a sole-tenant node. - MinNodeCpus int64 `json:"minNodeCpus,omitempty"` - - // NodeAffinities: A set of node affinity and anti-affinity - // configurations. Refer to Configuring node affinity for more - // information. Overrides reservationAffinity. - NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"` - - // OnHostMaintenance: Defines the maintenance behavior for this - // instance. For standard instances, the default behavior is MIGRATE. - // For preemptible instances, the default and only possible behavior is - // TERMINATE. For more information, see Set VM host maintenance policy. +type ResourcePolicyWeeklyCycleDayOfWeek struct { + // Day: Defines a schedule that runs on specific days of the week. + // Specify one or more days. The following options are available: + // MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. // // Possible values: - // "MIGRATE" - *[Default]* Allows Compute Engine to automatically - // migrate instances out of the way of maintenance events. - // "TERMINATE" - Tells Compute Engine to terminate and (optionally) - // restart the instance away from the maintenance activity. If you would - // like your instance to be restarted, set the automaticRestart flag to - // true. Your instance may be restarted more than once, and it may be - // restarted outside the window of maintenance events. - OnHostMaintenance string `json:"onHostMaintenance,omitempty"` - - // Preemptible: Defines whether the instance is preemptible. This can - // only be set during instance creation or while the instance is stopped - // and therefore, in a `TERMINATED` state. See Instance Life Cycle for - // more information on the possible instance states. - Preemptible bool `json:"preemptible,omitempty"` + // "FRIDAY" + // "INVALID" + // "MONDAY" + // "SATURDAY" + // "SUNDAY" + // "THURSDAY" + // "TUESDAY" + // "WEDNESDAY" + Day string `json:"day,omitempty"` - // ProvisioningModel: Specifies the provisioning model of the instance. - // - // Possible values: - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` + // Duration: [Output only] Duration of the time window, automatically + // chosen to be smallest possible in the given scenario. + Duration string `json:"duration,omitempty"` - // TerminationTime: Specifies the timestamp, when the instance will be - // terminated, in RFC3339 text format. If specified, the instance - // termination action will be performed at the termination time. - TerminationTime string `json:"terminationTime,omitempty"` + // StartTime: Time within the window to start the operations. It must be + // in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. + StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to + // ForceSendFields is a list of field names (e.g. "Day") 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 @@ -46016,41 +44671,32 @@ type Scheduling struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutomaticRestart") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Scheduling) MarshalJSON() ([]byte, error) { - type NoMethod Scheduling +func (s *ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyWeeklyCycleDayOfWeek raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SchedulingNodeAffinity: Node Affinity: the configuration of desired -// nodes onto which this Instance could be scheduled. -type SchedulingNodeAffinity struct { - // Key: Corresponds to the label key of Node resource. - Key string `json:"key,omitempty"` - - // Operator: Defines the operation of node selection. Valid operators - // are IN for affinity and NOT_IN for anti-affinity. - // - // Possible values: - // "IN" - Requires Compute Engine to seek for matched nodes. - // "NOT_IN" - Requires Compute Engine to avoid certain nodes. - // "OPERATOR_UNSPECIFIED" - Operator string `json:"operator,omitempty"` +// ResourceStatus: Contains output only fields. Use this sub-message for +// actual values set on Instance attributes as compared to the value +// requested by the user (intent) in their instance CRUD calls. +type ResourceStatus struct { + // PhysicalHost: [Output Only] An opaque ID of the host on which the VM + // is running. + PhysicalHost string `json:"physicalHost,omitempty"` - // Values: Corresponds to the label values of Node resource. - Values []string `json:"values,omitempty"` + Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "PhysicalHost") 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 @@ -46058,93 +44704,222 @@ type SchedulingNodeAffinity struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "PhysicalHost") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingNodeAffinity +func (s *ResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Screenshot: An instance's screenshot. -type Screenshot struct { - // Contents: [Output Only] The Base64-encoded screenshot data. - Contents string `json:"contents,omitempty"` +type ResourceStatusScheduling struct { + // TerminationTimestamp: Time in future when the instance will be + // terminated in RFC3339 text format. + TerminationTimestamp string `json:"terminationTimestamp,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#screenshot - // for the screenshots. - Kind string `json:"kind,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TerminationTimestamp") 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:"-"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // NullFields is a list of field names (e.g. "TerminationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with +func (s *ResourceStatusScheduling) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatusScheduling + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RolloutPolicy: A rollout policy configuration. +type RolloutPolicy struct { + // DefaultRolloutTime: An optional RFC3339 timestamp on or after which + // the update is considered rolled out to any zone that is not + // explicitly stated. + DefaultRolloutTime string `json:"defaultRolloutTime,omitempty"` + + // LocationRolloutPolicies: Location based rollout policies to apply to + // the resource. Currently only zone names are supported and must be + // represented as valid URLs, like: zones/us-central1-a. The value + // expects an RFC3339 timestamp on or after which the update is + // considered rolled out to the specified location. + LocationRolloutPolicies map[string]string `json:"locationRolloutPolicies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DefaultRolloutTime") + // 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. "Contents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "DefaultRolloutTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *Screenshot) MarshalJSON() ([]byte, error) { - type NoMethod Screenshot +func (s *RolloutPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RolloutPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPoliciesAggregatedList struct { - Etag string `json:"etag,omitempty"` +// Route: Represents a Route resource. A route defines a path from VM +// instances in the VPC network to a specific destination. This +// destination can be inside or outside the VPC network. For more +// information, read the Routes overview. +type Route struct { + // AsPaths: [Output Only] AS path. + AsPaths []*RouteAsPath `json:"asPaths,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Items: A list of SecurityPoliciesScopedList resources. - Items map[string]SecurityPoliciesScopedList `json:"items,omitempty"` + // Description: An optional description of this resource. Provide this + // field when you create the resource. + Description string `json:"description,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#securityPolicyAggregatedList for lists of Security Policies. + // DestRange: The destination range of outgoing packets that this route + // applies to. Both IPv4 and IPv6 are supported. + DestRange string `json:"destRange,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of this resource. Always compute#routes for + // Route resources. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. + Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. + // Network: Fully-qualified URL of the network that this route applies + // to. + Network string `json:"network,omitempty"` + + // NextHopGateway: The URL to a gateway that should handle matching + // packets. You can only specify the internet gateway using a full or + // partial valid URL: projects/ + // project/global/gateways/default-internet-gateway + NextHopGateway string `json:"nextHopGateway,omitempty"` + + // NextHopIlb: The URL to a forwarding rule of type + // loadBalancingScheme=INTERNAL that should handle matching packets or + // the IP address of the forwarding Rule. For example, the following are + // all valid URLs: - 10.128.0.56 - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /forwardingRules/forwardingRule - + // regions/region/forwardingRules/forwardingRule + NextHopIlb string `json:"nextHopIlb,omitempty"` + + // NextHopInstance: The URL to an instance that should handle matching + // packets. You can specify this as a full or partial URL. For example: + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ + NextHopInstance string `json:"nextHopInstance,omitempty"` + + // NextHopInterconnectAttachment: [Output Only] The URL to an + // InterconnectAttachment which is the next hop for the route. This + // field will only be populated for the dynamic routes generated by + // Cloud Router with a linked interconnectAttachment. + NextHopInterconnectAttachment string `json:"nextHopInterconnectAttachment,omitempty"` + + // NextHopIp: The network IP address of an instance that should handle + // matching packets. Only IPv4 is supported. + NextHopIp string `json:"nextHopIp,omitempty"` + + // NextHopNetwork: The URL of the local network if it should handle + // matching packets. + NextHopNetwork string `json:"nextHopNetwork,omitempty"` + + // NextHopPeering: [Output Only] The network peering name that should + // handle matching packets, which should conform to RFC1035. + NextHopPeering string `json:"nextHopPeering,omitempty"` + + // NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching + // packets. + NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` + + // Priority: The priority of this route. Priority is used to break ties + // in cases where there is more than one matching route of equal prefix + // length. In cases where multiple routes have equal prefix length, the + // one with the lowest-numbered priority value wins. The default value + // is `1000`. The priority value must be from `0` to `65535`, inclusive. + Priority int64 `json:"priority,omitempty"` + + // RouteStatus: [Output only] The status of the route. + // + // Possible values: + // "ACTIVE" - This route is processed and active. + // "DROPPED" - The route is dropped due to the VPC exceeding the + // dynamic route limit. For dynamic route limit, please refer to the + // Learned route example + // "INACTIVE" - This route is processed but inactive due to failure + // from the backend. The backend may have rejected the route + // "PENDING" - This route is being processed internally. The status + // will change once processed. + RouteStatus string `json:"routeStatus,omitempty"` + + // RouteType: [Output Only] The type of this route, which can be one of + // the following values: - 'TRANSIT' for a transit route that this + // router learned from another Cloud Router and will readvertise to one + // of its BGP peers - 'SUBNET' for a route from a subnet of the VPC - + // 'BGP' for a route learned from a BGP peer of this router - 'STATIC' + // for a static route + // + // Possible values: + // "BGP" + // "STATIC" + // "SUBNET" + // "TRANSIT" + RouteType string `json:"routeType,omitempty"` + + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` + // Tags: A list of instance tags to which this route applies. + Tags []string `json:"tags,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SecurityPoliciesAggregatedListWarning `json:"warning,omitempty"` + // Warnings: [Output Only] If potential misconfigurations are detected + // for this route, this field will be populated with warning messages. + Warnings []*RouteWarnings `json:"warnings,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // ForceSendFields is a list of field names (e.g. "AsPaths") 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 @@ -46152,8 +44927,8 @@ type SecurityPoliciesAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "AsPaths") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -46161,15 +44936,13 @@ type SecurityPoliciesAggregatedList struct { NullFields []string `json:"-"` } -func (s *SecurityPoliciesAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedList +func (s *Route) MarshalJSON() ([]byte, error) { + type NoMethod Route raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPoliciesAggregatedListWarning: [Output Only] Informational -// warning message. -type SecurityPoliciesAggregatedListWarning struct { +type RouteWarnings struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -46237,7 +45010,7 @@ type SecurityPoliciesAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SecurityPoliciesAggregatedListWarningData `json:"data,omitempty"` + Data []*RouteWarningsData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -46260,13 +45033,13 @@ type SecurityPoliciesAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *SecurityPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedListWarning +func (s *RouteWarnings) MarshalJSON() ([]byte, error) { + type NoMethod RouteWarnings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPoliciesAggregatedListWarningData struct { +type RouteWarningsData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -46297,53 +45070,86 @@ type SecurityPoliciesAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *SecurityPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedListWarningData +func (s *RouteWarningsData) MarshalJSON() ([]byte, error) { + type NoMethod RouteWarningsData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { - PreconfiguredExpressionSets *SecurityPoliciesWafConfig `json:"preconfiguredExpressionSets,omitempty"` +type RouteAsPath struct { + // AsLists: [Output Only] The AS numbers of the AS Path. + AsLists []int64 `json:"asLists,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PathSegmentType: [Output Only] The type of the AS Path, which can be + // one of the following values: - 'AS_SET': unordered set of autonomous + // systems that the route in has traversed - 'AS_SEQUENCE': ordered set + // of autonomous systems that the route has traversed - + // 'AS_CONFED_SEQUENCE': ordered set of Member Autonomous Systems in the + // local confederation that the route has traversed - 'AS_CONFED_SET': + // unordered set of Member Autonomous Systems in the local confederation + // that the route has traversed + // + // Possible values: + // "AS_CONFED_SEQUENCE" + // "AS_CONFED_SET" + // "AS_SEQUENCE" + // "AS_SET" + PathSegmentType string `json:"pathSegmentType,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "PreconfiguredExpressionSets") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "AsLists") 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. - // "PreconfiguredExpressionSets") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an 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. "AsLists") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SecurityPoliciesListPreconfiguredExpressionSetsResponse) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesListPreconfiguredExpressionSetsResponse +func (s *RouteAsPath) MarshalJSON() ([]byte, error) { + type NoMethod RouteAsPath raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPoliciesScopedList struct { - // SecurityPolicies: A list of SecurityPolicies contained in this scope. - SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` +// RouteList: Contains a list of Route resources. +type RouteList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Warning: Informational warning which replaces the list of security - // policies when the list is empty. - Warning *SecurityPoliciesScopedListWarning `json:"warning,omitempty"` + // Items: A list of Route resources. + Items []*Route `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *RouteListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -46351,25 +45157,23 @@ type SecurityPoliciesScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecurityPolicies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SecurityPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedList +func (s *RouteList) MarshalJSON() ([]byte, error) { + type NoMethod RouteList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPoliciesScopedListWarning: Informational warning which -// replaces the list of security policies when the list is empty. -type SecurityPoliciesScopedListWarning struct { +// RouteListWarning: [Output Only] Informational warning message. +type RouteListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -46437,7 +45241,7 @@ type SecurityPoliciesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SecurityPoliciesScopedListWarningData `json:"data,omitempty"` + Data []*RouteListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -46460,13 +45264,13 @@ type SecurityPoliciesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *SecurityPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedListWarning +func (s *RouteListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RouteListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPoliciesScopedListWarningData struct { +type RouteListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -46497,103 +45301,51 @@ type SecurityPoliciesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *SecurityPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesWafConfig struct { - WafRules *PreconfiguredWafSet `json:"wafRules,omitempty"` - - // ForceSendFields is a list of field names (e.g. "WafRules") 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. "WafRules") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesWafConfig +func (s *RouteListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RouteListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicy: Represents a Google Cloud Armor security policy -// resource. Only external backend services that use load balancers can -// reference a security policy. For more information, see Google Cloud -// Armor security policy overview. -type SecurityPolicy struct { - AdaptiveProtectionConfig *SecurityPolicyAdaptiveProtectionConfig `json:"adaptiveProtectionConfig,omitempty"` - - AdvancedOptionsConfig *SecurityPolicyAdvancedOptionsConfig `json:"advancedOptionsConfig,omitempty"` +// Router: Represents a Cloud Router resource. For more information +// about Cloud Router, read the Cloud Router overview. +type Router struct { + // Bgp: BGP information specific to this router. + Bgp *RouterBgp `json:"bgp,omitempty"` - // Associations: A list of associations that belong to this policy. - Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` + // BgpPeers: BGP information that must be configured into the routing + // stack to establish BGP peering. This information must specify the + // peer ASN and either the interface name, IP address, or peer IP + // address. Please refer to RFC4273. + BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - DdosProtectionConfig *SecurityPolicyDdosProtectionConfig `json:"ddosProtectionConfig,omitempty"` - // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` - // DisplayName: User-provided name of the Organization security plicy. - // The name should be unique in the organization in which the security - // policy is created. This should only be used when SecurityPolicyType - // is FIREWALL. The name must be 1-63 characters long, and comply with - // https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be - // 1-63 characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - DisplayName string `json:"displayName,omitempty"` - - // Fingerprint: Specifies a fingerprint for this resource, which is - // essentially a hash of the metadata's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update metadata. You must - // always provide an up-to-date fingerprint hash in order to update or - // change metadata, otherwise the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make get() request to - // the security policy. - Fingerprint string `json:"fingerprint,omitempty"` + // EncryptedInterconnectRouter: Indicates if a router is dedicated for + // use with encrypted VLAN attachments (interconnectAttachments). + EncryptedInterconnectRouter bool `json:"encryptedInterconnectRouter,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Always - // compute#securityPolicyfor security policies - Kind string `json:"kind,omitempty"` + // Interfaces: Router interfaces. Each interface requires either one + // linked resource, (for example, linkedVpnTunnel), or IP address and IP + // address range (for example, ipRange), or both. + Interfaces []*RouterInterface `json:"interfaces,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // security policy, which is essentially a hash of the labels set used - // for optimistic locking. The fingerprint is initially generated by - // Compute Engine and changes after every request to modify or update - // labels. You must always provide an up-to-date fingerprint hash in - // order to update or change labels. To see the latest fingerprint, make - // get() request to the security policy. - LabelFingerprint string `json:"labelFingerprint,omitempty"` + // Kind: [Output Only] Type of resource. Always compute#router for + // routers. + Kind string `json:"kind,omitempty"` - // Labels: Labels for this resource. These can only be added or modified - // by the setLabels method. Each label key/value pair must comply with - // RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` + // Md5AuthenticationKeys: Keys used for MD5 authentication. + Md5AuthenticationKeys []*RouterMd5AuthenticationKey `json:"md5AuthenticationKeys,omitempty"` // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with @@ -46604,100 +45356,58 @@ type SecurityPolicy struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Parent: [Output Only] The parent of the security policy. - Parent string `json:"parent,omitempty"` + // Nats: A list of NAT services created in this router. + Nats []*RouterNat `json:"nats,omitempty"` - RecaptchaOptionsConfig *SecurityPolicyRecaptchaOptionsConfig `json:"recaptchaOptionsConfig,omitempty"` + // Network: URI of the network to which this router belongs. + Network string `json:"network,omitempty"` - // Region: [Output Only] URL of the region where the regional security - // policy resides. This field is not applicable to global security - // policies. + // Region: [Output Only] URI of the region where the router resides. You + // must specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. Region string `json:"region,omitempty"` - // RuleTupleCount: [Output Only] Total count of all security policy rule - // tuples. A security policy can not exceed a set number of tuples. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - - // Rules: A list of rules that belong to this policy. There must always - // be a default rule which is a rule with priority 2147483647 and match - // all condition (for the match condition this means match "*" for - // srcIpRanges and for the networkMatch condition every field must be - // either match "*" or not set). If no rules are provided when creating - // a security policy, a default rule with action "allow" will be added. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource - // with the resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // Type: The type indicates the intended use of the security policy. - - // CLOUD_ARMOR: Cloud Armor backend security policies can be configured - // to filter incoming HTTP requests targeting backend services. They - // filter requests before they hit the origin servers. - - // CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be - // configured to filter incoming HTTP requests targeting backend - // services (including Cloud CDN-enabled) as well as backend buckets - // (Cloud Storage). They filter requests before the request is served - // from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor - // internal service policies can be configured to filter HTTP requests - // targeting services managed by Traffic Director in a service mesh. - // They filter requests before the request is served from the - // application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can - // be configured to filter packets targeting network load balancing - // resources such as backend services, target pools, target instances, - // and instances with external IPs. They filter requests before the - // request is served from the application. This field can be set only at - // resource creation time. - // - // Possible values: - // "CLOUD_ARMOR" - // "CLOUD_ARMOR_EDGE" - // "CLOUD_ARMOR_NETWORK" - // "FIREWALL" - Type string `json:"type,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AdaptiveProtectionConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Bgp") 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. "AdaptiveProtectionConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Bgp") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SecurityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicy +func (s *Router) MarshalJSON() ([]byte, error) { + type NoMethod Router raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicyAdaptiveProtectionConfig: Configuration options for -// Cloud Armor Adaptive Protection (CAAP). -type SecurityPolicyAdaptiveProtectionConfig struct { - AutoDeployConfig *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig `json:"autoDeployConfig,omitempty"` +// RouterAdvertisedIpRange: Description-tagged IP ranges for the router +// to advertise. +type RouterAdvertisedIpRange struct { + // Description: User-specified description for the IP range. + Description string `json:"description,omitempty"` - // Layer7DdosDefenseConfig: If set to true, enables Cloud Armor Machine - // Learning. - Layer7DdosDefenseConfig *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig `json:"layer7DdosDefenseConfig,omitempty"` + // Range: The IP range to advertise. The value must be a CIDR-formatted + // string. + Range string `json:"range,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDeployConfig") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -46705,94 +45415,154 @@ type SecurityPolicyAdaptiveProtectionConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDeployConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SecurityPolicyAdaptiveProtectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfig +func (s *RouterAdvertisedIpRange) MarshalJSON() ([]byte, error) { + type NoMethod RouterAdvertisedIpRange raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig: Configuration -// options for Adaptive Protection auto-deploy feature. -type SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig struct { - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` +// RouterAggregatedList: Contains a list of routers. +type RouterAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - ExpirationSec int64 `json:"expirationSec,omitempty"` + // Items: A list of Router resources. + Items map[string]RoutersScopedList `json:"items,omitempty"` - ImpactedBaselineThreshold float64 `json:"impactedBaselineThreshold,omitempty"` + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` - LoadThreshold float64 `json:"loadThreshold,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") - // to unconditionally include in API requests. By default, fields with + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *RouterAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with // empty 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. "ConfidenceThreshold") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig +func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod RouterAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) UnmarshalJSON(data []byte) error { - type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - ImpactedBaselineThreshold gensupport.JSONFloat64 `json:"impactedBaselineThreshold"` - LoadThreshold gensupport.JSONFloat64 `json:"loadThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.ImpactedBaselineThreshold = float64(s1.ImpactedBaselineThreshold) - s.LoadThreshold = float64(s1.LoadThreshold) - return nil -} - -// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig: -// Configuration options for L7 DDoS detection. This field is only -// supported in Global Security Policies of type CLOUD_ARMOR. -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { - // Enable: If set to true, enables CAAP for L7 DDoS detection. This - // field is only supported in Global Security Policies of type - // CLOUD_ARMOR. - Enable bool `json:"enable,omitempty"` - - // RuleVisibility: Rule visibility can be one of the following: STANDARD - // - opaque rules. (default) PREMIUM - transparent rules. This field is - // only supported in Global Security Policies of type CLOUD_ARMOR. +// RouterAggregatedListWarning: [Output Only] Informational warning +// message. +type RouterAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. // // Possible values: - // "PREMIUM" - // "STANDARD" - RuleVisibility string `json:"ruleVisibility,omitempty"` + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*RouterAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -46800,7 +45570,7 @@ type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API + // NullFields is a list of field names (e.g. "Code") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -46809,32 +45579,27 @@ type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig +func (s *RouterAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RouterAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyAdvancedOptionsConfig struct { - // JsonCustomConfig: Custom configuration to apply the JSON parsing. - // Only applicable when json_parsing is set to STANDARD. - JsonCustomConfig *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig `json:"jsonCustomConfig,omitempty"` - - // Possible values: - // "DISABLED" - // "STANDARD" - JsonParsing string `json:"jsonParsing,omitempty"` +type RouterAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // Possible values: - // "NORMAL" - // "VERBOSE" - LogLevel string `json:"logLevel,omitempty"` - - // UserIpRequestHeaders: An optional list of case-insensitive request - // header names to use for resolving the callers client IP address. - UserIpRequestHeaders []string `json:"userIpRequestHeaders,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonCustomConfig") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -46842,32 +45607,66 @@ type SecurityPolicyAdvancedOptionsConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonCustomConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SecurityPolicyAdvancedOptionsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdvancedOptionsConfig +func (s *RouterAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RouterAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyAdvancedOptionsConfigJsonCustomConfig struct { - // ContentTypes: A list of custom Content-Type header values to apply - // the JSON parsing. As per RFC 1341, a Content-Type header value has - // the following format: Content-Type := type "/" subtype *[";" - // parameter] When configuring a custom Content-Type header value, only - // the type/subtype needs to be specified, and the parameters should be - // excluded. - ContentTypes []string `json:"contentTypes,omitempty"` +type RouterBgp struct { + // AdvertiseMode: User-specified flag to indicate which mode to use for + // advertisement. The options are DEFAULT or CUSTOM. + // + // Possible values: + // "CUSTOM" + // "DEFAULT" + AdvertiseMode string `json:"advertiseMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentTypes") to + // AdvertisedGroups: User-specified list of prefix groups to advertise + // in custom mode. This field can only be populated if advertise_mode is + // CUSTOM and is advertised to all peers of the router. These groups + // will be advertised in addition to any specified prefixes. Leave this + // field blank to advertise no custom groups. + // + // Possible values: + // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC + // subnets). + AdvertisedGroups []string `json:"advertisedGroups,omitempty"` + + // AdvertisedIpRanges: User-specified list of individual IP ranges to + // advertise in custom mode. This field can only be populated if + // advertise_mode is CUSTOM and is advertised to all peers of the + // router. These IP ranges will be advertised in addition to any + // specified groups. Leave this field blank to advertise no custom IP + // ranges. + AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` + + // Asn: Local BGP Autonomous System Number (ASN). Must be an RFC6996 + // private ASN, either 16-bit or 32-bit. The value will be fixed for + // this router resource. All VPN tunnels that link to this router will + // have the same local ASN. + Asn int64 `json:"asn,omitempty"` + + // KeepaliveInterval: The interval in seconds between BGP keepalive + // messages that are sent to the peer. Hold time is three times the + // interval at which keepalive messages are sent, and the hold time is + // the maximum number of seconds allowed to elapse between successive + // keepalive messages that BGP receives from a peer. BGP will use the + // smaller of either the local hold time value or the peer's hold time + // value as the hold time for the BGP connection between the two peers. + // If set, this value must be between 20 and 60. The default is 20. + KeepaliveInterval int64 `json:"keepaliveInterval,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdvertiseMode") 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 @@ -46875,7 +45674,7 @@ type SecurityPolicyAdvancedOptionsConfigJsonCustomConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentTypes") to include + // NullFields is a list of field names (e.g. "AdvertiseMode") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -46884,32 +45683,142 @@ type SecurityPolicyAdvancedOptionsConfigJsonCustomConfig struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdvancedOptionsConfigJsonCustomConfig +func (s *RouterBgp) MarshalJSON() ([]byte, error) { + type NoMethod RouterBgp raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyAssociation struct { - // AttachmentId: The resource that the security policy is attached to. - AttachmentId string `json:"attachmentId,omitempty"` +type RouterBgpPeer struct { + // AdvertiseMode: User-specified flag to indicate which mode to use for + // advertisement. + // + // Possible values: + // "CUSTOM" + // "DEFAULT" + AdvertiseMode string `json:"advertiseMode,omitempty"` - // DisplayName: [Output Only] The display name of the security policy of - // the association. - DisplayName string `json:"displayName,omitempty"` + // AdvertisedGroups: User-specified list of prefix groups to advertise + // in custom mode, which currently supports the following option: - + // ALL_SUBNETS: Advertises all of the router's own VPC subnets. This + // excludes any routes learned for subnets that use VPC Network Peering. + // Note that this field can only be populated if advertise_mode is + // CUSTOM and overrides the list defined for the router (in the "bgp" + // message). These groups are advertised in addition to any specified + // prefixes. Leave this field blank to advertise no custom groups. + // + // Possible values: + // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC + // subnets). + AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - // Name: The name for an association. + // AdvertisedIpRanges: User-specified list of individual IP ranges to + // advertise in custom mode. This field can only be populated if + // advertise_mode is CUSTOM and overrides the list defined for the + // router (in the "bgp" message). These IP ranges are advertised in + // addition to any specified groups. Leave this field blank to advertise + // no custom IP ranges. + AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` + + // AdvertisedRoutePriority: The priority of routes advertised to this + // BGP peer. Where there is more than one matching route of maximum + // length, the routes with the lowest priority value win. + AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` + + // Bfd: BFD configuration for the BGP peering. + Bfd *RouterBgpPeerBfd `json:"bfd,omitempty"` + + // CustomLearnedIpRanges: A list of user-defined custom learned route IP + // address ranges for a BGP session. + CustomLearnedIpRanges []*RouterBgpPeerCustomLearnedIpRange `json:"customLearnedIpRanges,omitempty"` + + // CustomLearnedRoutePriority: The user-defined custom learned route + // priority for a BGP session. This value is applied to all custom + // learned route ranges for the session. You can choose a value from `0` + // to `65335`. If you don't provide a value, Google Cloud assigns a + // priority of `100` to the ranges. + CustomLearnedRoutePriority int64 `json:"customLearnedRoutePriority,omitempty"` + + // Enable: The status of the BGP peer connection. If set to FALSE, any + // active session with the peer is terminated and all associated routing + // information is removed. If set to TRUE, the peer connection can be + // established with routing information. The default is TRUE. + // + // Possible values: + // "FALSE" + // "TRUE" + Enable string `json:"enable,omitempty"` + + // EnableIpv6: Enable IPv6 traffic over BGP Peer. If not specified, it + // is disabled by default. + EnableIpv6 bool `json:"enableIpv6,omitempty"` + + // InterfaceName: Name of the interface the BGP peer is associated with. + InterfaceName string `json:"interfaceName,omitempty"` + + // IpAddress: IP address of the interface inside Google Cloud Platform. + // Only IPv4 is supported. + IpAddress string `json:"ipAddress,omitempty"` + + // Ipv6NexthopAddress: IPv6 address of the interface inside Google Cloud + // Platform. + Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` + + // ManagementType: [Output Only] The resource that configures and + // manages this BGP peer. - MANAGED_BY_USER is the default value and can + // be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP + // peer that is configured and managed by Cloud Interconnect, + // specifically by an InterconnectAttachment of type PARTNER. Google + // automatically creates, updates, and deletes this type of BGP peer + // when the PARTNER InterconnectAttachment is created, updated, or + // deleted. + // + // Possible values: + // "MANAGED_BY_ATTACHMENT" - The BGP peer is automatically created for + // PARTNER type InterconnectAttachment; Google will automatically + // create/delete this BGP peer when the PARTNER InterconnectAttachment + // is created/deleted, and Google will update the ipAddress and + // peerIpAddress when the PARTNER InterconnectAttachment is provisioned. + // This type of BGP peer cannot be created or deleted, but can be + // modified for all fields except for name, ipAddress and peerIpAddress. + // "MANAGED_BY_USER" - Default value, the BGP peer is manually created + // and managed by user. + ManagementType string `json:"managementType,omitempty"` + + // Md5AuthenticationKeyName: Present if MD5 authentication is enabled + // for the peering. Must be the name of one of the entries in the + // Router.md5_authentication_keys. The field must comply with RFC1035. + Md5AuthenticationKeyName string `json:"md5AuthenticationKeyName,omitempty"` + + // Name: Name of this BGP peer. The name must be 1-63 characters long, + // and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` - // SecurityPolicyId: [Output Only] The security policy ID of the - // association. - SecurityPolicyId string `json:"securityPolicyId,omitempty"` + // PeerAsn: Peer BGP Autonomous System Number (ASN). Each BGP interface + // may use a different value. + PeerAsn int64 `json:"peerAsn,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PeerIpAddress: IP address of the BGP interface outside Google Cloud + // Platform. Only IPv4 is supported. + PeerIpAddress string `json:"peerIpAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttachmentId") to + // PeerIpv6NexthopAddress: IPv6 address of the BGP interface outside + // Google Cloud Platform. + PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` + + // RouterApplianceInstance: URI of the VM instance that is used as + // third-party router appliances such as Next Gen Firewalls, Virtual + // Routers, or Router Appliances. The VM instance must be located in + // zones contained in the same region as this Cloud Router. The VM + // instance is the peer side of the BGP session. + RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdvertiseMode") 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 @@ -46917,7 +45826,7 @@ type SecurityPolicyAssociation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentId") to include + // NullFields is a list of field names (e.g. "AdvertiseMode") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -46926,28 +45835,55 @@ type SecurityPolicyAssociation struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyAssociation) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAssociation +func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) { + type NoMethod RouterBgpPeer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyDdosProtectionConfig struct { +type RouterBgpPeerBfd struct { + // MinReceiveInterval: The minimum interval, in milliseconds, between + // BFD control packets received from the peer router. The actual value + // is negotiated between the two routers and is equal to the greater of + // this value and the transmit interval of the other router. If set, + // this value must be between 1000 and 30000. The default is 1000. + MinReceiveInterval int64 `json:"minReceiveInterval,omitempty"` + + // MinTransmitInterval: The minimum interval, in milliseconds, between + // BFD control packets transmitted to the peer router. The actual value + // is negotiated between the two routers and is equal to the greater of + // this value and the corresponding receive interval of the other + // router. If set, this value must be between 1000 and 30000. The + // default is 1000. + MinTransmitInterval int64 `json:"minTransmitInterval,omitempty"` + + // Multiplier: The number of consecutive BFD packets that must be missed + // before BFD declares that a peer is unavailable. If set, the value + // must be a value between 5 and 16. The default is 5. + Multiplier int64 `json:"multiplier,omitempty"` + + // SessionInitializationMode: The BFD session initialization mode for + // this BGP peer. If set to ACTIVE, the Cloud Router will initiate the + // BFD session for this BGP peer. If set to PASSIVE, the Cloud Router + // will wait for the peer router to initiate the BFD session for this + // BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The + // default is DISABLED. + // // Possible values: - // "ADVANCED" - // "ADVANCED_PREVIEW" - // "STANDARD" - DdosProtection string `json:"ddosProtection,omitempty"` + // "ACTIVE" + // "DISABLED" + // "PASSIVE" + SessionInitializationMode string `json:"sessionInitializationMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "DdosProtection") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "MinReceiveInterval") + // 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. "DdosProtection") to + // NullFields is a list of field names (e.g. "MinReceiveInterval") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -46957,22 +45893,151 @@ type SecurityPolicyDdosProtectionConfig struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyDdosProtectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyDdosProtectionConfig +func (s *RouterBgpPeerBfd) MarshalJSON() ([]byte, error) { + type NoMethod RouterBgpPeerBfd raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyList struct { +type RouterBgpPeerCustomLearnedIpRange struct { + // Range: The custom learned route IP address range. Must be a valid + // CIDR-formatted prefix. If an IP address is provided without a subnet + // mask, it is interpreted as, for IPv4, a `/32` singular IP address + // range, and, for IPv6, `/128`. + Range string `json:"range,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Range") 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. "Range") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RouterBgpPeerCustomLearnedIpRange) MarshalJSON() ([]byte, error) { + type NoMethod RouterBgpPeerCustomLearnedIpRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type RouterInterface struct { + // IpRange: IP address and range of the interface. The IP range must be + // in the RFC3927 link-local IP address space. The value must be a + // CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not + // truncate the address as it represents the IP address of the + // interface. + IpRange string `json:"ipRange,omitempty"` + + // LinkedInterconnectAttachment: URI of the linked Interconnect + // attachment. It must be in the same region as the router. Each + // interface can have one linked resource, which can be a VPN tunnel, an + // Interconnect attachment, or a virtual machine instance. + LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"` + + // LinkedVpnTunnel: URI of the linked VPN tunnel, which must be in the + // same region as the router. Each interface can have one linked + // resource, which can be a VPN tunnel, an Interconnect attachment, or a + // virtual machine instance. + LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` + + // ManagementType: [Output Only] The resource that configures and + // manages this interface. - MANAGED_BY_USER is the default value and + // can be managed directly by users. - MANAGED_BY_ATTACHMENT is an + // interface that is configured and managed by Cloud Interconnect, + // specifically, by an InterconnectAttachment of type PARTNER. Google + // automatically creates, updates, and deletes this type of interface + // when the PARTNER InterconnectAttachment is created, updated, or + // deleted. + // + // Possible values: + // "MANAGED_BY_ATTACHMENT" - The interface is automatically created + // for PARTNER type InterconnectAttachment, Google will automatically + // create/update/delete this interface when the PARTNER + // InterconnectAttachment is created/provisioned/deleted. This type of + // interface cannot be manually managed by user. + // "MANAGED_BY_USER" - Default value, the interface is manually + // created and managed by user. + ManagementType string `json:"managementType,omitempty"` + + // Name: Name of this interface entry. The name must be 1-63 characters + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + Name string `json:"name,omitempty"` + + // PrivateIpAddress: The regional private internal IP address that is + // used to establish BGP sessions to a VM instance acting as a + // third-party Router Appliance, such as a Next Gen Firewall, a Virtual + // Router, or an SD-WAN VM. + PrivateIpAddress string `json:"privateIpAddress,omitempty"` + + // RedundantInterface: Name of the interface that will be redundant with + // the current interface you are creating. The redundantInterface must + // belong to the same Cloud Router as the interface here. To establish + // the BGP session to a Router Appliance VM, you must create two BGP + // peers. The two BGP peers must be attached to two separate interfaces + // that are redundant with each other. The redundant_interface must be + // 1-63 characters long, and comply with RFC1035. Specifically, the + // redundant_interface must be 1-63 characters long and match the + // regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first + // character must be a lowercase letter, and all following characters + // must be a dash, lowercase letter, or digit, except the last + // character, which cannot be a dash. + RedundantInterface string `json:"redundantInterface,omitempty"` + + // Subnetwork: The URI of the subnetwork resource that this interface + // belongs to, which must be in the same region as the Cloud Router. + // When you establish a BGP session to a VM instance using this + // interface, the VM instance must belong to the same subnetwork as the + // subnetwork specified here. + Subnetwork string `json:"subnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpRange") 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. "IpRange") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RouterInterface) MarshalJSON() ([]byte, error) { + type NoMethod RouterInterface + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RouterList: Contains a list of Router resources. +type RouterList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of SecurityPolicy resources. - Items []*SecurityPolicy `json:"items,omitempty"` + // Items: A list of Router resources. + Items []*Router `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#securityPolicyList for listsof securityPolicies + // Kind: [Output Only] Type of resource. Always compute#router for + // routers. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -46983,8 +46048,11 @@ type SecurityPolicyList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *SecurityPolicyListWarning `json:"warning,omitempty"` + Warning *RouterListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -47007,15 +46075,14 @@ type SecurityPolicyList struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyList +func (s *RouterList) MarshalJSON() ([]byte, error) { + type NoMethod RouterList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicyListWarning: [Output Only] Informational warning -// message. -type SecurityPolicyListWarning struct { +// RouterListWarning: [Output Only] Informational warning message. +type RouterListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -47083,7 +46150,7 @@ type SecurityPolicyListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SecurityPolicyListWarningData `json:"data,omitempty"` + Data []*RouterListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -47106,13 +46173,13 @@ type SecurityPolicyListWarning struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyListWarning +func (s *RouterListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RouterListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyListWarningData struct { +type RouterListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -47143,23 +46210,25 @@ type SecurityPolicyListWarningData struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyListWarningData +func (s *RouterListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RouterListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyRecaptchaOptionsConfig struct { - // RedirectSiteKey: An optional field to supply a reCAPTCHA site key to - // be used for all the rules using the redirect action with the type of - // GOOGLE_RECAPTCHA under the security policy. The specified site key - // needs to be created from the reCAPTCHA API. The user is responsible - // for the validity of the specified site key. If not specified, a - // Google-managed site key is used. This field is only supported in - // Global Security Policies of type CLOUD_ARMOR. - RedirectSiteKey string `json:"redirectSiteKey,omitempty"` +type RouterMd5AuthenticationKey struct { + // Key: [Input only] Value of the key. For patch and update calls, it + // can be skipped to copy the value from the previous configuration. + // This is allowed if the key with the same name existed before the + // operation. Maximum length is 80 characters. Can only contain + // printable ASCII characters. + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "RedirectSiteKey") to + // Name: Name used to identify the key. Must be unique within a router. + // Must be referenced by at least one bgpPeer. Must comply with RFC1035. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -47167,152 +46236,161 @@ type SecurityPolicyRecaptchaOptionsConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RedirectSiteKey") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SecurityPolicyRecaptchaOptionsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRecaptchaOptionsConfig +func (s *RouterMd5AuthenticationKey) MarshalJSON() ([]byte, error) { + type NoMethod RouterMd5AuthenticationKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyReference struct { - SecurityPolicy string `json:"securityPolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SecurityPolicy") 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. "SecurityPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} +// RouterNat: Represents a Nat resource. It enables the VMs within the +// specified subnetworks to access Internet without external IP +// addresses. It specifies a list of subnetworks (and the ranges within) +// that want to use NAT. Customers can also provide the external IPs +// that would be used for NAT. GCP would auto-allocate ephemeral IPs if +// no external IPs are provided. +type RouterNat struct { + // AutoNetworkTier: The network tier to use when automatically reserving + // IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, + // PREMIUM tier will be used. + // + // Possible values: + // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. + // "PREMIUM" - High quality, Google-grade network tier, support for + // all networking products. + // "STANDARD" - Public internet quality, only limited support for + // other networking products. + // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier + // for FIXED_STANDARD when fixed standard tier is expired or not + // configured. + AutoNetworkTier string `json:"autoNetworkTier,omitempty"` -func (s *SecurityPolicyReference) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // DrainNatIps: A list of URLs of the IP resources to be drained. These + // IPs must be valid static external IPs that have been assigned to the + // NAT. These IPs should be used for updating/patching a NAT only. + DrainNatIps []string `json:"drainNatIps,omitempty"` -// SecurityPolicyRule: Represents a rule that describes one or more -// match conditions along with the action to be taken when traffic -// matches this condition (allow or deny). -type SecurityPolicyRule struct { - // Action: The Action to perform when the rule is matched. The following - // are the valid actions: - allow: allow access to target. - - // deny(STATUS): deny access to target, returns the HTTP response code - // specified. Valid values for `STATUS` are 403, 404, and 502. - - // rate_based_ban: limit client traffic to the configured threshold and - // ban the client if the traffic exceeds the threshold. Configure - // parameters for this action in RateLimitOptions. Requires - // rate_limit_options to be set. - redirect: redirect to a different - // target. This can either be an internal reCAPTCHA redirect, or an - // external URL-based redirect via a 302 response. Parameters for this - // action can be configured via redirectOptions. This action is only - // supported in Global Security Policies of type CLOUD_ARMOR. - - // throttle: limit client traffic to the configured threshold. Configure - // parameters for this action in rateLimitOptions. Requires - // rate_limit_options to be set for this. - Action string `json:"action,omitempty"` + // EnableDynamicPortAllocation: Enable Dynamic Port Allocation. If not + // specified, it is disabled by default. If set to true, - Dynamic Port + // Allocation will be enabled on this NAT config. - + // enableEndpointIndependentMapping cannot be set to true. - If minPorts + // is set, minPortsPerVm must be set to a power of two greater than or + // equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will + // be allocated to a VM from this NAT config. + EnableDynamicPortAllocation bool `json:"enableDynamicPortAllocation,omitempty"` - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + EnableEndpointIndependentMapping bool `json:"enableEndpointIndependentMapping,omitempty"` - // Direction: The direction in which this rule applies. This field may - // only be specified when versioned_expr is set to FIREWALL. + // EndpointTypes: List of NAT-ted endpoint types supported by the Nat + // Gateway. If the list is empty, then it will be equivalent to include + // ENDPOINT_TYPE_VM // // Possible values: - // "EGRESS" - // "INGRESS" - Direction string `json:"direction,omitempty"` + // "ENDPOINT_TYPE_SWG" - This is used for Secure Web Gateway + // endpoints. + // "ENDPOINT_TYPE_VM" - This is the default. + EndpointTypes []string `json:"endpointTypes,omitempty"` - // EnableLogging: Denotes whether to enable logging for a particular - // rule. If logging is enabled, logs will be exported to the configured - // export destination in Stackdriver. Logs may be exported to BigQuery - // or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. - // This field may only be specified when the versioned_expr is set to - // FIREWALL. - EnableLogging bool `json:"enableLogging,omitempty"` + // IcmpIdleTimeoutSec: Timeout (in seconds) for ICMP connections. + // Defaults to 30s if not set. + IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` - // HeaderAction: Optional, additional actions that are performed on - // headers. This field is only supported in Global Security Policies of - // type CLOUD_ARMOR. - HeaderAction *SecurityPolicyRuleHttpHeaderAction `json:"headerAction,omitempty"` + // LogConfig: Configure logging on this NAT. + LogConfig *RouterNatLogConfig `json:"logConfig,omitempty"` - // Kind: [Output only] Type of the resource. Always - // compute#securityPolicyRule for security policy rules - Kind string `json:"kind,omitempty"` + // MaxPortsPerVm: Maximum number of ports allocated to a VM from this + // NAT config when Dynamic Port Allocation is enabled. If Dynamic Port + // Allocation is not enabled, this field has no effect. If Dynamic Port + // Allocation is enabled, and this field is set, it must be set to a + // power of two greater than minPortsPerVm, or 64 if minPortsPerVm is + // not set. If Dynamic Port Allocation is enabled and this field is not + // set, a maximum of 65536 ports will be allocated to a VM from this NAT + // config. + MaxPortsPerVm int64 `json:"maxPortsPerVm,omitempty"` - // Match: A match condition that incoming traffic is evaluated against. - // If it evaluates to true, the corresponding 'action' is enforced. - Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` + // MinPortsPerVm: Minimum number of ports allocated to a VM from this + // NAT config. If not set, a default number of ports is allocated to a + // VM. This is rounded up to the nearest power of 2. For example, if the + // value of this field is 50, at least 64 ports are allocated to a VM. + MinPortsPerVm int64 `json:"minPortsPerVm,omitempty"` - // PreconfiguredWafConfig: Preconfigured WAF configuration to be applied - // for the rule. If the rule does not evaluate preconfigured WAF rules, - // i.e., if evaluatePreconfiguredWaf() is not used, this field will have - // no effect. - PreconfiguredWafConfig *SecurityPolicyRulePreconfiguredWafConfig `json:"preconfiguredWafConfig,omitempty"` + // Name: Unique name of this Nat service. The name must be 1-63 + // characters long and comply with RFC1035. + Name string `json:"name,omitempty"` - // Preview: If set to true, the specified action is not enforced. - Preview bool `json:"preview,omitempty"` + // NatIpAllocateOption: Specify the NatIpAllocateOption, which can take + // one of the following values: - MANUAL_ONLY: Uses only Nat IP + // addresses provided by customers. When there are not enough specified + // Nat IPs, the Nat service fails for new VMs. - AUTO_ONLY: Nat IPs are + // allocated by Google Cloud Platform; customers can't specify any Nat + // IPs. When choosing AUTO_ONLY, then nat_ip should be empty. + // + // Possible values: + // "AUTO_ONLY" - Nat IPs are allocated by GCP; customers can not + // specify any Nat IPs. + // "MANUAL_ONLY" - Only use Nat IPs provided by customers. When + // specified Nat IPs are not enough then the Nat service fails for new + // VMs. + NatIpAllocateOption string `json:"natIpAllocateOption,omitempty"` - // Priority: An integer indicating the priority of a rule in the list. - // The priority must be a positive value between 0 and 2147483647. Rules - // are evaluated from highest to lowest priority where 0 is the highest - // priority and 2147483647 is the lowest priority. - Priority int64 `json:"priority,omitempty"` + // NatIps: A list of URLs of the IP resources used for this Nat service. + // These IP addresses must be valid static external IP addresses + // assigned to the project. + NatIps []string `json:"natIps,omitempty"` - // RateLimitOptions: Must be specified if the action is "rate_based_ban" - // or "throttle". Cannot be specified for any other actions. - RateLimitOptions *SecurityPolicyRuleRateLimitOptions `json:"rateLimitOptions,omitempty"` + // Rules: A list of rules associated with this NAT. + Rules []*RouterNatRule `json:"rules,omitempty"` - // RedirectOptions: Parameters defining the redirect action. Cannot be - // specified for any other actions. This field is only supported in - // Global Security Policies of type CLOUD_ARMOR. - RedirectOptions *SecurityPolicyRuleRedirectOptions `json:"redirectOptions,omitempty"` + // SourceSubnetworkIpRangesToNat: Specify the Nat option, which can take + // one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of + // the IP ranges in every Subnetwork are allowed to Nat. - + // ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges + // in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list + // of Subnetworks are allowed to Nat (specified in the field subnetwork + // below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. + // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then + // there should not be any other Router.Nat section in any Router for + // this network in this region. + // + // Possible values: + // "ALL_SUBNETWORKS_ALL_IP_RANGES" - All the IP ranges in every + // Subnetwork are allowed to Nat. + // "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES" - All the primary IP ranges + // in every Subnetwork are allowed to Nat. + // "LIST_OF_SUBNETWORKS" - A list of Subnetworks are allowed to Nat + // (specified in the field subnetwork below) + SourceSubnetworkIpRangesToNat string `json:"sourceSubnetworkIpRangesToNat,omitempty"` - // RuleNumber: Identifier for the rule. This is only unique within the - // given security policy. This can only be set during rule creation, if - // rule number is not specified it will be generated by the server. - RuleNumber int64 `json:"ruleNumber,omitempty,string"` + // Subnetworks: A list of Subnetwork resources whose traffic should be + // translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS + // is selected for the SubnetworkIpRangeToNatOption above. + Subnetworks []*RouterNatSubnetworkToNat `json:"subnetworks,omitempty"` - // RuleTupleCount: [Output Only] Calculation of the complexity of a - // single firewall security policy rule. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` + // TcpEstablishedIdleTimeoutSec: Timeout (in seconds) for TCP + // established connections. Defaults to 1200s if not set. + TcpEstablishedIdleTimeoutSec int64 `json:"tcpEstablishedIdleTimeoutSec,omitempty"` - // TargetResources: A list of network resource URLs to which this rule - // applies. This field allows you to control which network's VMs get - // this rule. If this field is left blank, all VMs within the - // organization will receive the rule. This field may only be specified - // when versioned_expr is set to FIREWALL. - TargetResources []string `json:"targetResources,omitempty"` + // TcpTimeWaitTimeoutSec: Timeout (in seconds) for TCP connections that + // are in TIME_WAIT state. Defaults to 120s if not set. + TcpTimeWaitTimeoutSec int64 `json:"tcpTimeWaitTimeoutSec,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating the sets - // of instances that are applied with this rule. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` + // TcpTransitoryIdleTimeoutSec: Timeout (in seconds) for TCP transitory + // connections. Defaults to 30s if not set. + TcpTransitoryIdleTimeoutSec int64 `json:"tcpTransitoryIdleTimeoutSec,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // UdpIdleTimeoutSec: Timeout (in seconds) for UDP connections. Defaults + // to 30s if not set. + UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to + // ForceSendFields is a list of field names (e.g. "AutoNetworkTier") 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 @@ -47320,36 +46398,7 @@ type SecurityPolicyRule struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyRule) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleHttpHeaderAction struct { - // RequestHeadersToAdds: The list of request headers to add or overwrite - // if they're already present. - RequestHeadersToAdds []*SecurityPolicyRuleHttpHeaderActionHttpHeaderOption `json:"requestHeadersToAdds,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "RequestHeadersToAdds") 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. "RequestHeadersToAdds") to + // NullFields is a list of field names (e.g. "AutoNetworkTier") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -47359,20 +46408,33 @@ type SecurityPolicyRuleHttpHeaderAction struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyRuleHttpHeaderAction) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleHttpHeaderAction +func (s *RouterNat) MarshalJSON() ([]byte, error) { + type NoMethod RouterNat raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyRuleHttpHeaderActionHttpHeaderOption struct { - // HeaderName: The name of the header to set. - HeaderName string `json:"headerName,omitempty"` +// RouterNatLogConfig: Configuration of logging on a NAT. +type RouterNatLogConfig struct { + // Enable: Indicates whether or not to export logs. This is false by + // default. + Enable bool `json:"enable,omitempty"` - // HeaderValue: The value to set the named header to. - HeaderValue string `json:"headerValue,omitempty"` + // Filter: Specify the desired filtering of logs on this NAT. If + // unspecified, logs are exported for all connections handled by this + // NAT. This option can take one of the following values: - ERRORS_ONLY: + // Export logs only for connection failures. - TRANSLATIONS_ONLY: Export + // logs only for successful connections. - ALL: Export logs for all + // connections, successful and unsuccessful. + // + // Possible values: + // "ALL" - Export logs for all (successful and unsuccessful) + // connections. + // "ERRORS_ONLY" - Export logs for connection failures only. + // "TRANSLATIONS_ONLY" - Export logs for successful connections only. + Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to + // ForceSendFields is a list of field names (e.g. "Enable") 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 @@ -47380,8 +46442,8 @@ type SecurityPolicyRuleHttpHeaderActionHttpHeaderOption struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -47389,43 +46451,37 @@ type SecurityPolicyRuleHttpHeaderActionHttpHeaderOption struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleHttpHeaderActionHttpHeaderOption +func (s *RouterNatLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod RouterNatLogConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicyRuleMatcher: Represents a match condition that incoming -// traffic is evaluated against. Exactly one field must be specified. -type SecurityPolicyRuleMatcher struct { - // Config: The configuration options available when specifying - // versioned_expr. This field must be specified if versioned_expr is - // specified and cannot be specified if versioned_expr is not specified. - Config *SecurityPolicyRuleMatcherConfig `json:"config,omitempty"` +type RouterNatRule struct { + // Action: The action to be enforced for traffic that matches this rule. + Action *RouterNatRuleAction `json:"action,omitempty"` - // Expr: User defined CEVAL expression. A CEVAL expression is used to - // specify match criteria such as origin.ip, source.region_code and - // contents in the request header. Expressions containing - // `evaluateThreatIntelligence` require Cloud Armor Managed Protection - // Plus tier and are not supported in Edge Policies nor in Regional - // Policies. Expressions containing - // `evaluatePreconfiguredExpr('sourceiplist-*')` require Cloud Armor - // Managed Protection Plus tier and are only supported in Global - // Security Policies. - Expr *Expr `json:"expr,omitempty"` + // Description: An optional description of this rule. + Description string `json:"description,omitempty"` - // VersionedExpr: Preconfigured versioned expression. If this field is - // specified, config must also be specified. Available preconfigured - // expressions along with their requirements are: SRC_IPS_V1 - must - // specify the corresponding src_ip_range field in config. - // - // Possible values: - // "FIREWALL" - // "SRC_IPS_V1" - Matches the source IP address of a request to the IP - // ranges supplied in config. - VersionedExpr string `json:"versionedExpr,omitempty"` + // Match: CEL expression that specifies the match condition that egress + // traffic from a VM is evaluated against. If it evaluates to true, the + // corresponding `action` is enforced. The following examples are valid + // match expressions for public NAT: "inIpRange(destination.ip, + // '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')" + // "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'" The + // following example is a valid match expression for private NAT: + // "nexthop.hub == + // 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-proje + // ct/global/hub/hub-1'" + Match string `json:"match,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to + // RuleNumber: An integer uniquely identifying a rule in the list. The + // rule number must be a positive value between 0 and 65000, and must be + // unique among rules within a NAT. + RuleNumber int64 `json:"ruleNumber,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") 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 @@ -47433,7 +46489,7 @@ type SecurityPolicyRuleMatcher struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API + // NullFields is a list of field names (e.g. "Action") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -47442,65 +46498,75 @@ type SecurityPolicyRuleMatcher struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcher +func (s *RouterNatRule) MarshalJSON() ([]byte, error) { + type NoMethod RouterNatRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyRuleMatcherConfig struct { - // DestIpRanges: CIDR IP address range. This field may only be specified - // when versioned_expr is set to FIREWALL. - DestIpRanges []string `json:"destIpRanges,omitempty"` - - // Layer4Configs: Pairs of IP protocols and ports that the rule should - // match. This field may only be specified when versioned_expr is set to - // FIREWALL. - Layer4Configs []*SecurityPolicyRuleMatcherConfigLayer4Config `json:"layer4Configs,omitempty"` +type RouterNatRuleAction struct { + // SourceNatActiveIps: A list of URLs of the IP resources used for this + // NAT rule. These IP addresses must be valid static external IP + // addresses assigned to the project. This field is used for public NAT. + SourceNatActiveIps []string `json:"sourceNatActiveIps,omitempty"` - // SrcIpRanges: CIDR IP address range. Maximum number of src_ip_ranges - // allowed is 10. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` + // SourceNatDrainIps: A list of URLs of the IP resources to be drained. + // These IPs must be valid static external IPs that have been assigned + // to the NAT. These IPs should be used for updating/patching a NAT rule + // only. This field is used for public NAT. + SourceNatDrainIps []string `json:"sourceNatDrainIps,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRanges") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "SourceNatActiveIps") + // 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. "DestIpRanges") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "SourceNatActiveIps") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SecurityPolicyRuleMatcherConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherConfig +func (s *RouterNatRuleAction) MarshalJSON() ([]byte, error) { + type NoMethod RouterNatRuleAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyRuleMatcherConfigLayer4Config struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol - // type is required when creating a firewall rule. This value can either - // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` +// RouterNatSubnetworkToNat: Defines the IP ranges that want to use NAT +// for a subnetwork. +type RouterNatSubnetworkToNat struct { + // Name: URL for the subnetwork resource that will use NAT. + Name string `json:"name,omitempty"` - // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. Example inputs include: ["22"], - // ["80","443"], and ["12345-12349"]. This field may only be specified - // when versioned_expr is set to FIREWALL. - Ports []string `json:"ports,omitempty"` + // SecondaryIpRangeNames: A list of the secondary ranges of the + // Subnetwork that are allowed to use NAT. This can be populated only if + // "LIST_OF_SECONDARY_IP_RANGES" is one of the values in + // source_ip_ranges_to_nat. + SecondaryIpRangeNames []string `json:"secondaryIpRangeNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to + // SourceIpRangesToNat: Specify the options for NAT ranges in the + // Subnetwork. All options of a single value are valid except + // NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with multiple + // values is: ["PRIMARY_IP_RANGE", "LIST_OF_SECONDARY_IP_RANGES"] + // Default: [ALL_IP_RANGES] + // + // Possible values: + // "ALL_IP_RANGES" - The primary and all the secondary ranges are + // allowed to Nat. + // "LIST_OF_SECONDARY_IP_RANGES" - A list of secondary ranges are + // allowed to Nat. + // "PRIMARY_IP_RANGE" - The primary range is allowed to Nat. + SourceIpRangesToNat []string `json:"sourceIpRangesToNat,omitempty"` + + // 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 @@ -47508,8 +46574,8 @@ type SecurityPolicyRuleMatcherConfigLayer4Config struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. @@ -47517,18 +46583,27 @@ type SecurityPolicyRuleMatcherConfigLayer4Config struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyRuleMatcherConfigLayer4Config) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherConfigLayer4Config +func (s *RouterNatSubnetworkToNat) MarshalJSON() ([]byte, error) { + type NoMethod RouterNatSubnetworkToNat raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyRulePreconfiguredWafConfig struct { - // Exclusions: A list of exclusions to apply during preconfigured WAF - // evaluation. - Exclusions []*SecurityPolicyRulePreconfiguredWafConfigExclusion `json:"exclusions,omitempty"` +type RouterStatus struct { + // BestRoutes: Best routes for this router's network. + BestRoutes []*Route `json:"bestRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Exclusions") to + // BestRoutesForRouter: Best routes learned by this router. + BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` + + BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` + + NatStatus []*RouterStatusNatStatus `json:"natStatus,omitempty"` + + // Network: URI of the network to which this router belongs. + Network string `json:"network,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BestRoutes") 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 @@ -47536,7 +46611,7 @@ type SecurityPolicyRulePreconfiguredWafConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Exclusions") to include in + // NullFields is a list of field names (e.g. "BestRoutes") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -47545,258 +46620,82 @@ type SecurityPolicyRulePreconfiguredWafConfig struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyRulePreconfiguredWafConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfig +func (s *RouterStatus) MarshalJSON() ([]byte, error) { + type NoMethod RouterStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyRulePreconfiguredWafConfigExclusion struct { - // RequestCookiesToExclude: A list of request cookie names whose value - // will be excluded from inspection during preconfigured WAF evaluation. - RequestCookiesToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestCookiesToExclude,omitempty"` +type RouterStatusBgpPeerStatus struct { + // AdvertisedRoutes: Routes that were advertised to the remote BGP peer + AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` - // RequestHeadersToExclude: A list of request header names whose value - // will be excluded from inspection during preconfigured WAF evaluation. - RequestHeadersToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestHeadersToExclude,omitempty"` + BfdStatus *BfdStatus `json:"bfdStatus,omitempty"` - // RequestQueryParamsToExclude: A list of request query parameter names - // whose value will be excluded from inspection during preconfigured WAF - // evaluation. Note that the parameter can be in the query string or in - // the POST body. - RequestQueryParamsToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestQueryParamsToExclude,omitempty"` + // EnableIpv6: Enable IPv6 traffic over BGP Peer. If not specified, it + // is disabled by default. + EnableIpv6 bool `json:"enableIpv6,omitempty"` - // RequestUrisToExclude: A list of request URIs from the request line to - // be excluded from inspection during preconfigured WAF evaluation. When - // specifying this field, the query or fragment part should be excluded. - RequestUrisToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestUrisToExclude,omitempty"` + // IpAddress: IP address of the local BGP interface. + IpAddress string `json:"ipAddress,omitempty"` - // TargetRuleIds: A list of target rule IDs under the WAF rule set to - // apply the preconfigured WAF exclusion. If omitted, it refers to all - // the rule IDs under the WAF rule set. - TargetRuleIds []string `json:"targetRuleIds,omitempty"` + // Ipv6NexthopAddress: IPv6 address of the local BGP interface. + Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` - // TargetRuleSet: Target WAF rule set to apply the preconfigured WAF - // exclusion. - TargetRuleSet string `json:"targetRuleSet,omitempty"` + // LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls. + LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RequestCookiesToExclude") 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:"-"` + // Md5AuthEnabled: Informs whether MD5 authentication is enabled on this + // BGP peer. + Md5AuthEnabled bool `json:"md5AuthEnabled,omitempty"` - // NullFields is a list of field names (e.g. "RequestCookiesToExclude") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // Name: Name of this BGP peer. Unique within the Routers resource. + Name string `json:"name,omitempty"` -func (s *SecurityPolicyRulePreconfiguredWafConfigExclusion) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusion - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // NumLearnedRoutes: Number of routes learned from the remote BGP Peer. + NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"` -type SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams struct { - // Op: The match operator for the field. - // - // Possible values: - // "CONTAINS" - The operator matches if the field value contains the - // specified value. - // "ENDS_WITH" - The operator matches if the field value ends with the - // specified value. - // "EQUALS" - The operator matches if the field value equals the - // specified value. - // "EQUALS_ANY" - The operator matches if the field value is any - // value. - // "STARTS_WITH" - The operator matches if the field value starts with - // the specified value. - Op string `json:"op,omitempty"` - - // Val: The value of the field. - Val string `json:"val,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Op") 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. "Op") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // PeerIpAddress: IP address of the remote BGP interface. + PeerIpAddress string `json:"peerIpAddress,omitempty"` -type SecurityPolicyRuleRateLimitOptions struct { - // BanDurationSec: Can only be specified if the action for the rule is - // "rate_based_ban". If specified, determines the time (in seconds) the - // traffic will continue to be banned by the rate limit after the rate - // falls below the threshold. - BanDurationSec int64 `json:"banDurationSec,omitempty"` + // PeerIpv6NexthopAddress: IPv6 address of the remote BGP interface. + PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` - // BanThreshold: Can only be specified if the action for the rule is - // "rate_based_ban". If specified, the key will be banned for the - // configured 'ban_duration_sec' when the number of requests that exceed - // the 'rate_limit_threshold' also exceed this 'ban_threshold'. - BanThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"banThreshold,omitempty"` + // RouterApplianceInstance: [Output only] URI of the VM instance that is + // used as third-party router appliances such as Next Gen Firewalls, + // Virtual Routers, or Router Appliances. The VM instance is the peer + // side of the BGP session. + RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` - // ConformAction: Action to take for requests that are under the - // configured rate limit threshold. Valid option is "allow" only. - ConformAction string `json:"conformAction,omitempty"` + // State: The state of the BGP session. For a list of possible values + // for this field, see BGP session states. + State string `json:"state,omitempty"` - // EnforceOnKey: Determines the key to enforce the rate_limit_threshold - // on. Possible values are: - ALL: A single rate limit threshold is - // applied to all the requests matching this rule. This is the default - // value if "enforceOnKey" is not configured. - IP: The source IP - // address of the request is the key. Each IP has this limit enforced - // separately. - HTTP_HEADER: The value of the HTTP header whose name is - // configured under "enforceOnKeyName". The key value is truncated to - // the first 128 bytes of the header value. If no such header is present - // in the request, the key type defaults to ALL. - XFF_IP: The first IP - // address (i.e. the originating client IP address) specified in the - // list of IPs under X-Forwarded-For HTTP header. If no such header is - // present or the value is not a valid IP, the key defaults to the - // source IP address of the request i.e. key type IP. - HTTP_COOKIE: The - // value of the HTTP cookie whose name is configured under - // "enforceOnKeyName". The key value is truncated to the first 128 bytes - // of the cookie value. If no such cookie is present in the request, the - // key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP - // request. The key value is truncated to the first 128 bytes. - SNI: - // Server name indication in the TLS session of the HTTPS request. The - // key value is truncated to the first 128 bytes. The key type defaults - // to ALL on a HTTP session. - REGION_CODE: The country/region from - // which the request originates. + // Status: Status of the BGP peer: {UP, DOWN} // // Possible values: - // "ALL" - // "ALL_IPS" - // "HTTP_COOKIE" - // "HTTP_HEADER" - // "HTTP_PATH" - // "IP" - // "REGION_CODE" - // "SNI" - // "XFF_IP" - EnforceOnKey string `json:"enforceOnKey,omitempty"` - - // EnforceOnKeyConfigs: If specified, any combination of values of - // enforce_on_key_type/enforce_on_key_name is treated as the key on - // which ratelimit threshold/action is enforced. You can specify up to 3 - // enforce_on_key_configs. If enforce_on_key_configs is specified, - // enforce_on_key must not be specified. - EnforceOnKeyConfigs []*SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig `json:"enforceOnKeyConfigs,omitempty"` - - // EnforceOnKeyName: Rate limit key name applicable only for the - // following key types: HTTP_HEADER -- Name of the HTTP header whose - // value is taken as the key value. HTTP_COOKIE -- Name of the HTTP - // cookie whose value is taken as the key value. - EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` - - // ExceedAction: Action to take for requests that are above the - // configured rate limit threshold, to either deny with a specified HTTP - // response code, or redirect to a different endpoint. Valid options are - // `deny(STATUS)`, where valid values for `STATUS` are 403, 404, 429, - // and 502, and `redirect`, where the redirect parameters come from - // `exceedRedirectOptions` below. The `redirect` action is only - // supported in Global Security Policies of type CLOUD_ARMOR. - ExceedAction string `json:"exceedAction,omitempty"` - - // ExceedRedirectOptions: Parameters defining the redirect action that - // is used as the exceed action. Cannot be specified if the exceed - // action is not redirect. This field is only supported in Global - // Security Policies of type CLOUD_ARMOR. - ExceedRedirectOptions *SecurityPolicyRuleRedirectOptions `json:"exceedRedirectOptions,omitempty"` - - // RateLimitThreshold: Threshold at which to begin ratelimiting. - RateLimitThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"rateLimitThreshold,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BanDurationSec") 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. "BanDurationSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyRuleRateLimitOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { - // EnforceOnKeyName: Rate limit key name applicable only for the - // following key types: HTTP_HEADER -- Name of the HTTP header whose - // value is taken as the key value. HTTP_COOKIE -- Name of the HTTP - // cookie whose value is taken as the key value. - EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` + // "DOWN" + // "UNKNOWN" + // "UP" + Status string `json:"status,omitempty"` - // EnforceOnKeyType: Determines the key to enforce the - // rate_limit_threshold on. Possible values are: - ALL: A single rate - // limit threshold is applied to all the requests matching this rule. - // This is the default value if "enforceOnKeyConfigs" is not configured. - // - IP: The source IP address of the request is the key. Each IP has - // this limit enforced separately. - HTTP_HEADER: The value of the HTTP - // header whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the header value. If no - // such header is present in the request, the key type defaults to ALL. - // - XFF_IP: The first IP address (i.e. the originating client IP - // address) specified in the list of IPs under X-Forwarded-For HTTP - // header. If no such header is present or the value is not a valid IP, - // the key defaults to the source IP address of the request i.e. key - // type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is - // configured under "enforceOnKeyName". The key value is truncated to - // the first 128 bytes of the cookie value. If no such cookie is present - // in the request, the key type defaults to ALL. - HTTP_PATH: The URL - // path of the HTTP request. The key value is truncated to the first 128 - // bytes. - SNI: Server name indication in the TLS session of the HTTPS - // request. The key value is truncated to the first 128 bytes. The key - // type defaults to ALL on a HTTP session. - REGION_CODE: The - // country/region from which the request originates. + // StatusReason: Indicates why particular status was returned. // // Possible values: - // "ALL" - // "ALL_IPS" - // "HTTP_COOKIE" - // "HTTP_HEADER" - // "HTTP_PATH" - // "IP" - // "REGION_CODE" - // "SNI" - // "XFF_IP" - EnforceOnKeyType string `json:"enforceOnKeyType,omitempty"` + // "MD5_AUTH_INTERNAL_PROBLEM" - Indicates internal problems with + // configuration of MD5 authentication. This particular reason can only + // be returned when md5AuthEnabled is true and status is DOWN. + // "STATUS_REASON_UNSPECIFIED" + StatusReason string `json:"statusReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnforceOnKeyName") to + // Uptime: Time this session has been up. Format: 14 years, 51 weeks, 6 + // days, 23 hours, 59 minutes, 59 seconds + Uptime string `json:"uptime,omitempty"` + + // UptimeSeconds: Time this session has been up, in seconds. Format: 145 + UptimeSeconds string `json:"uptimeSeconds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") 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 @@ -47804,7 +46703,7 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnforceOnKeyName") to + // NullFields is a list of field names (e.g. "AdvertisedRoutes") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -47814,122 +46713,59 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { NullFields []string `json:"-"` } -func (s *SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptionsThreshold struct { - // Count: Number of HTTP(S) requests for calculating the threshold. - Count int64 `json:"count,omitempty"` - - // IntervalSec: Interval over which the threshold is computed. - IntervalSec int64 `json:"intervalSec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SecurityPolicyRuleRateLimitOptionsThreshold) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptionsThreshold +func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { + type NoMethod RouterStatusBgpPeerStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SecurityPolicyRuleRedirectOptions struct { - // Target: Target for the redirect action. This is required if the type - // is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. - Target string `json:"target,omitempty"` +// RouterStatusNatStatus: Status of a NAT contained in this router. +type RouterStatusNatStatus struct { + // AutoAllocatedNatIps: A list of IPs auto-allocated for NAT. Example: + // ["1.1.1.1", "129.2.16.89"] + AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` - // Type: Type of the redirect action. - // - // Possible values: - // "EXTERNAL_302" - // "GOOGLE_RECAPTCHA" - Type string `json:"type,omitempty"` + // DrainAutoAllocatedNatIps: A list of IPs auto-allocated for NAT that + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. + DrainAutoAllocatedNatIps []string `json:"drainAutoAllocatedNatIps,omitempty"` - // ForceSendFields is a list of field names (e.g. "Target") 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:"-"` + // DrainUserAllocatedNatIps: A list of IPs user-allocated for NAT that + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. + DrainUserAllocatedNatIps []string `json:"drainUserAllocatedNatIps,omitempty"` - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will + // be greater than 0 only if user-specified IPs are NOT enough to allow + // all configured VMs to use NAT. This value is meaningful only when + // auto-allocation of NAT IPs is *not* used. + MinExtraNatIpsNeeded int64 `json:"minExtraNatIpsNeeded,omitempty"` -func (s *SecurityPolicyRuleRedirectOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRedirectOptions - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Name: Unique name of this NAT. + Name string `json:"name,omitempty"` -// SecuritySettings: The authentication and authorization settings for a -// BackendService. -type SecuritySettings struct { - // Authentication: [Deprecated] Use clientTlsPolicy instead. - Authentication string `json:"authentication,omitempty"` + // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., Nics) + // that can use NAT. + NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - // AwsV4Authentication: The configuration needed to generate a signature - // for access to private storage buckets that support AWS's Signature - // Version 4 for authentication. Allowed only for INTERNET_IP_PORT and - // INTERNET_FQDN_PORT NEG backends. - AwsV4Authentication *AWSV4Signature `json:"awsV4Authentication,omitempty"` + // RuleStatus: Status of rules in this NAT. + RuleStatus []*RouterStatusNatStatusNatRuleStatus `json:"ruleStatus,omitempty"` - // ClientTlsPolicy: Optional. A URL referring to a - // networksecurity.ClientTlsPolicy resource that describes how clients - // should authenticate with this service's backends. clientTlsPolicy - // only applies to a global BackendService with the loadBalancingScheme - // set to INTERNAL_SELF_MANAGED. If left blank, communications are not - // encrypted. Note: This field currently has no impact. - ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"` + // UserAllocatedNatIpResources: A list of fully qualified URLs of + // reserved IP address resources. + UserAllocatedNatIpResources []string `json:"userAllocatedNatIpResources,omitempty"` - // SubjectAltNames: Optional. A list of Subject Alternative Names (SANs) - // that the client verifies during a mutual TLS handshake with an - // server/endpoint for this BackendService. When the server presents its - // X.509 certificate to the client, the client inspects the - // certificate's subjectAltName field. If the field contains one of the - // specified values, the communication continues. Otherwise, it fails. - // This additional check enables the client to verify that the server is - // authorized to run the requested service. Note that the contents of - // the server certificate's subjectAltName field are configured by the - // Public Key Infrastructure which provisions server identities. Only - // applies to a global BackendService with loadBalancingScheme set to - // INTERNAL_SELF_MANAGED. Only applies when BackendService has an - // attached clientTlsPolicy with clientCertificate (mTLS mode). Note: - // This field currently has no impact. - SubjectAltNames []string `json:"subjectAltNames,omitempty"` + // UserAllocatedNatIps: A list of IPs user-allocated for NAT. They will + // be raw IP strings like "179.12.26.133". + UserAllocatedNatIps []string `json:"userAllocatedNatIps,omitempty"` - // ForceSendFields is a list of field names (e.g. "Authentication") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AutoAllocatedNatIps") + // 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. "Authentication") to + // NullFields is a list of field names (e.g. "AutoAllocatedNatIps") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -47939,44 +46775,36 @@ type SecuritySettings struct { NullFields []string `json:"-"` } -func (s *SecuritySettings) MarshalJSON() ([]byte, error) { - type NoMethod SecuritySettings +func (s *RouterStatusNatStatus) MarshalJSON() ([]byte, error) { + type NoMethod RouterStatusNatStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SerialPortOutput: An instance serial console output. -type SerialPortOutput struct { - // Contents: [Output Only] The contents of the console output. - Contents string `json:"contents,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#serialPortOutput for serial port output. - Kind string `json:"kind,omitempty"` +// RouterStatusNatStatusNatRuleStatus: Status of a NAT Rule contained in +// this NAT. +type RouterStatusNatStatusNatRuleStatus struct { + // ActiveNatIps: A list of active IPs for NAT. Example: ["1.1.1.1", + // "179.12.26.133"]. + ActiveNatIps []string `json:"activeNatIps,omitempty"` - // Next: [Output Only] The position of the next byte of content, - // regardless of whether the content exists, following the output - // returned in the `contents` property. Use this value in the next - // request as the start parameter. - Next int64 `json:"next,omitempty,string"` + // DrainNatIps: A list of IPs for NAT that are in drain mode. Example: + // ["1.1.1.1", "179.12.26.133"]. + DrainNatIps []string `json:"drainNatIps,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // MinExtraIpsNeeded: The number of extra IPs to allocate. This will be + // greater than 0 only if the existing IPs in this NAT Rule are NOT + // enough to allow all configured VMs to use NAT. + MinExtraIpsNeeded int64 `json:"minExtraIpsNeeded,omitempty"` - // Start: The starting byte position of the output that was returned. - // This should match the start parameter sent with the request. If the - // serial console output exceeds the size of the buffer (1 MB), older - // output is overwritten by newer content. The output start value will - // indicate the byte position of the output that was returned, which - // might be different than the `start` value that was specified in the - // request. - Start int64 `json:"start,omitempty,string"` + // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., NICs) + // that have NAT Mappings from this NAT Rule. + NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // RuleNumber: Rule number of the rule. + RuleNumber int64 `json:"ruleNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Contents") to + // ForceSendFields is a list of field names (e.g. "ActiveNatIps") 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 @@ -47984,63 +46812,32 @@ type SerialPortOutput struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ActiveNatIps") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SerialPortOutput) MarshalJSON() ([]byte, error) { - type NoMethod SerialPortOutput +func (s *RouterStatusNatStatusNatRuleStatus) MarshalJSON() ([]byte, error) { + type NoMethod RouterStatusNatStatusNatRuleStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ServerBinding struct { - // Possible values: - // "RESTART_NODE_ON_ANY_SERVER" - Node may associate with any physical - // server over its lifetime. - // "RESTART_NODE_ON_MINIMAL_SERVERS" - Node may associate with minimal - // physical servers over its lifetime. - // "SERVER_BINDING_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Type") 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. "Type") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ServerBinding) MarshalJSON() ([]byte, error) { - type NoMethod ServerBinding - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +type RouterStatusResponse struct { + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` -// ServiceAccount: A service account. -type ServiceAccount struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` + Result *RouterStatus `json:"result,omitempty"` - // Scopes: The list of scopes to be made available for this service - // account. - Scopes []string `json:"scopes,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Email") to + // ForceSendFields is a list of field names (e.g. "Kind") 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 @@ -48048,7 +46845,7 @@ type ServiceAccount struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Email") to include in API + // NullFields is a list of field names (e.g. "Kind") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -48057,189 +46854,52 @@ type ServiceAccount struct { NullFields []string `json:"-"` } -func (s *ServiceAccount) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAccount +func (s *RouterStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod RouterStatusResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAttachment: Represents a ServiceAttachment resource. A service -// attachment represents a service that a producer has exposed. It -// encapsulates the load balancer which fronts the service runs and a -// list of NAT IP ranges that the producers uses to represent the -// consumers connecting to the service. -type ServiceAttachment struct { - // ConnectedEndpoints: [Output Only] An array of connections for all the - // consumers connected to this service attachment. - ConnectedEndpoints []*ServiceAttachmentConnectedEndpoint `json:"connectedEndpoints,omitempty"` - - // ConnectionPreference: The connection preference of service - // attachment. The value can be set to ACCEPT_AUTOMATIC. An - // ACCEPT_AUTOMATIC service attachment is one that always accepts the - // connection from consumer forwarding rules. - // - // Possible values: - // "ACCEPT_AUTOMATIC" - // "ACCEPT_MANUAL" - // "CONNECTION_PREFERENCE_UNSPECIFIED" - ConnectionPreference string `json:"connectionPreference,omitempty"` - - // ConsumerAcceptLists: Projects that are allowed to connect to this - // service attachment. - ConsumerAcceptLists []*ServiceAttachmentConsumerProjectLimit `json:"consumerAcceptLists,omitempty"` - - // ConsumerRejectLists: Projects that are not allowed to connect to this - // service attachment. The project can be specified using its id or - // number. - ConsumerRejectLists []string `json:"consumerRejectLists,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DomainNames: If specified, the domain name will be used during the - // integration between the PSC connected endpoints and the Cloud DNS. - // For example, this is a valid domain name: "p.mycompany.com.". Current - // max number of domain names supported is 1. - DomainNames []string `json:"domainNames,omitempty"` - - // EnableProxyProtocol: If true, enable the proxy protocol which is for - // supplying client TCP/IP address data in TCP connections that traverse - // proxies on their way to destination servers. - EnableProxyProtocol bool `json:"enableProxyProtocol,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a ServiceAttachment. An - // up-to-date fingerprint must be provided in order to patch/update the - // ServiceAttachment; otherwise, the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve the ServiceAttachment. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The unique identifier for the resource type. The - // server generates this identifier. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#serviceAttachment for service attachments. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NatSubnets: An array of URLs where each entry is the URL of a subnet - // provided by the service producer to use for NAT in this service - // attachment. - NatSubnets []string `json:"natSubnets,omitempty"` - - // ProducerForwardingRule: The URL of a forwarding rule with - // loadBalancingScheme INTERNAL* that is serving the endpoint identified - // by this service attachment. - ProducerForwardingRule string `json:"producerForwardingRule,omitempty"` - - // PscServiceAttachmentId: [Output Only] An 128-bit global unique ID of - // the PSC service attachment. - PscServiceAttachmentId *Uint128 `json:"pscServiceAttachmentId,omitempty"` - - // ReconcileConnections: This flag determines whether a consumer - // accept/reject list change can reconcile the statuses of existing - // ACCEPTED or REJECTED PSC endpoints. - If false, connection policy - // update will only affect existing PENDING PSC endpoints. Existing - // ACCEPTED/REJECTED endpoints will remain untouched regardless how the - // connection policy is modified . - If true, update will affect both - // PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED - // PSC endpoint will be moved to REJECTED if its project is added to the - // reject list. For newly created service attachment, this boolean - // defaults to true. - ReconcileConnections bool `json:"reconcileConnections,omitempty"` - - // Region: [Output Only] URL of the region where the service attachment - // resides. This field applies only to the region resource. You must - // specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TargetService: The URL of a service serving the endpoint identified - // by this service attachment. - TargetService string `json:"targetService,omitempty"` +type RoutersPreviewResponse struct { + // Resource: Preview of given router. + Resource *Router `json:"resource,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConnectedEndpoints") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Resource") 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. "ConnectedEndpoints") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Resource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ServiceAttachment) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachment +func (s *RoutersPreviewResponse) MarshalJSON() ([]byte, error) { + type NoMethod RoutersPreviewResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAttachmentAggregatedList: Contains a list of -// ServiceAttachmentsScopedList. -type ServiceAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of ServiceAttachmentsScopedList resources. - Items map[string]ServiceAttachmentsScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *ServiceAttachmentAggregatedListWarning `json:"warning,omitempty"` +type RoutersScopedList struct { + // Routers: A list of routers contained in this scope. + Routers []*Router `json:"routers,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: Informational warning which replaces the list of routers + // when the list is empty. + Warning *RoutersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Routers") 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 @@ -48247,8 +46907,8 @@ type ServiceAttachmentAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Routers") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -48256,15 +46916,15 @@ type ServiceAttachmentAggregatedList struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedList +func (s *RoutersScopedList) MarshalJSON() ([]byte, error) { + type NoMethod RoutersScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAttachmentAggregatedListWarning: [Output Only] Informational -// warning message. -type ServiceAttachmentAggregatedListWarning struct { +// RoutersScopedListWarning: Informational warning which replaces the +// list of routers when the list is empty. +type RoutersScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -48332,7 +46992,7 @@ type ServiceAttachmentAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ServiceAttachmentAggregatedListWarningData `json:"data,omitempty"` + Data []*RoutersScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -48355,13 +47015,13 @@ type ServiceAttachmentAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedListWarning +func (s *RoutersScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod RoutersScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ServiceAttachmentAggregatedListWarningData struct { +type RoutersScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -48392,37 +47052,45 @@ type ServiceAttachmentAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedListWarningData +func (s *RoutersScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RoutersScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAttachmentConnectedEndpoint: [Output Only] A connection -// connected to this service attachment. -type ServiceAttachmentConnectedEndpoint struct { - // Endpoint: The url of a connected endpoint. - Endpoint string `json:"endpoint,omitempty"` - - // PscConnectionId: The PSC connection id of the connected endpoint. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - - // Status: The status of a connected endpoint to this service - // attachment. +// Rule: This is deprecated and has no effect. Do not use. +type Rule struct { + // Action: This is deprecated and has no effect. Do not use. // // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer. - // "NEEDS_ATTENTION" - The connection has been accepted by the - // producer, but the producer needs to take further action before the - // forwarding rule can serve traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The consumer is still connected but not using the - // connection. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` + // "ALLOW" - This is deprecated and has no effect. Do not use. + // "ALLOW_WITH_LOG" - This is deprecated and has no effect. Do not + // use. + // "DENY" - This is deprecated and has no effect. Do not use. + // "DENY_WITH_LOG" - This is deprecated and has no effect. Do not use. + // "LOG" - This is deprecated and has no effect. Do not use. + // "NO_ACTION" - This is deprecated and has no effect. Do not use. + Action string `json:"action,omitempty"` - // ForceSendFields is a list of field names (e.g. "Endpoint") to + // Conditions: This is deprecated and has no effect. Do not use. + Conditions []*Condition `json:"conditions,omitempty"` + + // Description: This is deprecated and has no effect. Do not use. + Description string `json:"description,omitempty"` + + // Ins: This is deprecated and has no effect. Do not use. + Ins []string `json:"ins,omitempty"` + + // LogConfigs: This is deprecated and has no effect. Do not use. + LogConfigs []*LogConfig `json:"logConfigs,omitempty"` + + // NotIns: This is deprecated and has no effect. Do not use. + NotIns []string `json:"notIns,omitempty"` + + // Permissions: This is deprecated and has no effect. Do not use. + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -48430,8 +47098,8 @@ type ServiceAttachmentConnectedEndpoint struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoint") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -48439,24 +47107,77 @@ type ServiceAttachmentConnectedEndpoint struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentConnectedEndpoint +func (s *Rule) MarshalJSON() ([]byte, error) { + type NoMethod Rule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ServiceAttachmentConsumerProjectLimit struct { - // ConnectionLimit: The value of the limit to set. - ConnectionLimit int64 `json:"connectionLimit,omitempty"` +type SSLHealthCheck struct { + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. + Port int64 `json:"port,omitempty"` - // NetworkUrl: The network URL for the network to set the limit for. - NetworkUrl string `json:"networkUrl,omitempty"` + // PortName: Not supported. + PortName string `json:"portName,omitempty"` - // ProjectIdOrNum: The project id or number for the project to set the - // limit for. - ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. + // + // Possible values: + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. + PortSpecification string `json:"portSpecification,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConnectionLimit") to + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` + + // Request: Instructs the health check prober to send this exact ASCII + // string, up to 1024 bytes in length, after establishing the TCP + // connection and SSL handshake. + Request string `json:"request,omitempty"` + + // Response: Creates a content-based SSL health check. In addition to + // establishing a TCP connection and the TLS handshake, you can + // configure the health check to pass only when the backend sends this + // exact response ASCII string, up to 1024 bytes in length. For details, + // see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp + Response string `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Port") 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 @@ -48464,53 +47185,109 @@ type ServiceAttachmentConsumerProjectLimit struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionLimit") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Port") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ServiceAttachmentConsumerProjectLimit) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentConsumerProjectLimit +func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod SSLHealthCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ServiceAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +// SavedAttachedDisk: DEPRECATED: Please use compute#savedDisk instead. +// An instance-attached disk resource. +type SavedAttachedDisk struct { + // AutoDelete: Specifies whether the disk will be auto-deleted when the + // instance is deleted (but not when the disk is detached from the + // instance). + AutoDelete bool `json:"autoDelete,omitempty"` - // Items: A list of ServiceAttachment resources. - Items []*ServiceAttachment `json:"items,omitempty"` + // Boot: Indicates that this is a boot disk. The virtual machine will + // use the first partition of the disk for its root filesystem. + Boot bool `json:"boot,omitempty"` - // Kind: [Output Only] Type of the resource. Always - // compute#serviceAttachment for service attachments. + // DeviceName: Specifies the name of the disk attached to the source + // instance. + DeviceName string `json:"deviceName,omitempty"` + + // DiskEncryptionKey: The encryption key for the disk. + DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` + + // DiskSizeGb: The size of the disk in base-2 GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // DiskType: [Output Only] URL of the disk type resource. For example: + // projects/project /zones/zone/diskTypes/pd-standard or pd-ssd + DiskType string `json:"diskType,omitempty"` + + // GuestOsFeatures: A list of features to enable on the guest operating + // system. Applicable only for bootable images. Read Enabling guest + // operating system features to see a list of available options. + GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` + + // Index: Specifies zero-based index of the disk that is attached to the + // source instance. + Index int64 `json:"index,omitempty"` + + // Interface: Specifies the disk interface to use for attaching this + // disk, which is either SCSI or NVME. + // + // Possible values: + // "NVME" + // "SCSI" + Interface string `json:"interface,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#attachedDisk + // for attached disks. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // Licenses: [Output Only] Any valid publicly visible licenses. + Licenses []string `json:"licenses,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // Mode: The mode in which this disk is attached to the source instance, + // either READ_WRITE or READ_ONLY. + // + // Possible values: + // "READ_ONLY" - Attaches this disk in read-only mode. Multiple + // virtual machines can use a disk in read-only mode at a time. + // "READ_WRITE" - *[Default]* Attaches this disk in read-write mode. + // Only one virtual machine at a time can be attached to a disk in + // read-write mode. + Mode string `json:"mode,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ServiceAttachmentListWarning `json:"warning,omitempty"` + // Source: Specifies a URL of the disk attached to the source instance. + Source string `json:"source,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // StorageBytes: [Output Only] A size of the storage used by the disk's + // snapshot by this machine image. + StorageBytes int64 `json:"storageBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Id") to + // StorageBytesStatus: [Output Only] An indicator whether storageBytes + // is in a stable state or it is being adjusted as a result of shared + // storage reallocation. This status can either be UPDATING, meaning the + // size of the snapshot is being updated, or UP_TO_DATE, meaning the + // size of the snapshot is up-to-date. + // + // Possible values: + // "UPDATING" + // "UP_TO_DATE" + StorageBytesStatus string `json:"storageBytesStatus,omitempty"` + + // Type: Specifies the type of the attached disk, either SCRATCH or + // PERSISTENT. + // + // Possible values: + // "PERSISTENT" + // "SCRATCH" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoDelete") 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 @@ -48518,8 +47295,8 @@ type ServiceAttachmentList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "AutoDelete") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -48527,89 +47304,47 @@ type ServiceAttachmentList struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentList +func (s *SavedAttachedDisk) MarshalJSON() ([]byte, error) { + type NoMethod SavedAttachedDisk raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAttachmentListWarning: [Output Only] Informational warning -// message. -type ServiceAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. +// SavedDisk: An instance-attached disk resource. +type SavedDisk struct { + // Architecture: [Output Only] The architecture of the attached disk. // // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture + // is not set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*ServiceAttachmentListWarningData `json:"data,omitempty"` + // Kind: [Output Only] Type of the resource. Always compute#savedDisk + // for attached disks. + Kind string `json:"kind,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // SourceDisk: Specifies a URL of the disk attached to the source + // instance. + SourceDisk string `json:"sourceDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // StorageBytes: [Output Only] Size of the individual disk snapshot used + // by this machine image. + StorageBytes int64 `json:"storageBytes,omitempty,string"` + + // StorageBytesStatus: [Output Only] An indicator whether storageBytes + // is in a stable state or it is being adjusted as a result of shared + // storage reallocation. This status can either be UPDATING, meaning the + // size of the snapshot is being updated, or UP_TO_DATE, meaning the + // size of the snapshot is up-to-date. + // + // Possible values: + // "UPDATING" + // "UP_TO_DATE" + StorageBytesStatus string `json:"storageBytesStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Architecture") 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 @@ -48617,36 +47352,46 @@ type ServiceAttachmentListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Architecture") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ServiceAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentListWarning +func (s *SavedDisk) MarshalJSON() ([]byte, error) { + type NoMethod SavedDisk raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ServiceAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type ScalingScheduleStatus struct { + // LastStartTime: [Output Only] The last time the scaling schedule + // became active. Note: this is a timestamp when a schedule actually + // became active, not when it was planned to do so. The timestamp is in + // RFC3339 text format. + LastStartTime string `json:"lastStartTime,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // NextStartTime: [Output Only] The next time the scaling schedule is to + // become active. Note: this is a timestamp when a schedule is planned + // to run, but the actual time might be slightly different. The + // timestamp is in RFC3339 text format. + NextStartTime string `json:"nextStartTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // State: [Output Only] The current state of a scaling schedule. + // + // Possible values: + // "ACTIVE" - The current autoscaling recommendation is influenced by + // this scaling schedule. + // "DISABLED" - This scaling schedule has been disabled by the user. + // "OBSOLETE" - This scaling schedule will never become active again. + // "READY" - The current autoscaling recommendation is not influenced + // by this scaling schedule. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LastStartTime") 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 @@ -48654,39 +47399,126 @@ type ServiceAttachmentListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "LastStartTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ServiceAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentListWarningData +func (s *ScalingScheduleStatus) MarshalJSON() ([]byte, error) { + type NoMethod ScalingScheduleStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ServiceAttachmentsScopedList struct { - // ServiceAttachments: A list of ServiceAttachments contained in this - // scope. - ServiceAttachments []*ServiceAttachment `json:"serviceAttachments,omitempty"` +// Scheduling: Sets the scheduling options for an Instance. +type Scheduling struct { + // AutomaticRestart: Specifies whether the instance should be + // automatically restarted if it is terminated by Compute Engine (not + // terminated by a user). You can only set the automatic restart option + // for standard instances. Preemptible instances cannot be automatically + // restarted. By default, this is set to true so an instance is + // automatically restarted if it is terminated by Compute Engine. + AutomaticRestart *bool `json:"automaticRestart,omitempty"` - // Warning: Informational warning which replaces the list of service - // attachments when the list is empty. - Warning *ServiceAttachmentsScopedListWarning `json:"warning,omitempty"` + // HostErrorTimeoutSeconds: Specify the time in seconds for host error + // detection, the value must be within the range of [90, 330] with the + // increment of 30, if unset, the default behavior of host error + // recovery will be used. + HostErrorTimeoutSeconds int64 `json:"hostErrorTimeoutSeconds,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceAttachments") - // to unconditionally include in API requests. By default, fields with + // InstanceTerminationAction: Specifies the termination action for the + // instance. + // + // Possible values: + // "DELETE" - Delete the VM. + // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This + // value is unused. + // "STOP" - Stop the VM without storing in-memory content. default + // action. + InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` + + // LocationHint: An opaque location hint used to place the instance + // close to other resources. This field is for use by internal tools + // that use the public API. + LocationHint string `json:"locationHint,omitempty"` + + // MaintenanceFreezeDurationHours: Specifies the number of hours after + // VM instance creation where the VM won't be scheduled for maintenance. + MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` + + // MaintenanceInterval: Specifies the frequency of planned maintenance + // events. The accepted values are: `PERIODIC`. + // + // Possible values: + // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a + // periodic basis, minimizing the number of maintenance operations (live + // migrations or terminations) on an individual VM. This may mean a VM + // will take longer to receive an update than if it was configured for + // AS_NEEDED. Security updates will still be applied as soon as they are + // available. + MaintenanceInterval string `json:"maintenanceInterval,omitempty"` + + // MaxRunDuration: Specifies the max run duration for the given + // instance. If specified, the instance termination action will be + // performed at the end of the run duration. + MaxRunDuration *Duration `json:"maxRunDuration,omitempty"` + + // MinNodeCpus: The minimum number of virtual CPUs this instance will + // consume when running on a sole-tenant node. + MinNodeCpus int64 `json:"minNodeCpus,omitempty"` + + // NodeAffinities: A set of node affinity and anti-affinity + // configurations. Refer to Configuring node affinity for more + // information. Overrides reservationAffinity. + NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"` + + // OnHostMaintenance: Defines the maintenance behavior for this + // instance. For standard instances, the default behavior is MIGRATE. + // For preemptible instances, the default and only possible behavior is + // TERMINATE. For more information, see Set VM host maintenance policy. + // + // Possible values: + // "MIGRATE" - *[Default]* Allows Compute Engine to automatically + // migrate instances out of the way of maintenance events. + // "TERMINATE" - Tells Compute Engine to terminate and (optionally) + // restart the instance away from the maintenance activity. If you would + // like your instance to be restarted, set the automaticRestart flag to + // true. Your instance may be restarted more than once, and it may be + // restarted outside the window of maintenance events. + OnHostMaintenance string `json:"onHostMaintenance,omitempty"` + + // Preemptible: Defines whether the instance is preemptible. This can + // only be set during instance creation or while the instance is stopped + // and therefore, in a `TERMINATED` state. See Instance Life Cycle for + // more information on the possible instance states. + Preemptible bool `json:"preemptible,omitempty"` + + // ProvisioningModel: Specifies the provisioning model of the instance. + // + // Possible values: + // "SPOT" - Heavily discounted, no guaranteed runtime. + // "STANDARD" - Standard provisioning with user controlled runtime, no + // discounts. + ProvisioningModel string `json:"provisioningModel,omitempty"` + + // TerminationTime: Specifies the timestamp, when the instance will be + // terminated, in RFC3339 text format. If specified, the instance + // termination action will be performed at the termination time. + TerminationTime string `json:"terminationTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutomaticRestart") 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. "ServiceAttachments") to + // NullFields is a list of field names (e.g. "AutomaticRestart") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -48696,15 +47528,150 @@ type ServiceAttachmentsScopedList struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedList +func (s *Scheduling) MarshalJSON() ([]byte, error) { + type NoMethod Scheduling raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAttachmentsScopedListWarning: Informational warning which -// replaces the list of service attachments when the list is empty. -type ServiceAttachmentsScopedListWarning struct { +// SchedulingNodeAffinity: Node Affinity: the configuration of desired +// nodes onto which this Instance could be scheduled. +type SchedulingNodeAffinity struct { + // Key: Corresponds to the label key of Node resource. + Key string `json:"key,omitempty"` + + // Operator: Defines the operation of node selection. Valid operators + // are IN for affinity and NOT_IN for anti-affinity. + // + // Possible values: + // "IN" - Requires Compute Engine to seek for matched nodes. + // "NOT_IN" - Requires Compute Engine to avoid certain nodes. + // "OPERATOR_UNSPECIFIED" + Operator string `json:"operator,omitempty"` + + // Values: Corresponds to the label values of Node resource. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { + type NoMethod SchedulingNodeAffinity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Screenshot: An instance's screenshot. +type Screenshot struct { + // Contents: [Output Only] The Base64-encoded screenshot data. + Contents string `json:"contents,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#screenshot + // for the screenshots. + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Contents") 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. "Contents") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Screenshot) MarshalJSON() ([]byte, error) { + type NoMethod Screenshot + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPoliciesAggregatedList struct { + Etag string `json:"etag,omitempty"` + + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of SecurityPoliciesScopedList resources. + Items map[string]SecurityPoliciesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#securityPolicyAggregatedList for lists of Security Policies. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *SecurityPoliciesAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPoliciesAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPoliciesAggregatedListWarning: [Output Only] Informational +// warning message. +type SecurityPoliciesAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -48772,7 +47739,7 @@ type ServiceAttachmentsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ServiceAttachmentsScopedListWarningData `json:"data,omitempty"` + Data []*SecurityPoliciesAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -48795,13 +47762,13 @@ type ServiceAttachmentsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedListWarning +func (s *SecurityPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ServiceAttachmentsScopedListWarningData struct { +type SecurityPoliciesAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -48832,246 +47799,21 @@ type ServiceAttachmentsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *ServiceAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShareSettings: The share setting for reservations and sole tenancy -// node groups. -type ShareSettings struct { - // ProjectMap: A map of project id and project config. This is only - // valid when share_type's value is SPECIFIC_PROJECTS. - ProjectMap map[string]ShareSettingsProjectConfig `json:"projectMap,omitempty"` - - // Projects: A List of Project names to specify consumer projects for - // this shared-reservation. This is only valid when share_type's value - // is SPECIFIC_PROJECTS. - Projects []string `json:"projects,omitempty"` - - // ShareType: Type of sharing for this shared-reservation - // - // Possible values: - // "LOCAL" - Default value. - // "ORGANIZATION" - Shared-reservation is open to entire Organization - // "SHARE_TYPE_UNSPECIFIED" - Default value. This value is unused. - // "SPECIFIC_PROJECTS" - Shared-reservation is open to specific - // projects - ShareType string `json:"shareType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProjectMap") 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. "ProjectMap") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ShareSettings) MarshalJSON() ([]byte, error) { - type NoMethod ShareSettings - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShareSettingsProjectConfig: Config for each project in the share -// settings. -type ShareSettingsProjectConfig struct { - // ProjectId: The project ID, should be same as the key of this project - // config in the parent map. - ProjectId string `json:"projectId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProjectId") 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. "ProjectId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ShareSettingsProjectConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShareSettingsProjectConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceConfig: A set of Shielded Instance options. -type ShieldedInstanceConfig struct { - // EnableIntegrityMonitoring: Defines whether the instance has integrity - // monitoring enabled. Enabled by default. - EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - - // EnableSecureBoot: Defines whether the instance has Secure Boot - // enabled. Disabled by default. - EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - - // EnableVtpm: Defines whether the instance has the vTPM enabled. - // Enabled by default. - EnableVtpm bool `json:"enableVtpm,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EnableIntegrityMonitoring") 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. - // "EnableIntegrityMonitoring") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceConfig +func (s *SecurityPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ShieldedInstanceIdentity: A Shielded Instance Identity. -type ShieldedInstanceIdentity struct { - // EncryptionKey: An Endorsement Key (EK) made by the RSA 2048 algorithm - // issued to the Shielded Instance's vTPM. - EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#shieldedInstanceIdentity for shielded Instance identity - // entry. - Kind string `json:"kind,omitempty"` - - // SigningKey: An Attestation Key (AK) made by the RSA 2048 algorithm - // issued to the Shielded Instance's vTPM. - SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` +type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { + PreconfiguredExpressionSets *SecurityPoliciesWafConfig `json:"preconfiguredExpressionSets,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EncryptionKey") 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. "EncryptionKey") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ShieldedInstanceIdentity) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIdentity - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIdentityEntry: A Shielded Instance Identity Entry. -type ShieldedInstanceIdentityEntry struct { - // EkCert: A PEM-encoded X.509 certificate. This field can be empty. - EkCert string `json:"ekCert,omitempty"` - - // EkPub: A PEM-encoded public key. - EkPub string `json:"ekPub,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EkCert") 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. "EkCert") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ShieldedInstanceIdentityEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIdentityEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIntegrityPolicy: The policy describes the baseline -// against which Instance boot integrity is measured. -type ShieldedInstanceIntegrityPolicy struct { - // UpdateAutoLearnPolicy: Updates the integrity policy baseline using - // the measurements from the VM instance's most recent boot. - UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "UpdateAutoLearnPolicy") 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. "UpdateAutoLearnPolicy") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ShieldedInstanceIntegrityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIntegrityPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShieldedVmConfig: A set of Shielded VM options. -type ShieldedVmConfig struct { - // EnableIntegrityMonitoring: Defines whether the instance has integrity - // monitoring enabled. - EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - - // EnableSecureBoot: Defines whether the instance has Secure Boot - // enabled. - EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - - // EnableVtpm: Defines whether the instance has the vTPM enabled. - EnableVtpm bool `json:"enableVtpm,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnableIntegrityMonitoring") to unconditionally include in API + // "PreconfiguredExpressionSets") 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 @@ -49080,70 +47822,30 @@ type ShieldedVmConfig struct { ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "EnableIntegrityMonitoring") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a + // "PreconfiguredExpressionSets") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a // field in this list has a non-empty value. This may be used to include // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ShieldedVmConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIdentity: A Shielded VM Identity. -type ShieldedVmIdentity struct { - // EncryptionKey: An Endorsement Key (EK) issued to the Shielded VM's - // vTPM. - EncryptionKey *ShieldedVmIdentityEntry `json:"encryptionKey,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#shieldedVmIdentity for shielded VM identity entry. - Kind string `json:"kind,omitempty"` - - // SigningKey: An Attestation Key (AK) issued to the Shielded VM's vTPM. - SigningKey *ShieldedVmIdentityEntry `json:"signingKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "EncryptionKey") 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. "EncryptionKey") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ShieldedVmIdentity) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentity +func (s *SecurityPoliciesListPreconfiguredExpressionSetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesListPreconfiguredExpressionSetsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ShieldedVmIdentityEntry: A Shielded Instance Identity Entry. -type ShieldedVmIdentityEntry struct { - // EkCert: A PEM-encoded X.509 certificate. This field can be empty. - EkCert string `json:"ekCert,omitempty"` +type SecurityPoliciesScopedList struct { + // SecurityPolicies: A list of SecurityPolicies contained in this scope. + SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` - // EkPub: A PEM-encoded public key. - EkPub string `json:"ekPub,omitempty"` + // Warning: Informational warning which replaces the list of security + // policies when the list is empty. + Warning *SecurityPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "EkCert") to + // ForceSendFields is a list of field names (e.g. "SecurityPolicies") 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 @@ -49151,38 +47853,7 @@ type ShieldedVmIdentityEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EkCert") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ShieldedVmIdentityEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentityEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIntegrityPolicy: The policy describes the baseline against -// which VM instance boot integrity is measured. -type ShieldedVmIntegrityPolicy struct { - // UpdateAutoLearnPolicy: Updates the integrity policy baseline using - // the measurements from the VM instance's most recent boot. - UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "UpdateAutoLearnPolicy") 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. "UpdateAutoLearnPolicy") to + // NullFields is a list of field names (e.g. "SecurityPolicies") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -49192,308 +47863,15 @@ type ShieldedVmIntegrityPolicy struct { NullFields []string `json:"-"` } -func (s *ShieldedVmIntegrityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIntegrityPolicy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SignedUrlKey: Represents a customer-supplied Signing Key used by -// Cloud CDN Signed URLs -type SignedUrlKey struct { - // KeyName: Name of the key. The name must be 1-63 characters long, and - // comply with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and all - // following characters must be a dash, lowercase letter, or digit, - // except the last character, which cannot be a dash. - KeyName string `json:"keyName,omitempty"` - - // KeyValue: 128-bit key value used for signing the URL. The key value - // must be a valid RFC 4648 Section 5 base64url encoded string. - KeyValue string `json:"keyValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "KeyName") 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. "KeyName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SignedUrlKey) MarshalJSON() ([]byte, error) { - type NoMethod SignedUrlKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Snapshot: Represents a Persistent Disk Snapshot resource. You can use -// snapshots to back up data on a regular interval. For more -// information, read Creating persistent disk snapshots. -type Snapshot struct { - // Architecture: [Output Only] The architecture of the snapshot. Valid - // values are ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture - // is not set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - - // AutoCreated: [Output Only] Set to true if snapshots are automatically - // created by applying resource policy on the target disk. - AutoCreated bool `json:"autoCreated,omitempty"` - - // ChainName: Creates the new snapshot in the snapshot chain labeled - // with the specified name. The chain name must be 1-63 characters long - // and comply with RFC1035. This is an uncommon option only for advanced - // service owners who needs to create separate snapshot chains, for - // example, for chargeback tracking. When you describe your snapshot - // resource, this field is visible only if it has a non-empty value. - ChainName string `json:"chainName,omitempty"` - - // CreationSizeBytes: [Output Only] Size in bytes of the snapshot at - // creation time. - CreationSizeBytes int64 `json:"creationSizeBytes,omitempty,string"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - - // DownloadBytes: [Output Only] Number of bytes downloaded to restore a - // snapshot to a disk. - DownloadBytes int64 `json:"downloadBytes,omitempty,string"` - - // GuestFlush: [Input Only] Whether to attempt an application consistent - // snapshot by informing the OS to prepare for the snapshot process. - GuestFlush bool `json:"guestFlush,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always compute#snapshot for - // Snapshot resources. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // snapshot, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels, otherwise the request will fail with error - // 412 conditionNotMet. To see the latest fingerprint, make a get() - // request to retrieve a snapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels to apply to this snapshot. These can be later modified - // by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // LicenseCodes: [Output Only] Integer license codes indicating which - // licenses are attached to this snapshot. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - - // Licenses: [Output Only] A list of public visible licenses that apply - // to this snapshot. This can be because the original image had licenses - // attached (such as a Windows image). - Licenses []string `json:"licenses,omitempty"` - - // LocationHint: An opaque location hint used to place the snapshot - // close to other resources. This field is for use by internal tools - // that use the public API. - LocationHint string `json:"locationHint,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SnapshotEncryptionKey: Encrypts the snapshot using a - // customer-supplied encryption key. After you encrypt a snapshot using - // a customer-supplied key, you must provide the same key if you use the - // snapshot later. For example, you must provide the encryption key when - // you create a disk from the encrypted snapshot in a future request. - // Customer-supplied encryption keys do not protect access to metadata - // of the snapshot. If you do not provide an encryption key when - // creating the snapshot, then the snapshot will be encrypted using an - // automatically generated key and you do not need to provide a key to - // use the snapshot later. - SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` - - // SnapshotType: Indicates the type of the snapshot. - // - // Possible values: - // "ARCHIVE" - // "STANDARD" - SnapshotType string `json:"snapshotType,omitempty"` - - // SourceDisk: The source disk used to create this snapshot. - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: [Output Only] The ID value of the disk used to create - // this snapshot. This value may be used to determine whether the - // snapshot was taken from the current or a previous instance of a given - // disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource - // policy which created this scheduled snapshot. - SourceSnapshotSchedulePolicy string `json:"sourceSnapshotSchedulePolicy,omitempty"` - - // SourceSnapshotSchedulePolicyId: [Output Only] ID of the resource - // policy which created this scheduled snapshot. - SourceSnapshotSchedulePolicyId string `json:"sourceSnapshotSchedulePolicyId,omitempty"` - - // Status: [Output Only] The status of the snapshot. This can be - // CREATING, DELETING, FAILED, READY, or UPLOADING. - // - // Possible values: - // "CREATING" - Snapshot creation is in progress. - // "DELETING" - Snapshot is currently being deleted. - // "FAILED" - Snapshot creation failed. - // "READY" - Snapshot has been created successfully. - // "UPLOADING" - Snapshot is being uploaded. - Status string `json:"status,omitempty"` - - // StorageBytes: [Output Only] A size of the storage used by the - // snapshot. As snapshots share storage, this number is expected to - // change with snapshot creation/deletion. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - - // StorageBytesStatus: [Output Only] An indicator whether storageBytes - // is in a stable state or it is being adjusted as a result of shared - // storage reallocation. This status can either be UPDATING, meaning the - // size of the snapshot is being updated, or UP_TO_DATE, meaning the - // size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - - // StorageLocations: Cloud Storage bucket storage location of the - // snapshot (regional or multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - - // UserLicenses: [Output Only] A list of user provided licenses - // represented by a list of URLs to the license resource. - UserLicenses []string `json:"userLicenses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Architecture") 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. "Architecture") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Snapshot) MarshalJSON() ([]byte, error) { - type NoMethod Snapshot - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SnapshotList: Contains a list of Snapshot resources. -type SnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of Snapshot resources. - Items []*Snapshot `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *SnapshotListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SnapshotList) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotList +func (s *SecurityPoliciesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SnapshotListWarning: [Output Only] Informational warning message. -type SnapshotListWarning struct { +// SecurityPoliciesScopedListWarning: Informational warning which +// replaces the list of security policies when the list is empty. +type SecurityPoliciesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -49561,7 +47939,7 @@ type SnapshotListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SnapshotListWarningData `json:"data,omitempty"` + Data []*SecurityPoliciesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -49584,13 +47962,13 @@ type SnapshotListWarning struct { NullFields []string `json:"-"` } -func (s *SnapshotListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotListWarning +func (s *SecurityPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SnapshotListWarningData struct { +type SecurityPoliciesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -49621,61 +47999,16 @@ type SnapshotListWarningData struct { NullFields []string `json:"-"` } -func (s *SnapshotListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SourceDiskEncryptionKey struct { - // DiskEncryptionKey: The customer-supplied encryption key of the source - // disk. Required if the source disk is protected by a customer-supplied - // encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - - // SourceDisk: URL of the disk attached to the source instance. This can - // be a full or valid partial URL. For example, the following are valid - // values: - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone - // /disks/disk - projects/project/zones/zone/disks/disk - - // zones/zone/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") - // 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. "DiskEncryptionKey") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SourceDiskEncryptionKey) MarshalJSON() ([]byte, error) { - type NoMethod SourceDiskEncryptionKey +func (s *SecurityPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SourceInstanceParams: A specification of the parameters to use when -// creating the instance template from a source instance. -type SourceInstanceParams struct { - // DiskConfigs: Attached disks configuration. If not provided, defaults - // are applied: For boot disk and any other R/W disks, the source images - // for each disk will be used. For read-only disks, they will be - // attached in read-only mode. Local SSD disks will be created as blank - // volumes. - DiskConfigs []*DiskInstantiationConfig `json:"diskConfigs,omitempty"` +type SecurityPoliciesWafConfig struct { + WafRules *PreconfiguredWafSet `json:"wafRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskConfigs") to + // ForceSendFields is a list of field names (e.g. "WafRules") 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 @@ -49683,179 +48016,86 @@ type SourceInstanceParams struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskConfigs") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "WafRules") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SourceInstanceParams) MarshalJSON() ([]byte, error) { - type NoMethod SourceInstanceParams +func (s *SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPoliciesWafConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SourceInstanceProperties: DEPRECATED: Please use -// compute#instanceProperties instead. New properties will not be added -// to this field. -type SourceInstanceProperties struct { - // CanIpForward: Enables instances created based on this machine image - // to send packets with source IP addresses other than their own and - // receive packets with destination IP addresses other than their own. - // If these instances will be used as an IP gateway or it will be set as - // the next-hop in a Route resource, specify true. If unsure, leave this - // set to false. See the Enable IP forwarding documentation for more - // information. - CanIpForward bool `json:"canIpForward,omitempty"` - - // DeletionProtection: Whether the instance created from this machine - // image should be protected against deletion. - DeletionProtection bool `json:"deletionProtection,omitempty"` - - // Description: An optional text description for the instances that are - // created from this machine image. - Description string `json:"description,omitempty"` - - // Disks: An array of disks that are associated with the instances that - // are created from this machine image. - Disks []*SavedAttachedDisk `json:"disks,omitempty"` - - // GuestAccelerators: A list of guest accelerator cards' type and count - // to use for instances created from this machine image. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - - // KeyRevocationActionType: KeyRevocationActionType of the instance. - // Supported options are "STOP" and "NONE". The default value is "NONE" - // if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This - // value is unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key - // revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` - - // Labels: Labels to apply to instances that are created from this - // machine image. - Labels map[string]string `json:"labels,omitempty"` - - // MachineType: The machine type to use for instances that are created - // from this machine image. - MachineType string `json:"machineType,omitempty"` - - // Metadata: The metadata key/value pairs to assign to instances that - // are created from this machine image. These pairs can consist of - // custom metadata or predefined keys. See Project and instance metadata - // for more information. - Metadata *Metadata `json:"metadata,omitempty"` - - // MinCpuPlatform: Minimum cpu/platform to be used by instances created - // from this machine image. The instance may be scheduled on the - // specified or newer cpu/platform. Applicable values are the friendly - // names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or - // minCpuPlatform: "Intel Sandy Bridge". For more information, read - // Specifying a Minimum CPU Platform. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - - // PostKeyRevocationActionType: PostKeyRevocationActionType of the - // instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This - // value is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` - - // Scheduling: Specifies the scheduling options for the instances that - // are created from this machine image. - Scheduling *Scheduling `json:"scheduling,omitempty"` - - // ServiceAccounts: A list of service accounts with specified scopes. - // Access tokens for these service accounts are available to the - // instances that are created from this machine image. Use metadata - // queries to obtain the access tokens for these instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - - // Tags: A list of tags to apply to the instances that are created from - // this machine image. The tags identify valid sources or targets for - // network firewalls. The setTags method can modify this list of tags. - // Each tag within the list must comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CanIpForward") 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. "CanIpForward") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} +// SecurityPolicy: Represents a Google Cloud Armor security policy +// resource. Only external backend services that use load balancers can +// reference a security policy. For more information, see Google Cloud +// Armor security policy overview. +type SecurityPolicy struct { + AdaptiveProtectionConfig *SecurityPolicyAdaptiveProtectionConfig `json:"adaptiveProtectionConfig,omitempty"` -func (s *SourceInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod SourceInstanceProperties - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + AdvancedOptionsConfig *SecurityPolicyAdvancedOptionsConfig `json:"advancedOptionsConfig,omitempty"` -// SslCertificate: Represents an SSL Certificate resource. Google -// Compute Engine has two SSL Certificate resources: * Global -// (/compute/docs/reference/rest/beta/sslCertificates) * Regional -// (/compute/docs/reference/rest/beta/regionSslCertificates) The -// sslCertificates are used by: - external HTTPS load balancers - SSL -// proxy load balancers The regionSslCertificates are used by internal -// HTTPS load balancers. Optionally, certificate file contents that you -// upload can contain a set of up to five PEM-encoded certificates. The -// API call creates an object (sslCertificate) that holds this data. You -// can use SSL keys and certificates to secure connections to a load -// balancer. For more information, read Creating and using SSL -// certificates, SSL certificates quotas and limits, and Troubleshooting -// SSL certificates. -type SslCertificate struct { - // Certificate: A value read into memory from a certificate file. The - // certificate file must be in PEM format. The certificate chain must be - // no greater than 5 certs long. The chain must include at least one - // intermediate cert. - Certificate string `json:"certificate,omitempty"` + // Associations: A list of associations that belong to this policy. + Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + DdosProtectionConfig *SecurityPolicyDdosProtectionConfig `json:"ddosProtectionConfig,omitempty"` + // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` - // ExpireTime: [Output Only] Expire time of the certificate. RFC3339 - ExpireTime string `json:"expireTime,omitempty"` + // DisplayName: User-provided name of the Organization security plicy. + // The name should be unique in the organization in which the security + // policy is created. This should only be used when SecurityPolicyType + // is FIREWALL. The name must be 1-63 characters long, and comply with + // https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be + // 1-63 characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + DisplayName string `json:"displayName,omitempty"` + + // Fingerprint: Specifies a fingerprint for this resource, which is + // essentially a hash of the metadata's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update metadata. You must + // always provide an up-to-date fingerprint hash in order to update or + // change metadata, otherwise the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make get() request to + // the security policy. + Fingerprint string `json:"fingerprint,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always - // compute#sslCertificate for SSL certificates. + // Kind: [Output only] Type of the resource. Always + // compute#securityPolicyfor security policies Kind string `json:"kind,omitempty"` - // Managed: Configuration and status of a managed SSL certificate. - Managed *SslCertificateManagedSslCertificate `json:"managed,omitempty"` + // LabelFingerprint: A fingerprint for the labels being applied to this + // security policy, which is essentially a hash of the labels set used + // for optimistic locking. The fingerprint is initially generated by + // Compute Engine and changes after every request to modify or update + // labels. You must always provide an up-to-date fingerprint hash in + // order to update or change labels. To see the latest fingerprint, make + // get() request to the security policy. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels for this resource. These can only be added or modified + // by the setLabels method. Each label key/value pair must comply with + // RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with @@ -49866,42 +48106,109 @@ type SslCertificate struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // PrivateKey: A value read into memory from a write-only private key - // file. The private key file must be in PEM format. For security, only - // insert requests include this field. - PrivateKey string `json:"privateKey,omitempty"` + // Parent: [Output Only] The parent of the security policy. + Parent string `json:"parent,omitempty"` - // Region: [Output Only] URL of the region where the regional SSL - // Certificate resides. This field is not applicable to global SSL - // Certificate. + RecaptchaOptionsConfig *SecurityPolicyRecaptchaOptionsConfig `json:"recaptchaOptionsConfig,omitempty"` + + // Region: [Output Only] URL of the region where the regional security + // policy resides. This field is not applicable to global security + // policies. Region string `json:"region,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // RuleTupleCount: [Output Only] Total count of all security policy rule + // tuples. A security policy can not exceed a set number of tuples. + RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // SelfManaged: Configuration and status of a self-managed SSL - // certificate. - SelfManaged *SslCertificateSelfManagedSslCertificate `json:"selfManaged,omitempty"` + // Rules: A list of rules that belong to this policy. There must always + // be a default rule which is a rule with priority 2147483647 and match + // all condition (for the match condition this means match "*" for + // srcIpRanges and for the networkMatch condition every field must be + // either match "*" or not set). If no rules are provided when creating + // a security policy, a default rule with action "allow" will be added. + Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // SubjectAlternativeNames: [Output Only] Domains associated with the - // certificate via Subject Alternative Name. - SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` - // Type: (Optional) Specifies the type of SSL certificate, either - // "SELF_MANAGED" or "MANAGED". If not specified, the certificate is - // self-managed and the fields certificate and private_key are used. + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // Type: The type indicates the intended use of the security policy. - + // CLOUD_ARMOR: Cloud Armor backend security policies can be configured + // to filter incoming HTTP requests targeting backend services. They + // filter requests before they hit the origin servers. - + // CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be + // configured to filter incoming HTTP requests targeting backend + // services (including Cloud CDN-enabled) as well as backend buckets + // (Cloud Storage). They filter requests before the request is served + // from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor + // internal service policies can be configured to filter HTTP requests + // targeting services managed by Traffic Director in a service mesh. + // They filter requests before the request is served from the + // application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can + // be configured to filter packets targeting network load balancing + // resources such as backend services, target pools, target instances, + // and instances with external IPs. They filter requests before the + // request is served from the application. This field can be set only at + // resource creation time. // // Possible values: - // "MANAGED" - Google-managed SSLCertificate. - // "SELF_MANAGED" - Certificate uploaded by user. - // "TYPE_UNSPECIFIED" + // "CLOUD_ARMOR" + // "CLOUD_ARMOR_EDGE" + // "CLOUD_ARMOR_NETWORK" + // "FIREWALL" Type string `json:"type,omitempty"` + // UserDefinedFields: Definitions of user-defined fields for + // CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to + // 4 bytes extracted from a fixed offset in the packet, relative to the + // IPv4, IPv6, TCP, or UDP header, with an optional mask to select + // certain bits. Rules may then specify matching values for these + // fields. Example: userDefinedFields: - name: "ipv4_fragment_offset" + // base: IPV4 offset: 6 size: 2 mask: "0x1fff" + UserDefinedFields []*SecurityPolicyUserDefinedField `json:"userDefinedFields,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Certificate") to + // ForceSendFields is a list of field names (e.g. + // "AdaptiveProtectionConfig") 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. "AdaptiveProtectionConfig") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityPolicyAdaptiveProtectionConfig: Configuration options for +// Cloud Armor Adaptive Protection (CAAP). +type SecurityPolicyAdaptiveProtectionConfig struct { + AutoDeployConfig *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig `json:"autoDeployConfig,omitempty"` + + // Layer7DdosDefenseConfig: If set to true, enables Cloud Armor Machine + // Learning. + Layer7DdosDefenseConfig *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig `json:"layer7DdosDefenseConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoDeployConfig") 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 @@ -49909,55 +48216,94 @@ type SslCertificate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Certificate") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AutoDeployConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificate +func (s *SecurityPolicyAdaptiveProtectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdaptiveProtectionConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslCertificateAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +// SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig: Configuration +// options for Adaptive Protection auto-deploy feature. +type SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig struct { + ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - // Items: A list of SslCertificatesScopedList resources. - Items map[string]SslCertificatesScopedList `json:"items,omitempty"` + ExpirationSec int64 `json:"expirationSec,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#sslCertificateAggregatedList for lists of SSL Certificates. - Kind string `json:"kind,omitempty"` + ImpactedBaselineThreshold float64 `json:"impactedBaselineThreshold,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + LoadThreshold float64 `json:"loadThreshold,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") + // 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:"-"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` + // NullFields is a list of field names (e.g. "ConfidenceThreshold") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // Warning: [Output Only] Informational warning message. - Warning *SslCertificateAggregatedListWarning `json:"warning,omitempty"` +func (s *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +func (s *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) UnmarshalJSON(data []byte) error { + type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig + var s1 struct { + ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` + ImpactedBaselineThreshold gensupport.JSONFloat64 `json:"impactedBaselineThreshold"` + LoadThreshold gensupport.JSONFloat64 `json:"loadThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) + s.ImpactedBaselineThreshold = float64(s1.ImpactedBaselineThreshold) + s.LoadThreshold = float64(s1.LoadThreshold) + return nil +} - // ForceSendFields is a list of field names (e.g. "Id") to +// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig: +// Configuration options for L7 DDoS detection. This field is only +// supported in Global Security Policies of type CLOUD_ARMOR. +type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { + // Enable: If set to true, enables CAAP for L7 DDoS detection. This + // field is only supported in Global Security Policies of type + // CLOUD_ARMOR. + Enable bool `json:"enable,omitempty"` + + // RuleVisibility: Rule visibility can be one of the following: STANDARD + // - opaque rules. (default) PREMIUM - transparent rules. This field is + // only supported in Global Security Policies of type CLOUD_ARMOR. + // + // Possible values: + // "PREMIUM" + // "STANDARD" + RuleVisibility string `json:"ruleVisibility,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enable") 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 @@ -49965,7 +48311,7 @@ type SslCertificateAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Enable") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -49974,89 +48320,32 @@ type SslCertificateAggregatedList struct { NullFields []string `json:"-"` } -func (s *SslCertificateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedList +func (s *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificateAggregatedListWarning: [Output Only] Informational -// warning message. -type SslCertificateAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // +type SecurityPolicyAdvancedOptionsConfig struct { + // JsonCustomConfig: Custom configuration to apply the JSON parsing. + // Only applicable when json_parsing is set to STANDARD. + JsonCustomConfig *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig `json:"jsonCustomConfig,omitempty"` + // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` + // "DISABLED" + // "STANDARD" + JsonParsing string `json:"jsonParsing,omitempty"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*SslCertificateAggregatedListWarningData `json:"data,omitempty"` + // Possible values: + // "NORMAL" + // "VERBOSE" + LogLevel string `json:"logLevel,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // UserIpRequestHeaders: An optional list of case-insensitive request + // header names to use for resolving the callers client IP address. + UserIpRequestHeaders []string `json:"userIpRequestHeaders,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "JsonCustomConfig") 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 @@ -50064,36 +48353,74 @@ type SslCertificateAggregatedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "JsonCustomConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyAdvancedOptionsConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdvancedOptionsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyAdvancedOptionsConfigJsonCustomConfig struct { + // ContentTypes: A list of custom Content-Type header values to apply + // the JSON parsing. As per RFC 1341, a Content-Type header value has + // the following format: Content-Type := type "/" subtype *[";" + // parameter] When configuring a custom Content-Type header value, only + // the type/subtype needs to be specified, and the parameters should be + // excluded. + ContentTypes []string `json:"contentTypes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentTypes") 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. "ContentTypes") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SslCertificateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedListWarning +func (s *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAdvancedOptionsConfigJsonCustomConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslCertificateAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type SecurityPolicyAssociation struct { + // AttachmentId: The resource that the security policy is attached to. + AttachmentId string `json:"attachmentId,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // DisplayName: [Output Only] The display name of the security policy of + // the association. + DisplayName string `json:"displayName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // Name: The name for an association. + Name string `json:"name,omitempty"` + + // SecurityPolicyId: [Output Only] The security policy ID of the + // association. + SecurityPolicyId string `json:"securityPolicyId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttachmentId") 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 @@ -50101,31 +48428,62 @@ type SslCertificateAggregatedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AttachmentId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SslCertificateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedListWarningData +func (s *SecurityPolicyAssociation) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyAssociation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificateList: Contains a list of SslCertificate resources. -type SslCertificateList struct { +type SecurityPolicyDdosProtectionConfig struct { + // Possible values: + // "ADVANCED" + // "ADVANCED_PREVIEW" + // "STANDARD" + DdosProtection string `json:"ddosProtection,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DdosProtection") 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. "DdosProtection") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyDdosProtectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyDdosProtectionConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of SslCertificate resources. - Items []*SslCertificate `json:"items,omitempty"` + // Items: A list of SecurityPolicy resources. + Items []*SecurityPolicy `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#securityPolicyList for listsof securityPolicies Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -50136,11 +48494,8 @@ type SslCertificateList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslCertificateListWarning `json:"warning,omitempty"` + Warning *SecurityPolicyListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -50163,15 +48518,15 @@ type SslCertificateList struct { NullFields []string `json:"-"` } -func (s *SslCertificateList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateList +func (s *SecurityPolicyList) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificateListWarning: [Output Only] Informational warning +// SecurityPolicyListWarning: [Output Only] Informational warning // message. -type SslCertificateListWarning struct { +type SecurityPolicyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -50239,7 +48594,7 @@ type SslCertificateListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SslCertificateListWarningData `json:"data,omitempty"` + Data []*SecurityPolicyListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -50262,13 +48617,13 @@ type SslCertificateListWarning struct { NullFields []string `json:"-"` } -func (s *SslCertificateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateListWarning +func (s *SecurityPolicyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslCertificateListWarningData struct { +type SecurityPolicyListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -50299,50 +48654,23 @@ type SslCertificateListWarningData struct { NullFields []string `json:"-"` } -func (s *SslCertificateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateListWarningData +func (s *SecurityPolicyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificateManagedSslCertificate: Configuration and status of a -// managed SSL certificate. -type SslCertificateManagedSslCertificate struct { - // DomainStatus: [Output only] Detailed statuses of the domains - // specified for managed certificate resource. - DomainStatus map[string]string `json:"domainStatus,omitempty"` - - // Domains: The domains for which a managed SSL certificate will be - // generated. Each Google-managed SSL certificate supports up to the - // maximum number of domains per Google-managed SSL certificate - // (/load-balancing/docs/quotas#ssl_certificates). - Domains []string `json:"domains,omitempty"` - - // Status: [Output only] Status of the managed certificate resource. - // - // Possible values: - // "ACTIVE" - The certificate management is working, and a certificate - // has been provisioned. - // "MANAGED_CERTIFICATE_STATUS_UNSPECIFIED" - // "PROVISIONING" - The certificate management is working. GCP will - // attempt to provision the first certificate. - // "PROVISIONING_FAILED" - Certificate provisioning failed due to an - // issue with the DNS or load balancing configuration. For details of - // which domain failed, consult domain_status field. - // "PROVISIONING_FAILED_PERMANENTLY" - Certificate provisioning failed - // due to an issue with the DNS or load balancing configuration. It - // won't be retried. To try again delete and create a new managed - // SslCertificate resource. For details of which domain failed, consult - // domain_status field. - // "RENEWAL_FAILED" - Renewal of the certificate has failed due to an - // issue with the DNS or load balancing configuration. The existing cert - // is still serving; however, it will expire shortly. To provision a - // renewed certificate, delete and create a new managed SslCertificate - // resource. For details on which domain failed, consult domain_status - // field. - Status string `json:"status,omitempty"` +type SecurityPolicyRecaptchaOptionsConfig struct { + // RedirectSiteKey: An optional field to supply a reCAPTCHA site key to + // be used for all the rules using the redirect action with the type of + // GOOGLE_RECAPTCHA under the security policy. The specified site key + // needs to be created from the reCAPTCHA API. The user is responsible + // for the validity of the specified site key. If not specified, a + // Google-managed site key is used. This field is only supported in + // Global Security Policies of type CLOUD_ARMOR. + RedirectSiteKey string `json:"redirectSiteKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "DomainStatus") to + // ForceSendFields is a list of field names (e.g. "RedirectSiteKey") 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 @@ -50350,34 +48678,26 @@ type SslCertificateManagedSslCertificate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DomainStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "RedirectSiteKey") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SslCertificateManagedSslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateManagedSslCertificate +func (s *SecurityPolicyRecaptchaOptionsConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRecaptchaOptionsConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificateSelfManagedSslCertificate: Configuration and status of -// a self-managed SSL certificate. -type SslCertificateSelfManagedSslCertificate struct { - // Certificate: A local certificate file. The certificate must be in PEM - // format. The certificate chain must be no greater than 5 certs long. - // The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - - // PrivateKey: A write-only private key in PEM format. Only insert - // requests will include this field. - PrivateKey string `json:"privateKey,omitempty"` +type SecurityPolicyReference struct { + SecurityPolicy string `json:"securityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Certificate") to + // ForceSendFields is a list of field names (e.g. "SecurityPolicy") 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 @@ -50385,30 +48705,150 @@ type SslCertificateSelfManagedSslCertificate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Certificate") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "SecurityPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SslCertificateSelfManagedSslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateSelfManagedSslCertificate +func (s *SecurityPolicyReference) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslCertificatesScopedList struct { - // SslCertificates: List of SslCertificates contained in this scope. - SslCertificates []*SslCertificate `json:"sslCertificates,omitempty"` +// SecurityPolicyRule: Represents a rule that describes one or more +// match conditions along with the action to be taken when traffic +// matches this condition (allow or deny). +type SecurityPolicyRule struct { + // Action: The Action to perform when the rule is matched. The following + // are the valid actions: - allow: allow access to target. - + // deny(STATUS): deny access to target, returns the HTTP response code + // specified. Valid values for `STATUS` are 403, 404, and 502. - + // rate_based_ban: limit client traffic to the configured threshold and + // ban the client if the traffic exceeds the threshold. Configure + // parameters for this action in RateLimitOptions. Requires + // rate_limit_options to be set. - redirect: redirect to a different + // target. This can either be an internal reCAPTCHA redirect, or an + // external URL-based redirect via a 302 response. Parameters for this + // action can be configured via redirectOptions. This action is only + // supported in Global Security Policies of type CLOUD_ARMOR. - + // throttle: limit client traffic to the configured threshold. Configure + // parameters for this action in rateLimitOptions. Requires + // rate_limit_options to be set for this. + Action string `json:"action,omitempty"` - // Warning: Informational warning which replaces the list of backend - // services when the list is empty. - Warning *SslCertificatesScopedListWarning `json:"warning,omitempty"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to + // Direction: The direction in which this rule applies. This field may + // only be specified when versioned_expr is set to FIREWALL. + // + // Possible values: + // "EGRESS" + // "INGRESS" + Direction string `json:"direction,omitempty"` + + // EnableLogging: Denotes whether to enable logging for a particular + // rule. If logging is enabled, logs will be exported to the configured + // export destination in Stackdriver. Logs may be exported to BigQuery + // or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. + // This field may only be specified when the versioned_expr is set to + // FIREWALL. + EnableLogging bool `json:"enableLogging,omitempty"` + + // HeaderAction: Optional, additional actions that are performed on + // headers. This field is only supported in Global Security Policies of + // type CLOUD_ARMOR. + HeaderAction *SecurityPolicyRuleHttpHeaderAction `json:"headerAction,omitempty"` + + // Kind: [Output only] Type of the resource. Always + // compute#securityPolicyRule for security policy rules + Kind string `json:"kind,omitempty"` + + // Match: A match condition that incoming traffic is evaluated against. + // If it evaluates to true, the corresponding 'action' is enforced. + Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` + + // NetworkMatch: A match condition that incoming packets are evaluated + // against for CLOUD_ARMOR_NETWORK security policies. If it matches, the + // corresponding 'action' is enforced. The match criteria for a rule + // consists of built-in match fields (like 'srcIpRanges') and + // potentially multiple user-defined match fields ('userDefinedFields'). + // Field values may be extracted directly from the packet or derived + // from it (e.g. 'srcRegionCodes'). Some fields may not be present in + // every packet (e.g. 'srcPorts'). A user-defined field is only present + // if the base header is found in the packet and the entire field is in + // bounds. Each match field may specify which values can match it, + // listing one or more ranges, prefixes, or exact values that are + // considered a match for the field. A field value must be present in + // order to match a specified match field. If no match values are + // specified for a match field, then any field value is considered to + // match it, and it's not required to be present. For strings specifying + // '*' is also equivalent to match all. For a packet to match a rule, + // all specified match fields must match the corresponding field values + // derived from the packet. Example: networkMatch: srcIpRanges: - + // "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: + // "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition + // matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 + // and a user-defined field named "ipv4_fragment_offset" with a value + // between 1 and 0x1fff inclusive. + NetworkMatch *SecurityPolicyRuleNetworkMatcher `json:"networkMatch,omitempty"` + + // PreconfiguredWafConfig: Preconfigured WAF configuration to be applied + // for the rule. If the rule does not evaluate preconfigured WAF rules, + // i.e., if evaluatePreconfiguredWaf() is not used, this field will have + // no effect. + PreconfiguredWafConfig *SecurityPolicyRulePreconfiguredWafConfig `json:"preconfiguredWafConfig,omitempty"` + + // Preview: If set to true, the specified action is not enforced. + Preview bool `json:"preview,omitempty"` + + // Priority: An integer indicating the priority of a rule in the list. + // The priority must be a positive value between 0 and 2147483647. Rules + // are evaluated from highest to lowest priority where 0 is the highest + // priority and 2147483647 is the lowest priority. + Priority int64 `json:"priority,omitempty"` + + // RateLimitOptions: Must be specified if the action is "rate_based_ban" + // or "throttle". Cannot be specified for any other actions. + RateLimitOptions *SecurityPolicyRuleRateLimitOptions `json:"rateLimitOptions,omitempty"` + + // RedirectOptions: Parameters defining the redirect action. Cannot be + // specified for any other actions. This field is only supported in + // Global Security Policies of type CLOUD_ARMOR. + RedirectOptions *SecurityPolicyRuleRedirectOptions `json:"redirectOptions,omitempty"` + + // RuleNumber: Identifier for the rule. This is only unique within the + // given security policy. This can only be set during rule creation, if + // rule number is not specified it will be generated by the server. + RuleNumber int64 `json:"ruleNumber,omitempty,string"` + + // RuleTupleCount: [Output Only] Calculation of the complexity of a + // single firewall security policy rule. + RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` + + // TargetResources: A list of network resource URLs to which this rule + // applies. This field allows you to control which network's VMs get + // this rule. If this field is left blank, all VMs within the + // organization will receive the rule. This field may only be specified + // when versioned_expr is set to FIREWALL. + TargetResources []string `json:"targetResources,omitempty"` + + // TargetServiceAccounts: A list of service accounts indicating the sets + // of instances that are applied with this rule. + TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Action") 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 @@ -50416,7 +48856,36 @@ type SslCertificatesScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyRuleHttpHeaderAction struct { + // RequestHeadersToAdds: The list of request headers to add or overwrite + // if they're already present. + RequestHeadersToAdds []*SecurityPolicyRuleHttpHeaderActionHttpHeaderOption `json:"requestHeadersToAdds,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "RequestHeadersToAdds") 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. "RequestHeadersToAdds") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -50426,89 +48895,20 @@ type SslCertificatesScopedList struct { NullFields []string `json:"-"` } -func (s *SslCertificatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedList +func (s *SecurityPolicyRuleHttpHeaderAction) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleHttpHeaderAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificatesScopedListWarning: Informational warning which -// replaces the list of backend services when the list is empty. -type SslCertificatesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*SslCertificatesScopedListWarningData `json:"data,omitempty"` +type SecurityPolicyRuleHttpHeaderActionHttpHeaderOption struct { + // HeaderName: The name of the header to set. + HeaderName string `json:"headerName,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // HeaderValue: The value to set the named header to. + HeaderValue string `json:"headerValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "HeaderName") 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 @@ -50516,8 +48916,8 @@ type SslCertificatesScopedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "HeaderName") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -50525,27 +48925,47 @@ type SslCertificatesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *SslCertificatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedListWarning +func (s *SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleHttpHeaderActionHttpHeaderOption raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslCertificatesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +// SecurityPolicyRuleMatcher: Represents a match condition that incoming +// traffic is evaluated against. Exactly one field must be specified. +type SecurityPolicyRuleMatcher struct { + // Config: The configuration options available when specifying + // versioned_expr. This field must be specified if versioned_expr is + // specified and cannot be specified if versioned_expr is not specified. + Config *SecurityPolicyRuleMatcherConfig `json:"config,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // Expr: User defined CEVAL expression. A CEVAL expression is used to + // specify match criteria such as origin.ip, source.region_code and + // contents in the request header. Expressions containing + // `evaluateThreatIntelligence` require Cloud Armor Managed Protection + // Plus tier and are not supported in Edge Policies nor in Regional + // Policies. Expressions containing + // `evaluatePreconfiguredExpr('sourceiplist-*')` require Cloud Armor + // Managed Protection Plus tier and are only supported in Global + // Security Policies. + Expr *Expr `json:"expr,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ExprOptions: The configuration options available when specifying a + // user defined CEVAL expression (i.e., 'expr'). + ExprOptions *SecurityPolicyRuleMatcherExprOptions `json:"exprOptions,omitempty"` + + // VersionedExpr: Preconfigured versioned expression. If this field is + // specified, config must also be specified. Available preconfigured + // expressions along with their requirements are: SRC_IPS_V1 - must + // specify the corresponding src_ip_range field in config. + // + // Possible values: + // "FIREWALL" + // "SRC_IPS_V1" - Matches the source IP address of a request to the IP + // ranges supplied in config. + VersionedExpr string `json:"versionedExpr,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Config") 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 @@ -50553,7 +48973,7 @@ type SslCertificatesScopedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Config") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -50562,48 +48982,27 @@ type SslCertificatesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *SslCertificatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedListWarningData +func (s *SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleMatcher raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPoliciesAggregatedList struct { - Etag string `json:"etag,omitempty"` +type SecurityPolicyRuleMatcherConfig struct { + // DestIpRanges: CIDR IP address range. This field may only be specified + // when versioned_expr is set to FIREWALL. + DestIpRanges []string `json:"destIpRanges,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SslPoliciesScopedList resources. - Items map[string]SslPoliciesScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#sslPolicyAggregatedList for lists of SSL Policies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *SslPoliciesAggregatedListWarning `json:"warning,omitempty"` + // Layer4Configs: Pairs of IP protocols and ports that the rule should + // match. This field may only be specified when versioned_expr is set to + // FIREWALL. + Layer4Configs []*SecurityPolicyRuleMatcherConfigLayer4Config `json:"layer4Configs,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // SrcIpRanges: CIDR IP address range. Maximum number of src_ip_ranges + // allowed is 10. + SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // ForceSendFields is a list of field names (e.g. "DestIpRanges") 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 @@ -50611,98 +49010,37 @@ type SslPoliciesAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DestIpRanges") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SslPoliciesAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedList +func (s *SecurityPolicyRuleMatcherConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleMatcherConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslPoliciesAggregatedListWarning: [Output Only] Informational warning -// message. -type SslPoliciesAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*SslPoliciesAggregatedListWarningData `json:"data,omitempty"` +type SecurityPolicyRuleMatcherConfigLayer4Config struct { + // IpProtocol: The IP protocol to which this rule applies. The protocol + // type is required when creating a firewall rule. This value can either + // be one of the following well known protocol strings (tcp, udp, icmp, + // esp, ah, ipip, sctp), or the IP protocol number. + IpProtocol string `json:"ipProtocol,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // Ports: An optional list of ports to which this rule applies. This + // field is only applicable for UDP or TCP protocol. Each entry must be + // either an integer or a range. If not specified, this rule applies to + // connections through any port. Example inputs include: ["22"], + // ["80","443"], and ["12345-12349"]. This field may only be specified + // when versioned_expr is set to FIREWALL. + Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "IpProtocol") 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 @@ -50710,8 +49048,8 @@ type SslPoliciesAggregatedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "IpProtocol") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -50719,27 +49057,19 @@ type SslPoliciesAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *SslPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedListWarning +func (s *SecurityPolicyRuleMatcherConfigLayer4Config) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleMatcherConfigLayer4Config raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPoliciesAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` +type SecurityPolicyRuleMatcherExprOptions struct { + // RecaptchaOptions: reCAPTCHA configuration options to be applied for + // the rule. If the rule does not evaluate reCAPTCHA tokens, this field + // will have no effect. + RecaptchaOptions *SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions `json:"recaptchaOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "RecaptchaOptions") 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 @@ -50747,150 +49077,98 @@ type SslPoliciesAggregatedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "RecaptchaOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SslPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedListWarningData +func (s *SecurityPolicyRuleMatcherExprOptions) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleMatcherExprOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPoliciesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of SslPolicy resources. - Items []*SslPolicy `json:"items,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#sslPoliciesList for lists of sslPolicies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *SslPoliciesListWarning `json:"warning,omitempty"` +type SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions struct { + // ActionTokenSiteKeys: A list of site keys to be used during the + // validation of reCAPTCHA action-tokens. The provided site keys need to + // be created from reCAPTCHA API under the same project where the + // security policy is created. + ActionTokenSiteKeys []string `json:"actionTokenSiteKeys,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // SessionTokenSiteKeys: A list of site keys to be used during the + // validation of reCAPTCHA session-tokens. The provided site keys need + // to be created from reCAPTCHA API under the same project where the + // security policy is created. + SessionTokenSiteKeys []string `json:"sessionTokenSiteKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ActionTokenSiteKeys") + // 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. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ActionTokenSiteKeys") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SslPoliciesList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesList +func (s *SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslPoliciesListWarning: [Output Only] Informational warning message. -type SslPoliciesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` +// SecurityPolicyRuleNetworkMatcher: Represents a match condition that +// incoming network traffic is evaluated against. +type SecurityPolicyRuleNetworkMatcher struct { + // DestIpRanges: Destination IPv4/IPv6 addresses or CIDR prefixes, in + // standard text format. + DestIpRanges []string `json:"destIpRanges,omitempty"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*SslPoliciesListWarningData `json:"data,omitempty"` + // DestPorts: Destination port numbers for TCP/UDP/SCTP. Each element + // can be a 16-bit unsigned decimal number (e.g. "80") or range (e.g. + // "0-1023"). + DestPorts []string `json:"destPorts,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // IpProtocols: IPv4 protocol / IPv6 next header (after extension + // headers). Each element can be an 8-bit unsigned decimal number (e.g. + // "6"), range (e.g. "253-254"), or one of the following protocol names: + // "tcp", "udp", "icmp", "esp", "ah", "ipip", or "sctp". + IpProtocols []string `json:"ipProtocols,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // SrcAsns: BGP Autonomous System Number associated with the source IP + // address. + SrcAsns []int64 `json:"srcAsns,omitempty"` + + // SrcIpRanges: Source IPv4/IPv6 addresses or CIDR prefixes, in standard + // text format. + SrcIpRanges []string `json:"srcIpRanges,omitempty"` + + // SrcPorts: Source port numbers for TCP/UDP/SCTP. Each element can be a + // 16-bit unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). + SrcPorts []string `json:"srcPorts,omitempty"` + + // SrcRegionCodes: Two-letter ISO 3166-1 alpha-2 country code associated + // with the source IP address. + SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` + + // UserDefinedFields: User-defined fields. Each element names a defined + // field and lists the matching values for that field. + UserDefinedFields []*SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch `json:"userDefinedFields,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestIpRanges") 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 @@ -50898,36 +49176,31 @@ type SslPoliciesListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DestIpRanges") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *SslPoliciesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListWarning +func (s *SecurityPolicyRuleNetworkMatcher) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleNetworkMatcher raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPoliciesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch struct { + // Name: Name of the user-defined field, as given in the definition. + Name string `json:"name,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // Values: Matching values of the field. Each element can be a 32-bit + // unsigned decimal or hexadecimal (starting with "0x") number (e.g. + // "64") or range (e.g. "0x400-0x7ff"). + Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -50935,7 +49208,7 @@ type SslPoliciesListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // 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 @@ -50944,20 +49217,18 @@ type SslPoliciesListWarningData struct { NullFields []string `json:"-"` } -func (s *SslPoliciesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListWarningData +func (s *SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPoliciesListAvailableFeaturesResponse struct { - Features []string `json:"features,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +type SecurityPolicyRulePreconfiguredWafConfig struct { + // Exclusions: A list of exclusions to apply during preconfigured WAF + // evaluation. + Exclusions []*SecurityPolicyRulePreconfiguredWafConfigExclusion `json:"exclusions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Features") to + // ForceSendFields is a list of field names (e.g. "Exclusions") 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 @@ -50965,7 +49236,7 @@ type SslPoliciesListAvailableFeaturesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Features") to include in + // NullFields is a list of field names (e.g. "Exclusions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -50974,120 +49245,86 @@ type SslPoliciesListAvailableFeaturesResponse struct { NullFields []string `json:"-"` } -func (s *SslPoliciesListAvailableFeaturesResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListAvailableFeaturesResponse +func (s *SecurityPolicyRulePreconfiguredWafConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRulePreconfiguredWafConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPoliciesScopedList struct { - // SslPolicies: A list of SslPolicies contained in this scope. - SslPolicies []*SslPolicy `json:"sslPolicies,omitempty"` +type SecurityPolicyRulePreconfiguredWafConfigExclusion struct { + // RequestCookiesToExclude: A list of request cookie names whose value + // will be excluded from inspection during preconfigured WAF evaluation. + RequestCookiesToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestCookiesToExclude,omitempty"` - // Warning: Informational warning which replaces the list of SSL - // policies when the list is empty. - Warning *SslPoliciesScopedListWarning `json:"warning,omitempty"` + // RequestHeadersToExclude: A list of request header names whose value + // will be excluded from inspection during preconfigured WAF evaluation. + RequestHeadersToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestHeadersToExclude,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslPolicies") 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. + // RequestQueryParamsToExclude: A list of request query parameter names + // whose value will be excluded from inspection during preconfigured WAF + // evaluation. Note that the parameter can be in the query string or in + // the POST body. + RequestQueryParamsToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestQueryParamsToExclude,omitempty"` + + // RequestUrisToExclude: A list of request URIs from the request line to + // be excluded from inspection during preconfigured WAF evaluation. When + // specifying this field, the query or fragment part should be excluded. + RequestUrisToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestUrisToExclude,omitempty"` + + // TargetRuleIds: A list of target rule IDs under the WAF rule set to + // apply the preconfigured WAF exclusion. If omitted, it refers to all + // the rule IDs under the WAF rule set. + TargetRuleIds []string `json:"targetRuleIds,omitempty"` + + // TargetRuleSet: Target WAF rule set to apply the preconfigured WAF + // exclusion. + TargetRuleSet string `json:"targetRuleSet,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "RequestCookiesToExclude") 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. "SslPolicies") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "RequestCookiesToExclude") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SslPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedList +func (s *SecurityPolicyRulePreconfiguredWafConfigExclusion) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusion raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslPoliciesScopedListWarning: Informational warning which replaces -// the list of SSL policies when the list is empty. -type SslPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. +type SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams struct { + // Op: The match operator for the field. // // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*SslPoliciesScopedListWarningData `json:"data,omitempty"` + // "CONTAINS" - The operator matches if the field value contains the + // specified value. + // "ENDS_WITH" - The operator matches if the field value ends with the + // specified value. + // "EQUALS" - The operator matches if the field value equals the + // specified value. + // "EQUALS_ANY" - The operator matches if the field value is any + // value. + // "STARTS_WITH" - The operator matches if the field value starts with + // the specified value. + Op string `json:"op,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // Val: The value of the field. + Val string `json:"val,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Op") 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 @@ -51095,7 +49332,7 @@ type SslPoliciesScopedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Op") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -51104,27 +49341,96 @@ type SslPoliciesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *SslPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedListWarning +func (s *SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type SecurityPolicyRuleRateLimitOptions struct { + // BanDurationSec: Can only be specified if the action for the rule is + // "rate_based_ban". If specified, determines the time (in seconds) the + // traffic will continue to be banned by the rate limit after the rate + // falls below the threshold. + BanDurationSec int64 `json:"banDurationSec,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // BanThreshold: Can only be specified if the action for the rule is + // "rate_based_ban". If specified, the key will be banned for the + // configured 'ban_duration_sec' when the number of requests that exceed + // the 'rate_limit_threshold' also exceed this 'ban_threshold'. + BanThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"banThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ConformAction: Action to take for requests that are under the + // configured rate limit threshold. Valid option is "allow" only. + ConformAction string `json:"conformAction,omitempty"` + + // EnforceOnKey: Determines the key to enforce the rate_limit_threshold + // on. Possible values are: - ALL: A single rate limit threshold is + // applied to all the requests matching this rule. This is the default + // value if "enforceOnKey" is not configured. - IP: The source IP + // address of the request is the key. Each IP has this limit enforced + // separately. - HTTP_HEADER: The value of the HTTP header whose name is + // configured under "enforceOnKeyName". The key value is truncated to + // the first 128 bytes of the header value. If no such header is present + // in the request, the key type defaults to ALL. - XFF_IP: The first IP + // address (i.e. the originating client IP address) specified in the + // list of IPs under X-Forwarded-For HTTP header. If no such header is + // present or the value is not a valid IP, the key defaults to the + // source IP address of the request i.e. key type IP. - HTTP_COOKIE: The + // value of the HTTP cookie whose name is configured under + // "enforceOnKeyName". The key value is truncated to the first 128 bytes + // of the cookie value. If no such cookie is present in the request, the + // key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP + // request. The key value is truncated to the first 128 bytes. - SNI: + // Server name indication in the TLS session of the HTTPS request. The + // key value is truncated to the first 128 bytes. The key type defaults + // to ALL on a HTTP session. - REGION_CODE: The country/region from + // which the request originates. + // + // Possible values: + // "ALL" + // "ALL_IPS" + // "HTTP_COOKIE" + // "HTTP_HEADER" + // "HTTP_PATH" + // "IP" + // "REGION_CODE" + // "SNI" + // "XFF_IP" + EnforceOnKey string `json:"enforceOnKey,omitempty"` + + // EnforceOnKeyConfigs: If specified, any combination of values of + // enforce_on_key_type/enforce_on_key_name is treated as the key on + // which ratelimit threshold/action is enforced. You can specify up to 3 + // enforce_on_key_configs. If enforce_on_key_configs is specified, + // enforce_on_key must not be specified. + EnforceOnKeyConfigs []*SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig `json:"enforceOnKeyConfigs,omitempty"` + + // EnforceOnKeyName: Rate limit key name applicable only for the + // following key types: HTTP_HEADER -- Name of the HTTP header whose + // value is taken as the key value. HTTP_COOKIE -- Name of the HTTP + // cookie whose value is taken as the key value. + EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` + + // ExceedAction: Action to take for requests that are above the + // configured rate limit threshold, to either deny with a specified HTTP + // response code, or redirect to a different endpoint. Valid options are + // `deny(STATUS)`, where valid values for `STATUS` are 403, 404, 429, + // and 502, and `redirect`, where the redirect parameters come from + // `exceedRedirectOptions` below. The `redirect` action is only + // supported in Global Security Policies of type CLOUD_ARMOR. + ExceedAction string `json:"exceedAction,omitempty"` + + // ExceedRedirectOptions: Parameters defining the redirect action that + // is used as the exceed action. Cannot be specified if the exceed + // action is not redirect. This field is only supported in Global + // Security Policies of type CLOUD_ARMOR. + ExceedRedirectOptions *SecurityPolicyRuleRedirectOptions `json:"exceedRedirectOptions,omitempty"` + + // RateLimitThreshold: Threshold at which to begin ratelimiting. + RateLimitThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"rateLimitThreshold,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BanDurationSec") 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 @@ -51132,123 +49438,73 @@ type SslPoliciesScopedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BanDurationSec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *SslPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedListWarningData +func (s *SecurityPolicyRuleRateLimitOptions) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleRateLimitOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslPolicy: Represents an SSL Policy resource. Use SSL policies to -// control the SSL features, such as versions and cipher suites, offered -// by an HTTPS or SSL Proxy load balancer. For more information, read -// SSL Policy Concepts. -type SslPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // CustomFeatures: A list of features enabled when the selected profile - // is CUSTOM. The method returns the set of features that can be - // specified in this list. This field must be empty if the profile is - // not CUSTOM. - CustomFeatures []string `json:"customFeatures,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // EnabledFeatures: [Output Only] The list of features enabled in the - // SSL policy. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a SslPolicy. An up-to-date - // fingerprint must be provided in order to update the SslPolicy, - // otherwise the request will fail with error 412 conditionNotMet. To - // see the latest fingerprint, make a get() request to retrieve an - // SslPolicy. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output only] Type of the resource. Always compute#sslPolicyfor - // SSL policies. - Kind string `json:"kind,omitempty"` - - // MinTlsVersion: The minimum version of SSL protocol that can be used - // by the clients to establish a connection with the load balancer. This - // can be one of TLS_1_0, TLS_1_1, TLS_1_2. - // - // Possible values: - // "TLS_1_0" - TLS 1.0 - // "TLS_1_1" - TLS 1.1 - // "TLS_1_2" - TLS 1.2 - MinTlsVersion string `json:"minTlsVersion,omitempty"` - - // Name: Name of the resource. The name must be 1-63 characters long, - // and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` +type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { + // EnforceOnKeyName: Rate limit key name applicable only for the + // following key types: HTTP_HEADER -- Name of the HTTP header whose + // value is taken as the key value. HTTP_COOKIE -- Name of the HTTP + // cookie whose value is taken as the key value. + EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` - // Profile: Profile specifies the set of SSL features that can be used - // by the load balancer when negotiating SSL with clients. This can be - // one of COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If using CUSTOM, - // the set of SSL features to enable must be specified in the - // customFeatures field. + // EnforceOnKeyType: Determines the key to enforce the + // rate_limit_threshold on. Possible values are: - ALL: A single rate + // limit threshold is applied to all the requests matching this rule. + // This is the default value if "enforceOnKeyConfigs" is not configured. + // - IP: The source IP address of the request is the key. Each IP has + // this limit enforced separately. - HTTP_HEADER: The value of the HTTP + // header whose name is configured under "enforceOnKeyName". The key + // value is truncated to the first 128 bytes of the header value. If no + // such header is present in the request, the key type defaults to ALL. + // - XFF_IP: The first IP address (i.e. the originating client IP + // address) specified in the list of IPs under X-Forwarded-For HTTP + // header. If no such header is present or the value is not a valid IP, + // the key defaults to the source IP address of the request i.e. key + // type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is + // configured under "enforceOnKeyName". The key value is truncated to + // the first 128 bytes of the cookie value. If no such cookie is present + // in the request, the key type defaults to ALL. - HTTP_PATH: The URL + // path of the HTTP request. The key value is truncated to the first 128 + // bytes. - SNI: Server name indication in the TLS session of the HTTPS + // request. The key value is truncated to the first 128 bytes. The key + // type defaults to ALL on a HTTP session. - REGION_CODE: The + // country/region from which the request originates. // // Possible values: - // "COMPATIBLE" - Compatible profile. Allows the broadset set of - // clients, even those which support only out-of-date SSL features to - // negotiate with the load balancer. - // "CUSTOM" - Custom profile. Allow only the set of allowed SSL - // features specified in the customFeatures field. - // "MODERN" - Modern profile. Supports a wide set of SSL features, - // allowing modern clients to negotiate SSL with the load balancer. - // "RESTRICTED" - Restricted profile. Supports a reduced set of SSL - // features, intended to meet stricter compliance requirements. - Profile string `json:"profile,omitempty"` - - // Region: [Output Only] URL of the region where the regional SSL policy - // resides. This field is not applicable to global SSL policies. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warnings: [Output Only] If potential misconfigurations are detected - // for this SSL policy, this field will be populated with warning - // messages. - Warnings []*SslPolicyWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // "ALL" + // "ALL_IPS" + // "HTTP_COOKIE" + // "HTTP_HEADER" + // "HTTP_PATH" + // "IP" + // "REGION_CODE" + // "SNI" + // "XFF_IP" + EnforceOnKeyType string `json:"enforceOnKeyType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "EnforceOnKeyName") 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. "CreationTimestamp") to + // NullFields is a list of field names (e.g. "EnforceOnKeyName") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -51258,87 +49514,20 @@ type SslPolicy struct { NullFields []string `json:"-"` } -func (s *SslPolicy) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicy +func (s *SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPolicyWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*SslPolicyWarningsData `json:"data,omitempty"` +type SecurityPolicyRuleRateLimitOptionsThreshold struct { + // Count: Number of HTTP(S) requests for calculating the threshold. + Count int64 `json:"count,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // IntervalSec: Interval over which the threshold is computed. + IntervalSec int64 `json:"intervalSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Count") 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 @@ -51346,7 +49535,7 @@ type SslPolicyWarnings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Count") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -51355,27 +49544,25 @@ type SslPolicyWarnings struct { NullFields []string `json:"-"` } -func (s *SslPolicyWarnings) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyWarnings +func (s *SecurityPolicyRuleRateLimitOptionsThreshold) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleRateLimitOptionsThreshold raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPolicyWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type SecurityPolicyRuleRedirectOptions struct { + // Target: Target for the redirect action. This is required if the type + // is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. + Target string `json:"target,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // Type: Type of the redirect action. + // + // Possible values: + // "EXTERNAL_302" + // "GOOGLE_RECAPTCHA" + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Target") 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 @@ -51383,7 +49570,7 @@ type SslPolicyWarningsData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Target") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -51392,19 +49579,46 @@ type SslPolicyWarningsData struct { NullFields []string `json:"-"` } -func (s *SslPolicyWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyWarningsData +func (s *SecurityPolicyRuleRedirectOptions) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleRedirectOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SslPolicyReference struct { - // SslPolicy: URL of the SSL policy resource. Set this to empty string - // to clear any existing SSL policy associated with the target proxy - // resource. - SslPolicy string `json:"sslPolicy,omitempty"` +type SecurityPolicyUserDefinedField struct { + // Base: The base relative to which 'offset' is measured. Possible + // values are: - IPV4: Points to the beginning of the IPv4 header. - + // IPV6: Points to the beginning of the IPv6 header. - TCP: Points to + // the beginning of the TCP header, skipping over any IPv4 options or + // IPv6 extension headers. Not present for non-first fragments. - UDP: + // Points to the beginning of the UDP header, skipping over any IPv4 + // options or IPv6 extension headers. Not present for non-first + // fragments. required + // + // Possible values: + // "IPV4" + // "IPV6" + // "TCP" + // "UDP" + Base string `json:"base,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslPolicy") to + // Mask: If specified, apply this mask (bitwise AND) to the field to + // ignore bits before matching. Encoded as a hexadecimal number + // (starting with "0x"). The last byte of the field (in network byte + // order) corresponds to the least significant byte of the mask. + Mask string `json:"mask,omitempty"` + + // Name: The name of this field. Must be unique within the policy. + Name string `json:"name,omitempty"` + + // Offset: Offset of the first byte of the field (in network byte order) + // relative to 'base'. + Offset int64 `json:"offset,omitempty"` + + // Size: Size of the field in bytes. Valid values: 1-4. + Size int64 `json:"size,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Base") 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 @@ -51412,8 +49626,8 @@ type SslPolicyReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslPolicy") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Base") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -51421,16 +49635,48 @@ type SslPolicyReference struct { NullFields []string `json:"-"` } -func (s *SslPolicyReference) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyReference +func (s *SecurityPolicyUserDefinedField) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyUserDefinedField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type StatefulPolicy struct { - PreservedState *StatefulPolicyPreservedState `json:"preservedState,omitempty"` +// SecuritySettings: The authentication and authorization settings for a +// BackendService. +type SecuritySettings struct { + // Authentication: [Deprecated] Use clientTlsPolicy instead. + Authentication string `json:"authentication,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreservedState") to + // AwsV4Authentication: The configuration needed to generate a signature + // for access to private storage buckets that support AWS's Signature + // Version 4 for authentication. Allowed only for INTERNET_IP_PORT and + // INTERNET_FQDN_PORT NEG backends. + AwsV4Authentication *AWSV4Signature `json:"awsV4Authentication,omitempty"` + + // ClientTlsPolicy: Optional. A URL referring to a + // networksecurity.ClientTlsPolicy resource that describes how clients + // should authenticate with this service's backends. clientTlsPolicy + // only applies to a global BackendService with the loadBalancingScheme + // set to INTERNAL_SELF_MANAGED. If left blank, communications are not + // encrypted. + ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"` + + // SubjectAltNames: Optional. A list of Subject Alternative Names (SANs) + // that the client verifies during a mutual TLS handshake with an + // server/endpoint for this BackendService. When the server presents its + // X.509 certificate to the client, the client inspects the + // certificate's subjectAltName field. If the field contains one of the + // specified values, the communication continues. Otherwise, it fails. + // This additional check enables the client to verify that the server is + // authorized to run the requested service. Note that the contents of + // the server certificate's subjectAltName field are configured by the + // Public Key Infrastructure which provisions server identities. Only + // applies to a global BackendService with loadBalancingScheme set to + // INTERNAL_SELF_MANAGED. Only applies when BackendService has an + // attached clientTlsPolicy with clientCertificate (mTLS mode). + SubjectAltNames []string `json:"subjectAltNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Authentication") 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 @@ -51438,7 +49684,7 @@ type StatefulPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreservedState") to + // NullFields is a list of field names (e.g. "Authentication") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -51448,30 +49694,44 @@ type StatefulPolicy struct { NullFields []string `json:"-"` } -func (s *StatefulPolicy) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicy +func (s *SecuritySettings) MarshalJSON() ([]byte, error) { + type NoMethod SecuritySettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// StatefulPolicyPreservedState: Configuration of preserved resources. -type StatefulPolicyPreservedState struct { - // Disks: Disks created on the instances that will be preserved on - // instance delete, update, etc. This map is keyed with the device names - // of the disks. - Disks map[string]StatefulPolicyPreservedStateDiskDevice `json:"disks,omitempty"` +// SerialPortOutput: An instance serial console output. +type SerialPortOutput struct { + // Contents: [Output Only] The contents of the console output. + Contents string `json:"contents,omitempty"` - // ExternalIPs: External network IPs assigned to the instances that will - // be preserved on instance delete, update, etc. This map is keyed with - // the network interface name. - ExternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"externalIPs,omitempty"` + // Kind: [Output Only] Type of the resource. Always + // compute#serialPortOutput for serial port output. + Kind string `json:"kind,omitempty"` - // InternalIPs: Internal network IPs assigned to the instances that will - // be preserved on instance delete, update, etc. This map is keyed with - // the network interface name. - InternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"internalIPs,omitempty"` + // Next: [Output Only] The position of the next byte of content, + // regardless of whether the content exists, following the output + // returned in the `contents` property. Use this value in the next + // request as the start parameter. + Next int64 `json:"next,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Disks") to + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Start: The starting byte position of the output that was returned. + // This should match the start parameter sent with the request. If the + // serial console output exceeds the size of the buffer (1 MB), older + // output is overwritten by newer content. The output start value will + // indicate the byte position of the output that was returned, which + // might be different than the `start` value that was specified in the + // request. + Start int64 `json:"start,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Contents") 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 @@ -51479,8 +49739,8 @@ type StatefulPolicyPreservedState struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Contents") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -51488,26 +49748,22 @@ type StatefulPolicyPreservedState struct { NullFields []string `json:"-"` } -func (s *StatefulPolicyPreservedState) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedState +func (s *SerialPortOutput) MarshalJSON() ([]byte, error) { + type NoMethod SerialPortOutput raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type StatefulPolicyPreservedStateDiskDevice struct { - // AutoDelete: These stateful disks will never be deleted during - // autohealing, update or VM instance recreate operations. This flag is - // used to configure if the disk should be deleted after it is no longer - // used by the group, e.g. when the given instance or the whole group is - // deleted. Note: disks attached in READ_ONLY mode cannot be - // auto-deleted. - // +type ServerBinding struct { // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` + // "RESTART_NODE_ON_ANY_SERVER" - Node may associate with any physical + // server over its lifetime. + // "RESTART_NODE_ON_MINIMAL_SERVERS" - Node may associate with minimal + // physical servers over its lifetime. + // "SERVER_BINDING_TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // ForceSendFields is a list of field names (e.g. "Type") 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 @@ -51515,8 +49771,8 @@ type StatefulPolicyPreservedStateDiskDevice struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -51524,25 +49780,22 @@ type StatefulPolicyPreservedStateDiskDevice struct { NullFields []string `json:"-"` } -func (s *StatefulPolicyPreservedStateDiskDevice) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedStateDiskDevice +func (s *ServerBinding) MarshalJSON() ([]byte, error) { + type NoMethod ServerBinding raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type StatefulPolicyPreservedStateNetworkIp struct { - // AutoDelete: These stateful IPs will never be released during - // autohealing, update or VM instance recreate operations. This flag is - // used to configure if the IP reservation should be deleted after it is - // no longer used by the group, e.g. when the given instance or the - // whole group is deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` +// ServiceAccount: A service account. +type ServiceAccount struct { + // Email: Email address of the service account. + Email string `json:"email,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // Scopes: The list of scopes to be made available for this service + // account. + Scopes []string `json:"scopes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") 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 @@ -51550,8 +49803,8 @@ type StatefulPolicyPreservedStateNetworkIp struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -51559,255 +49812,165 @@ type StatefulPolicyPreservedStateNetworkIp struct { NullFields []string `json:"-"` } -func (s *StatefulPolicyPreservedStateNetworkIp) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedStateNetworkIp +func (s *ServiceAccount) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccount raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Subnetwork: Represents a Subnetwork resource. A subnetwork (also -// known as a subnet) is a logical partition of a Virtual Private Cloud -// network with one primary IP range and zero or more secondary IP -// ranges. For more information, read Virtual Private Cloud (VPC) -// Network. -type Subnetwork struct { - // AllowSubnetCidrRoutesOverlap: Whether this subnetwork's ranges can - // conflict with existing static routes. Setting this to true allows - // this subnetwork's primary and secondary ranges to overlap with (and - // contain) static routes that have already been configured on the - // corresponding network. For example if a static route has range - // 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be created if - // allow_conflicting_routes=true. Overlapping is only allowed on - // subnetwork operations; routes whose ranges conflict with this - // subnetwork's ranges won't be allowed unless - // route.allow_conflicting_subnetworks is set to true. Typically packets - // destined to IPs within the subnetwork (which may contain - // private/sensitive data) are prevented from leaving the virtual - // network. Setting this field to true will disable this feature. The - // default value is false and applies to all existing subnetworks and - // automatically created subnetworks. This field cannot be set to true - // at resource creation time. - AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` +// ServiceAttachment: Represents a ServiceAttachment resource. A service +// attachment represents a service that a producer has exposed. It +// encapsulates the load balancer which fronts the service runs and a +// list of NAT IP ranges that the producers uses to represent the +// consumers connecting to the service. +type ServiceAttachment struct { + // ConnectedEndpoints: [Output Only] An array of connections for all the + // consumers connected to this service attachment. + ConnectedEndpoints []*ServiceAttachmentConnectedEndpoint `json:"connectedEndpoints,omitempty"` + + // ConnectionPreference: The connection preference of service + // attachment. The value can be set to ACCEPT_AUTOMATIC. An + // ACCEPT_AUTOMATIC service attachment is one that always accepts the + // connection from consumer forwarding rules. + // + // Possible values: + // "ACCEPT_AUTOMATIC" + // "ACCEPT_MANUAL" + // "CONNECTION_PREFERENCE_UNSPECIFIED" + ConnectionPreference string `json:"connectionPreference,omitempty"` + + // ConsumerAcceptLists: Projects that are allowed to connect to this + // service attachment. + ConsumerAcceptLists []*ServiceAttachmentConsumerProjectLimit `json:"consumerAcceptLists,omitempty"` + + // ConsumerRejectLists: Projects that are not allowed to connect to this + // service attachment. The project can be specified using its id or + // number. + ConsumerRejectLists []string `json:"consumerRejectLists,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. This field can be set only at - // resource creation time. + // property when you create the resource. Description string `json:"description,omitempty"` - // EnableFlowLogs: Whether to enable flow logging for this subnetwork. - // If this field is not explicitly set, it will not appear in get - // listings. If not set the default behavior is determined by the org - // policy, if there is no org policy specified, then it will default to - // disabled. This field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. - EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` + // DomainNames: If specified, the domain name will be used during the + // integration between the PSC connected endpoints and the Cloud DNS. + // For example, this is a valid domain name: "p.mycompany.com.". Current + // max number of domain names supported is 1. + DomainNames []string `json:"domainNames,omitempty"` - // ExternalIpv6Prefix: The external IPv6 address range that is owned by - // this subnetwork. - ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` + // EnableProxyProtocol: If true, enable the proxy protocol which is for + // supplying client TCP/IP address data in TCP connections that traverse + // proxies on their way to destination servers. + EnableProxyProtocol bool `json:"enableProxyProtocol,omitempty"` // Fingerprint: Fingerprint of this resource. A hash of the contents // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a Subnetwork. An up-to-date - // fingerprint must be provided in order to update the Subnetwork, - // otherwise the request will fail with error 412 conditionNotMet. To - // see the latest fingerprint, make a get() request to retrieve a - // Subnetwork. + // field will be ignored when inserting a ServiceAttachment. An + // up-to-date fingerprint must be provided in order to patch/update the + // ServiceAttachment; otherwise, the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve the ServiceAttachment. Fingerprint string `json:"fingerprint,omitempty"` - // GatewayAddress: [Output Only] The gateway address for default routes - // to reach destination addresses outside this subnetwork. - GatewayAddress string `json:"gatewayAddress,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] The unique identifier for the resource type. The + // server generates this identifier. Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Prefix: [Output Only] The internal IPv6 address range - // that is assigned to this subnetwork. - InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` - - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. Provide this property when you create the subnetwork. For - // example, 10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and - // non-overlapping within a network. Only IPv4 is supported. This field - // is set at resource creation time. The range can be any range listed - // in the Valid ranges list. The range can be expanded after creation - // using expandIpCidrRange. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // Ipv6AccessType: The access type of IPv6 address this subnet holds. - // It's immutable and can only be specified during creation or the first - // time the subnet is updated into IPV4_IPV6 dual stack. - // - // Possible values: - // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses - // that are accessible via the Internet, as well as the VPC network. - // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses - // that are only accessible over the VPC network. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - - // Ipv6CidrRange: [Output Only] This field is for internal use. - Ipv6CidrRange string `json:"ipv6CidrRange,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#subnetwork - // for Subnetwork resources. + // Kind: [Output Only] Type of the resource. Always + // compute#serviceAttachment for service attachments. Kind string `json:"kind,omitempty"` - // LogConfig: This field denotes the VPC flow logging options for this - // subnetwork. If logging is enabled, logs are exported to Cloud - // Logging. - LogConfig *SubnetworkLogConfig `json:"logConfig,omitempty"` - - // Name: The name of the resource, provided by the client when initially - // creating the resource. The name must be 1-63 characters long, and - // comply with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and all - // following characters must be a dash, lowercase letter, or digit, - // except the last character, which cannot be a dash. + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: The URL of the network to which this subnetwork belongs, - // provided by the client when initially creating the subnetwork. This - // field can be set only at resource creation time. - Network string `json:"network,omitempty"` + // NatSubnets: An array of URLs where each entry is the URL of a subnet + // provided by the service producer to use for NAT in this service + // attachment. + NatSubnets []string `json:"natSubnets,omitempty"` - // PrivateIpGoogleAccess: Whether the VMs in this subnet can access - // Google services without assigned external IP addresses. This field - // can be both set at resource creation time and updated using - // setPrivateIpGoogleAccess. - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` + // ProducerForwardingRule: The URL of a forwarding rule with + // loadBalancingScheme INTERNAL* that is serving the endpoint identified + // by this service attachment. + ProducerForwardingRule string `json:"producerForwardingRule,omitempty"` - // PrivateIpv6GoogleAccess: This field is for internal use. This field - // can be both set at resource creation time and updated using patch. - // - // Possible values: - // "DISABLE_GOOGLE_ACCESS" - Disable private IPv6 access to/from - // Google services. - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private - // IPv6 access to/from Google services. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 - // access from VMs in this subnet to Google services. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` + // PscServiceAttachmentId: [Output Only] An 128-bit global unique ID of + // the PSC service attachment. + PscServiceAttachmentId *Uint128 `json:"pscServiceAttachmentId,omitempty"` - // Purpose: The purpose of the resource. This field can be either - // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created - // subnetwork that is reserved for Internal HTTP(S) Load Balancing. If - // unspecified, the purpose defaults to PRIVATE_RFC_1918. The - // enableFlowLogs field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. - // - // Possible values: - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal - // HTTP(S) Load Balancing. - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_RFC_1918" - Regular user created or automatically created - // subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional - // Internal/External HTTP(S) Load Balancing. - Purpose string `json:"purpose,omitempty"` + // ReconcileConnections: This flag determines whether a consumer + // accept/reject list change can reconcile the statuses of existing + // ACCEPTED or REJECTED PSC endpoints. - If false, connection policy + // update will only affect existing PENDING PSC endpoints. Existing + // ACCEPTED/REJECTED endpoints will remain untouched regardless how the + // connection policy is modified . - If true, update will affect both + // PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED + // PSC endpoint will be moved to REJECTED if its project is added to the + // reject list. For newly created service attachment, this boolean + // defaults to true. + ReconcileConnections bool `json:"reconcileConnections,omitempty"` - // Region: URL of the region where the Subnetwork resides. This field - // can be set only at resource creation time. + // Region: [Output Only] URL of the region where the service attachment + // resides. This field applies only to the region resource. You must + // specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. Region string `json:"region,omitempty"` - // ReservedInternalRange: The URL of the reserved internal range. - ReservedInternalRange string `json:"reservedInternalRange,omitempty"` - - // Role: The role of subnetwork. Currently, this field is only used when - // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to - // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being - // used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one - // that is ready to be promoted to ACTIVE or is currently draining. This - // field can be updated with a patch request. - // - // Possible values: - // "ACTIVE" - The ACTIVE subnet that is currently used. - // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. - Role string `json:"role,omitempty"` - - // SecondaryIpRanges: An array of configurations for secondary IP ranges - // for VM instances contained in this subnetwork. The primary IP of such - // VM must belong to the primary ipCidrRange of the subnetwork. The - // alias IPs may belong to either primary or secondary ranges. This - // field can be updated with a patch request. - SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for the subnet. If set to IPV4_ONLY, new - // VMs in the subnet are assigned IPv4 addresses only. If set to - // IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 - // addresses. If not specified, IPV4_ONLY is used. This field can be - // both set at resource creation time and updated using patch. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 - // addresses. - StackType string `json:"stackType,omitempty"` - - // State: [Output Only] The state of the subnetwork, which can be one of - // the following values: READY: Subnetwork is created and ready to use - // DRAINING: only applicable to subnetworks that have the purpose set to - // INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the - // load balancer are being drained. A subnetwork that is draining cannot - // be used or modified until it reaches a status of READY - // - // Possible values: - // "DRAINING" - Subnetwork is being drained. - // "READY" - Subnetwork is ready for use. - State string `json:"state,omitempty"` + // TargetService: The URL of a service serving the endpoint identified + // by this service attachment. + TargetService string `json:"targetService,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AllowSubnetCidrRoutesOverlap") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "ConnectedEndpoints") + // 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. - // "AllowSubnetCidrRoutesOverlap") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an 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. "ConnectedEndpoints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *Subnetwork) MarshalJSON() ([]byte, error) { - type NoMethod Subnetwork +func (s *ServiceAttachment) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SubnetworkAggregatedList struct { +// ServiceAttachmentAggregatedList: Contains a list of +// ServiceAttachmentsScopedList. +type ServiceAttachmentAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of SubnetworksScopedList resources. - Items map[string]SubnetworksScopedList `json:"items,omitempty"` + // Items: A list of ServiceAttachmentsScopedList resources. + Items map[string]ServiceAttachmentsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#subnetworkAggregatedList for aggregated lists of subnetworks. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -51825,7 +49988,7 @@ type SubnetworkAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *SubnetworkAggregatedListWarning `json:"warning,omitempty"` + Warning *ServiceAttachmentAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -51848,15 +50011,15 @@ type SubnetworkAggregatedList struct { NullFields []string `json:"-"` } -func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedList +func (s *ServiceAttachmentAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SubnetworkAggregatedListWarning: [Output Only] Informational warning -// message. -type SubnetworkAggregatedListWarning struct { +// ServiceAttachmentAggregatedListWarning: [Output Only] Informational +// warning message. +type ServiceAttachmentAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -51924,7 +50087,7 @@ type SubnetworkAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SubnetworkAggregatedListWarningData `json:"data,omitempty"` + Data []*ServiceAttachmentAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -51947,13 +50110,13 @@ type SubnetworkAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *SubnetworkAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedListWarning +func (s *ServiceAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SubnetworkAggregatedListWarningData struct { +type ServiceAttachmentAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -51984,23 +50147,104 @@ type SubnetworkAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *SubnetworkAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedListWarningData +func (s *ServiceAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SubnetworkList: Contains a list of Subnetwork resources. -type SubnetworkList struct { +// ServiceAttachmentConnectedEndpoint: [Output Only] A connection +// connected to this service attachment. +type ServiceAttachmentConnectedEndpoint struct { + // Endpoint: The url of a connected endpoint. + Endpoint string `json:"endpoint,omitempty"` + + // PscConnectionId: The PSC connection id of the connected endpoint. + PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` + + // Status: The status of a connected endpoint to this service + // attachment. + // + // Possible values: + // "ACCEPTED" - The connection has been accepted by the producer. + // "CLOSED" - The connection has been closed by the producer. + // "NEEDS_ATTENTION" - The connection has been accepted by the + // producer, but the producer needs to take further action before the + // forwarding rule can serve traffic. + // "PENDING" - The connection is pending acceptance by the producer. + // "REJECTED" - The consumer is still connected but not using the + // connection. + // "STATUS_UNSPECIFIED" + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Endpoint") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentConnectedEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ServiceAttachmentConsumerProjectLimit struct { + // ConnectionLimit: The value of the limit to set. + ConnectionLimit int64 `json:"connectionLimit,omitempty"` + + // NetworkUrl: The network URL for the network to set the limit for. + NetworkUrl string `json:"networkUrl,omitempty"` + + // ProjectIdOrNum: The project id or number for the project to set the + // limit for. + ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectionLimit") 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. "ConnectionLimit") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAttachmentConsumerProjectLimit) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentConsumerProjectLimit + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ServiceAttachmentList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of Subnetwork resources. - Items []*Subnetwork `json:"items,omitempty"` + // Items: A list of ServiceAttachment resources. + Items []*ServiceAttachment `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#subnetworkList - // for lists of subnetworks. + // Kind: [Output Only] Type of the resource. Always + // compute#serviceAttachment for service attachments. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -52015,7 +50259,7 @@ type SubnetworkList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *SubnetworkListWarning `json:"warning,omitempty"` + Warning *ServiceAttachmentListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -52038,14 +50282,15 @@ type SubnetworkList struct { NullFields []string `json:"-"` } -func (s *SubnetworkList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkList +func (s *ServiceAttachmentList) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SubnetworkListWarning: [Output Only] Informational warning message. -type SubnetworkListWarning struct { +// ServiceAttachmentListWarning: [Output Only] Informational warning +// message. +type ServiceAttachmentListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -52113,7 +50358,7 @@ type SubnetworkListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SubnetworkListWarningData `json:"data,omitempty"` + Data []*ServiceAttachmentListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -52136,13 +50381,13 @@ type SubnetworkListWarning struct { NullFields []string `json:"-"` } -func (s *SubnetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkListWarning +func (s *ServiceAttachmentListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SubnetworkListWarningData struct { +type ServiceAttachmentListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -52173,65 +50418,22 @@ type SubnetworkListWarningData struct { NullFields []string `json:"-"` } -func (s *SubnetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkListWarningData +func (s *ServiceAttachmentListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SubnetworkLogConfig: The available logging options for this -// subnetwork. -type SubnetworkLogConfig struct { - // AggregationInterval: Can only be specified if VPC flow logging for - // this subnetwork is enabled. Toggles the aggregation interval for - // collecting flow logs. Increasing the interval time will reduce the - // amount of generated flow logs for long lasting connections. Default - // is an interval of 5 seconds per connection. - // - // Possible values: - // "INTERVAL_10_MIN" - // "INTERVAL_15_MIN" - // "INTERVAL_1_MIN" - // "INTERVAL_30_SEC" - // "INTERVAL_5_MIN" - // "INTERVAL_5_SEC" - AggregationInterval string `json:"aggregationInterval,omitempty"` - - // Enable: Whether to enable flow logging for this subnetwork. If this - // field is not explicitly set, it will not appear in get listings. If - // not set the default behavior is determined by the org policy, if - // there is no org policy specified, then it will default to disabled. - Enable bool `json:"enable,omitempty"` - - // FilterExpr: Can only be specified if VPC flow logs for this - // subnetwork is enabled. The filter expression is used to define which - // VPC flow logs should be exported to Cloud Logging. - FilterExpr string `json:"filterExpr,omitempty"` - - // FlowSampling: Can only be specified if VPC flow logging for this - // subnetwork is enabled. The value of the field must be in [0, 1]. Set - // the sampling rate of VPC flow logs within the subnetwork where 1.0 - // means all collected logs are reported and 0.0 means no logs are - // reported. Default is 0.5 unless otherwise specified by the org - // policy, which means half of all collected logs are reported. - FlowSampling float64 `json:"flowSampling,omitempty"` - - // Metadata: Can only be specified if VPC flow logs for this subnetwork - // is enabled. Configures whether all, none or a subset of metadata - // fields should be added to the reported VPC flow logs. Default is - // EXCLUDE_ALL_METADATA. - // - // Possible values: - // "CUSTOM_METADATA" - // "EXCLUDE_ALL_METADATA" - // "INCLUDE_ALL_METADATA" - Metadata string `json:"metadata,omitempty"` +type ServiceAttachmentsScopedList struct { + // ServiceAttachments: A list of ServiceAttachments contained in this + // scope. + ServiceAttachments []*ServiceAttachment `json:"serviceAttachments,omitempty"` - // MetadataFields: Can only be specified if VPC flow logs for this - // subnetwork is enabled and "metadata" was set to CUSTOM_METADATA. - MetadataFields []string `json:"metadataFields,omitempty"` + // Warning: Informational warning which replaces the list of service + // attachments when the list is empty. + Warning *ServiceAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregationInterval") + // ForceSendFields is a list of field names (e.g. "ServiceAttachments") // 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 @@ -52239,7 +50441,7 @@ type SubnetworkLogConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregationInterval") to + // NullFields is a list of field names (e.g. "ServiceAttachments") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -52249,134 +50451,15 @@ type SubnetworkLogConfig struct { NullFields []string `json:"-"` } -func (s *SubnetworkLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkLogConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *SubnetworkLogConfig) UnmarshalJSON(data []byte) error { - type NoMethod SubnetworkLogConfig - var s1 struct { - FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FlowSampling = float64(s1.FlowSampling) - return nil -} - -// SubnetworkSecondaryRange: Represents a secondary IP range of a -// subnetwork. -type SubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. Provide this property when you create the - // subnetwork. Ranges must be unique and non-overlapping with all - // primary and secondary IP ranges within a network. Only IPv4 is - // supported. The range can be any range listed in the Valid ranges - // list. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // RangeName: The name associated with this subnetwork secondary range, - // used when adding an alias IP range to a VM instance. The name must be - // 1-63 characters long, and comply with RFC1035. The name must be - // unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - - // ReservedInternalRange: The URL of the reserved internal range. - ReservedInternalRange string `json:"reservedInternalRange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") 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. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkSecondaryRange - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksExpandIpCidrRangeRequest struct { - // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses - // that are legal on this Subnetwork. This range should be disjoint from - // other subnetworks within this network. This range can only be larger - // than (i.e. a superset of) the range previously defined before the - // update. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // ForceSendFields is a list of field names (e.g. "IpCidrRange") 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. "IpCidrRange") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksExpandIpCidrRangeRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedList struct { - // Subnetworks: A list of subnetworks contained in this scope. - Subnetworks []*Subnetwork `json:"subnetworks,omitempty"` - - // Warning: An informational warning that appears when the list of - // addresses is empty. - Warning *SubnetworksScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Subnetworks") 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. "Subnetworks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedList +func (s *ServiceAttachmentsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SubnetworksScopedListWarning: An informational warning that appears -// when the list of addresses is empty. -type SubnetworksScopedListWarning struct { +// ServiceAttachmentsScopedListWarning: Informational warning which +// replaces the list of service attachments when the list is empty. +type ServiceAttachmentsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -52444,7 +50527,7 @@ type SubnetworksScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*SubnetworksScopedListWarningData `json:"data,omitempty"` + Data []*ServiceAttachmentsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -52467,13 +50550,13 @@ type SubnetworksScopedListWarning struct { NullFields []string `json:"-"` } -func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedListWarning +func (s *ServiceAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SubnetworksScopedListWarningData struct { +type ServiceAttachmentsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -52504,75 +50587,35 @@ type SubnetworksScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedListWarningData +func (s *ServiceAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type SubnetworksSetPrivateIpGoogleAccessRequest struct { - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "PrivateIpGoogleAccess") 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. "PrivateIpGoogleAccess") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} +// ShareSettings: The share setting for reservations and sole tenancy +// node groups. +type ShareSettings struct { + // ProjectMap: A map of project id and project config. This is only + // valid when share_type's value is SPECIFIC_PROJECTS. + ProjectMap map[string]ShareSettingsProjectConfig `json:"projectMap,omitempty"` -func (s *SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksSetPrivateIpGoogleAccessRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Projects: A List of Project names to specify consumer projects for + // this shared-reservation. This is only valid when share_type's value + // is SPECIFIC_PROJECTS. + Projects []string `json:"projects,omitempty"` -// Subsetting: Subsetting configuration for this BackendService. -// Currently this is applicable only for Internal TCP/UDP load -// balancing, Internal HTTP(S) load balancing and Traffic Director. -type Subsetting struct { + // ShareType: Type of sharing for this shared-reservation + // // Possible values: - // "CONSISTENT_HASH_SUBSETTING" - Subsetting based on consistent - // hashing. For Traffic Director, the number of backends per backend - // group (the subset size) is based on the `subset_size` parameter. For - // Internal HTTP(S) load balancing, the number of backends per backend - // group (the subset size) is dynamically adjusted in two cases: - As - // the number of proxy instances participating in Internal HTTP(S) load - // balancing increases, the subset size decreases. - When the total - // number of backends in a network exceeds the capacity of a single - // proxy instance, subset sizes are reduced automatically for each - // service that has backend subsetting enabled. - // "NONE" - No Subsetting. Clients may open connections and send - // traffic to all backends of this backend service. This can lead to - // performance issues if there is substantial imbalance in the count of - // clients and backends. - Policy string `json:"policy,omitempty"` - - // SubsetSize: The number of backends per backend group assigned to each - // proxy instance or each service mesh client. An input parameter to the - // `CONSISTENT_HASH_SUBSETTING` algorithm. Can only be set if `policy` - // is set to `CONSISTENT_HASH_SUBSETTING`. Can only be set if load - // balancing scheme is `INTERNAL_MANAGED` or `INTERNAL_SELF_MANAGED`. - // `subset_size` is optional for Internal HTTP(S) load balancing and - // required for Traffic Director. If you do not provide this value, - // Cloud Load Balancing will calculate it dynamically to optimize the - // number of proxies/clients visible to each backend and vice versa. - // Must be greater than 0. If `subset_size` is larger than the number of - // backends/endpoints, then subsetting is disabled. - SubsetSize int64 `json:"subsetSize,omitempty"` + // "LOCAL" - Default value. + // "ORGANIZATION" - Shared-reservation is open to entire Organization + // "SHARE_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "SPECIFIC_PROJECTS" - Shared-reservation is open to specific + // projects + ShareType string `json:"shareType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // ForceSendFields is a list of field names (e.g. "ProjectMap") 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 @@ -52580,8 +50623,8 @@ type Subsetting struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ProjectMap") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -52589,76 +50632,20 @@ type Subsetting struct { NullFields []string `json:"-"` } -func (s *Subsetting) MarshalJSON() ([]byte, error) { - type NoMethod Subsetting +func (s *ShareSettings) MarshalJSON() ([]byte, error) { + type NoMethod ShareSettings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TCPHealthCheck struct { - // Port: The TCP port number to which the health check prober sends - // packets. The default value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - - // PortSpecification: Specifies how a port is selected for health - // checking. Can be one of the following values: USE_FIXED_PORT: - // Specifies a port number explicitly using the port field in the health - // check. Supported by backend services for pass-through load balancers - // and backend services for proxy load balancers. Not supported by - // target pools. The health check supports all backends supported by the - // backend service provided the backend can be health checked. For - // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network - // endpoint groups, and instance group backends. USE_NAMED_PORT: Not - // supported. USE_SERVING_PORT: Provides an indirect method of - // specifying the health check port by referring to the backend service. - // Only supported by backend services for proxy load balancers. Not - // supported by target pools. Not supported by backend services for - // pass-through load balancers. Supports all backends that can be health - // checked; for example, GCE_VM_IP_PORT network endpoint groups and - // instance group backends. For GCE_VM_IP_PORT network endpoint group - // backends, the health check uses the port number specified for each - // endpoint in the network endpoint group. For instance group backends, - // the health check uses the port number determined by looking up the - // backend service's named port in the instance group's list of named - // ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is - // used for health checking. Applies to network endpoint group and - // instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the - // health check uses the port number specified on each endpoint in the - // network endpoint group. For instance group backends, the health check - // uses the port number specified for the backend service's named port - // defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Request: Instructs the health check prober to send this exact ASCII - // string, up to 1024 bytes in length, after establishing the TCP - // connection. - Request string `json:"request,omitempty"` - - // Response: Creates a content-based TCP health check. In addition to - // establishing a TCP connection, you can configure the health check to - // pass only when the backend sends this exact response ASCII string, up - // to 1024 bytes in length. For details, see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp - Response string `json:"response,omitempty"` +// ShareSettingsProjectConfig: Config for each project in the share +// settings. +type ShareSettingsProjectConfig struct { + // ProjectId: The project ID, should be same as the key of this project + // config in the parent map. + ProjectId string `json:"projectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Port") to + // ForceSendFields is a list of field names (e.g. "ProjectId") 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 @@ -52666,8 +50653,8 @@ type TCPHealthCheck struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Port") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ProjectId") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -52675,174 +50662,102 @@ type TCPHealthCheck struct { NullFields []string `json:"-"` } -func (s *TCPHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod TCPHealthCheck +func (s *ShareSettingsProjectConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShareSettingsProjectConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Tags: A set of instance tags. -type Tags struct { - // Fingerprint: Specifies a fingerprint for this request, which is - // essentially a hash of the tags' contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update tags. You must always - // provide an up-to-date fingerprint hash in order to update or change - // tags. To see the latest fingerprint, make get() request to the - // instance. - Fingerprint string `json:"fingerprint,omitempty"` +// ShieldedInstanceConfig: A set of Shielded Instance options. +type ShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Defines whether the instance has integrity + // monitoring enabled. Enabled by default. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - // Items: An array of tags. Each tag must be 1-63 characters long, and - // comply with RFC1035. - Items []string `json:"items,omitempty"` + // EnableSecureBoot: Defines whether the instance has Secure Boot + // enabled. Disabled by default. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") 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. + // EnableVtpm: Defines whether the instance has the vTPM enabled. + // Enabled by default. + EnableVtpm bool `json:"enableVtpm,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") 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. "Fingerprint") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Tags) MarshalJSON() ([]byte, error) { - type NoMethod Tags +func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetGrpcProxy: Represents a Target gRPC Proxy resource. A target -// gRPC proxy is a component of load balancers intended for load -// balancing gRPC traffic. Only global forwarding rules with load -// balancing scheme INTERNAL_SELF_MANAGED can reference a target gRPC -// proxy. The target gRPC Proxy references a URL map that specifies how -// traffic is routed to gRPC backend services. -type TargetGrpcProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a TargetGrpcProxy. An up-to-date - // fingerprint must be provided in order to patch/update the - // TargetGrpcProxy; otherwise, the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve the TargetGrpcProxy. - Fingerprint string `json:"fingerprint,omitempty"` - - // Id: [Output Only] The unique identifier for the resource type. The - // server generates this identifier. - Id uint64 `json:"id,omitempty,string"` +// ShieldedInstanceIdentity: A Shielded Instance Identity. +type ShieldedInstanceIdentity struct { + // EncryptionKey: An Endorsement Key (EK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. + EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` // Kind: [Output Only] Type of the resource. Always - // compute#targetGrpcProxy for target grpc proxies. + // compute#shieldedInstanceIdentity for shielded Instance identity + // entry. Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SelfLinkWithId: [Output Only] Server-defined URL with id for the - // resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // UrlMap: URL to the UrlMap resource that defines the mapping from URL - // to the BackendService. The protocol field in the BackendService must - // be set to GRPC. - UrlMap string `json:"urlMap,omitempty"` - - // ValidateForProxyless: If true, indicates that the BackendServices - // referenced by the urlMap may be accessed by gRPC applications without - // using a sidecar proxy. This will enable configuration checks on - // urlMap and its referenced BackendServices to not allow unsupported - // features. A gRPC application must use "xds:///" scheme in the target - // URI of the service it is connecting to. If false, indicates that the - // BackendServices referenced by the urlMap will be accessed by gRPC - // applications via a sidecar proxy. In this case, a gRPC application - // must not use "xds:///" scheme in the target URI of the service it is - // connecting to - ValidateForProxyless bool `json:"validateForProxyless,omitempty"` + // SigningKey: An Attestation Key (AK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. + SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "EncryptionKey") 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "EncryptionKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetGrpcProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxy +func (s *ShieldedInstanceIdentity) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIdentity raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetGrpcProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetGrpcProxy resources. - Items []*TargetGrpcProxy `json:"items,omitempty"` - - // Kind: [Output Only] Type of the resource. Always - // compute#targetGrpcProxy for target grpc proxies. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *TargetGrpcProxyListWarning `json:"warning,omitempty"` +// ShieldedInstanceIdentityEntry: A Shielded Instance Identity Entry. +type ShieldedInstanceIdentityEntry struct { + // EkCert: A PEM-encoded X.509 certificate. This field can be empty. + EkCert string `json:"ekCert,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // EkPub: A PEM-encoded public key. + EkPub string `json:"ekPub,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "EkCert") 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 @@ -52850,7 +50765,7 @@ type TargetGrpcProxyList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "EkCert") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -52859,89 +50774,100 @@ type TargetGrpcProxyList struct { NullFields []string `json:"-"` } -func (s *TargetGrpcProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyList +func (s *ShieldedInstanceIdentityEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIdentityEntry raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetGrpcProxyListWarning: [Output Only] Informational warning -// message. -type TargetGrpcProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` +// ShieldedInstanceIntegrityPolicy: The policy describes the baseline +// against which Instance boot integrity is measured. +type ShieldedInstanceIntegrityPolicy struct { + // UpdateAutoLearnPolicy: Updates the integrity policy baseline using + // the measurements from the VM instance's most recent boot. + UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*TargetGrpcProxyListWarningData `json:"data,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "UpdateAutoLearnPolicy") 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:"-"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // ForceSendFields is a list of field names (e.g. "Code") to +func (s *ShieldedInstanceIntegrityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceIntegrityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedVmConfig: A set of Shielded VM options. +type ShieldedVmConfig struct { + // EnableIntegrityMonitoring: Defines whether the instance has integrity + // monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + + // EnableSecureBoot: Defines whether the instance has Secure Boot + // enabled. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` + + // EnableVtpm: Defines whether the instance has the vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") 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. + // "EnableIntegrityMonitoring") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedVmConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedVmConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedVmIdentity: A Shielded VM Identity. +type ShieldedVmIdentity struct { + // EncryptionKey: An Endorsement Key (EK) issued to the Shielded VM's + // vTPM. + EncryptionKey *ShieldedVmIdentityEntry `json:"encryptionKey,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#shieldedVmIdentity for shielded VM identity entry. + Kind string `json:"kind,omitempty"` + + // SigningKey: An Attestation Key (AK) issued to the Shielded VM's vTPM. + SigningKey *ShieldedVmIdentityEntry `json:"signingKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EncryptionKey") 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 @@ -52949,7 +50875,38 @@ type TargetGrpcProxyListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "EncryptionKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedVmIdentity) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedVmIdentity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ShieldedVmIdentityEntry: A Shielded Instance Identity Entry. +type ShieldedVmIdentityEntry struct { + // EkCert: A PEM-encoded X.509 certificate. This field can be empty. + EkCert string `json:"ekCert,omitempty"` + + // EkPub: A PEM-encoded public key. + EkPub string `json:"ekPub,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EkCert") 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. "EkCert") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -52958,27 +50915,60 @@ type TargetGrpcProxyListWarning struct { NullFields []string `json:"-"` } -func (s *TargetGrpcProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyListWarning +func (s *ShieldedVmIdentityEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedVmIdentityEntry raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetGrpcProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +// ShieldedVmIntegrityPolicy: The policy describes the baseline against +// which VM instance boot integrity is measured. +type ShieldedVmIntegrityPolicy struct { + // UpdateAutoLearnPolicy: Updates the integrity policy baseline using + // the measurements from the VM instance's most recent boot. + UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "UpdateAutoLearnPolicy") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Key") to + // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedVmIntegrityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedVmIntegrityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SignedUrlKey: Represents a customer-supplied Signing Key used by +// Cloud CDN Signed URLs +type SignedUrlKey struct { + // KeyName: Name of the key. The name must be 1-63 characters long, and + // comply with RFC1035. Specifically, the name must be 1-63 characters + // long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` + // which means the first character must be a lowercase letter, and all + // following characters must be a dash, lowercase letter, or digit, + // except the last character, which cannot be a dash. + KeyName string `json:"keyName,omitempty"` + + // KeyValue: 128-bit key value used for signing the URL. The key value + // must be a valid RFC 4648 Section 5 base64url encoded string. + KeyValue string `json:"keyValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KeyName") 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 @@ -52986,8 +50976,8 @@ type TargetGrpcProxyListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "KeyName") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -52995,48 +50985,288 @@ type TargetGrpcProxyListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetGrpcProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyListWarningData +func (s *SignedUrlKey) MarshalJSON() ([]byte, error) { + type NoMethod SignedUrlKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpProxiesScopedList struct { - // TargetHttpProxies: A list of TargetHttpProxies contained in this - // scope. - TargetHttpProxies []*TargetHttpProxy `json:"targetHttpProxies,omitempty"` +// Snapshot: Represents a Persistent Disk Snapshot resource. You can use +// snapshots to back up data on a regular interval. For more +// information, read Creating persistent disk snapshots. +type Snapshot struct { + // Architecture: [Output Only] The architecture of the snapshot. Valid + // values are ARM64 or X86_64. + // + // Possible values: + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture + // is not set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` - // Warning: Informational warning which replaces the list of backend - // services when the list is empty. - Warning *TargetHttpProxiesScopedListWarning `json:"warning,omitempty"` + // AutoCreated: [Output Only] Set to true if snapshots are automatically + // created by applying resource policy on the target disk. + AutoCreated bool `json:"autoCreated,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetHttpProxies") - // to unconditionally include in API requests. By default, fields with + // ChainName: Creates the new snapshot in the snapshot chain labeled + // with the specified name. The chain name must be 1-63 characters long + // and comply with RFC1035. This is an uncommon option only for advanced + // service owners who needs to create separate snapshot chains, for + // example, for chargeback tracking. When you describe your snapshot + // resource, this field is visible only if it has a non-empty value. + ChainName string `json:"chainName,omitempty"` + + // CreationSizeBytes: [Output Only] Size in bytes of the snapshot at + // creation time. + CreationSizeBytes int64 `json:"creationSizeBytes,omitempty,string"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // DownloadBytes: [Output Only] Number of bytes downloaded to restore a + // snapshot to a disk. + DownloadBytes int64 `json:"downloadBytes,omitempty,string"` + + // GuestFlush: [Input Only] Whether to attempt an application consistent + // snapshot by informing the OS to prepare for the snapshot process. + GuestFlush bool `json:"guestFlush,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always compute#snapshot for + // Snapshot resources. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // snapshot, which is essentially a hash of the labels set used for + // optimistic locking. The fingerprint is initially generated by Compute + // Engine and changes after every request to modify or update labels. + // You must always provide an up-to-date fingerprint hash in order to + // update or change labels, otherwise the request will fail with error + // 412 conditionNotMet. To see the latest fingerprint, make a get() + // request to retrieve a snapshot. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels to apply to this snapshot. These can be later modified + // by the setLabels method. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // LicenseCodes: [Output Only] Integer license codes indicating which + // licenses are attached to this snapshot. + LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` + + // Licenses: [Output Only] A list of public visible licenses that apply + // to this snapshot. This can be because the original image had licenses + // attached (such as a Windows image). + Licenses []string `json:"licenses,omitempty"` + + // LocationHint: An opaque location hint used to place the snapshot + // close to other resources. This field is for use by internal tools + // that use the public API. + LocationHint string `json:"locationHint,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SnapshotEncryptionKey: Encrypts the snapshot using a + // customer-supplied encryption key. After you encrypt a snapshot using + // a customer-supplied key, you must provide the same key if you use the + // snapshot later. For example, you must provide the encryption key when + // you create a disk from the encrypted snapshot in a future request. + // Customer-supplied encryption keys do not protect access to metadata + // of the snapshot. If you do not provide an encryption key when + // creating the snapshot, then the snapshot will be encrypted using an + // automatically generated key and you do not need to provide a key to + // use the snapshot later. + SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` + + // SnapshotType: Indicates the type of the snapshot. + // + // Possible values: + // "ARCHIVE" + // "STANDARD" + SnapshotType string `json:"snapshotType,omitempty"` + + // SourceDisk: The source disk used to create this snapshot. + SourceDisk string `json:"sourceDisk,omitempty"` + + // SourceDiskEncryptionKey: The customer-supplied encryption key of the + // source disk. Required if the source disk is protected by a + // customer-supplied encryption key. + SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` + + // SourceDiskId: [Output Only] The ID value of the disk used to create + // this snapshot. This value may be used to determine whether the + // snapshot was taken from the current or a previous instance of a given + // disk name. + SourceDiskId string `json:"sourceDiskId,omitempty"` + + // SourceInstantSnapshot: The source instant snapshot used to create + // this snapshot. You can provide this as a partial or full URL to the + // resource. For example, the following are valid values: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /instantSnapshots/instantSnapshot - + // projects/project/zones/zone/instantSnapshots/instantSnapshot - + // zones/zone/instantSnapshots/instantSnapshot + SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` + + // SourceInstantSnapshotId: [Output Only] The unique ID of the instant + // snapshot used to create this snapshot. This value identifies the + // exact instant snapshot that was used to create this persistent disk. + // For example, if you created the persistent disk from an instant + // snapshot that was later deleted and recreated under the same name, + // the source instant snapshot ID would identify the exact instant + // snapshot that was used. + SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` + + // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource + // policy which created this scheduled snapshot. + SourceSnapshotSchedulePolicy string `json:"sourceSnapshotSchedulePolicy,omitempty"` + + // SourceSnapshotSchedulePolicyId: [Output Only] ID of the resource + // policy which created this scheduled snapshot. + SourceSnapshotSchedulePolicyId string `json:"sourceSnapshotSchedulePolicyId,omitempty"` + + // Status: [Output Only] The status of the snapshot. This can be + // CREATING, DELETING, FAILED, READY, or UPLOADING. + // + // Possible values: + // "CREATING" - Snapshot creation is in progress. + // "DELETING" - Snapshot is currently being deleted. + // "FAILED" - Snapshot creation failed. + // "READY" - Snapshot has been created successfully. + // "UPLOADING" - Snapshot is being uploaded. + Status string `json:"status,omitempty"` + + // StorageBytes: [Output Only] A size of the storage used by the + // snapshot. As snapshots share storage, this number is expected to + // change with snapshot creation/deletion. + StorageBytes int64 `json:"storageBytes,omitempty,string"` + + // StorageBytesStatus: [Output Only] An indicator whether storageBytes + // is in a stable state or it is being adjusted as a result of shared + // storage reallocation. This status can either be UPDATING, meaning the + // size of the snapshot is being updated, or UP_TO_DATE, meaning the + // size of the snapshot is up-to-date. + // + // Possible values: + // "UPDATING" + // "UP_TO_DATE" + StorageBytesStatus string `json:"storageBytesStatus,omitempty"` + + // StorageLocations: Cloud Storage bucket storage location of the + // snapshot (regional or multi-regional). + StorageLocations []string `json:"storageLocations,omitempty"` + + // UserLicenses: [Output Only] A list of user provided licenses + // represented by a list of URLs to the license resource. + UserLicenses []string `json:"userLicenses,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Architecture") 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. "TargetHttpProxies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Architecture") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetHttpProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedList +func (s *Snapshot) MarshalJSON() ([]byte, error) { + type NoMethod Snapshot raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxiesScopedListWarning: Informational warning which -// replaces the list of backend services when the list is empty. -type TargetHttpProxiesScopedListWarning struct { +// SnapshotList: Contains a list of Snapshot resources. +type SnapshotList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of Snapshot resources. + Items []*Snapshot `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *SnapshotListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SnapshotList) MarshalJSON() ([]byte, error) { + type NoMethod SnapshotList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SnapshotListWarning: [Output Only] Informational warning message. +type SnapshotListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -53104,7 +51334,7 @@ type TargetHttpProxiesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetHttpProxiesScopedListWarningData `json:"data,omitempty"` + Data []*SnapshotListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -53127,13 +51357,13 @@ type TargetHttpProxiesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedListWarning +func (s *SnapshotListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SnapshotListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpProxiesScopedListWarningData struct { +type SnapshotListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -53164,23 +51394,220 @@ type TargetHttpProxiesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedListWarningData +func (s *SnapshotListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SnapshotListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxy: Represents a Target HTTP Proxy resource. Google -// Compute Engine has two Target HTTP Proxy resources: * Global -// (/compute/docs/reference/rest/beta/targetHttpProxies) * Regional -// (/compute/docs/reference/rest/beta/regionTargetHttpProxies) A target -// HTTP proxy is a component of GCP HTTP load balancers. * -// targetHttpProxies are used by external HTTP load balancers and -// Traffic Director. * regionTargetHttpProxies are used by internal HTTP -// load balancers. Forwarding rules reference a target HTTP proxy, and -// the target proxy then references a URL map. For more information, -// read Using Target Proxies and Forwarding rule concepts. -type TargetHttpProxy struct { +type SourceDiskEncryptionKey struct { + // DiskEncryptionKey: The customer-supplied encryption key of the source + // disk. Required if the source disk is protected by a customer-supplied + // encryption key. + DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` + + // SourceDisk: URL of the disk attached to the source instance. This can + // be a full or valid partial URL. For example, the following are valid + // values: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /disks/disk - projects/project/zones/zone/disks/disk - + // zones/zone/disks/disk + SourceDisk string `json:"sourceDisk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") + // 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. "DiskEncryptionKey") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SourceDiskEncryptionKey) MarshalJSON() ([]byte, error) { + type NoMethod SourceDiskEncryptionKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SourceInstanceParams: A specification of the parameters to use when +// creating the instance template from a source instance. +type SourceInstanceParams struct { + // DiskConfigs: Attached disks configuration. If not provided, defaults + // are applied: For boot disk and any other R/W disks, the source images + // for each disk will be used. For read-only disks, they will be + // attached in read-only mode. Local SSD disks will be created as blank + // volumes. + DiskConfigs []*DiskInstantiationConfig `json:"diskConfigs,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskConfigs") 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. "DiskConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SourceInstanceParams) MarshalJSON() ([]byte, error) { + type NoMethod SourceInstanceParams + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SourceInstanceProperties: DEPRECATED: Please use +// compute#instanceProperties instead. New properties will not be added +// to this field. +type SourceInstanceProperties struct { + // CanIpForward: Enables instances created based on this machine image + // to send packets with source IP addresses other than their own and + // receive packets with destination IP addresses other than their own. + // If these instances will be used as an IP gateway or it will be set as + // the next-hop in a Route resource, specify true. If unsure, leave this + // set to false. See the Enable IP forwarding documentation for more + // information. + CanIpForward bool `json:"canIpForward,omitempty"` + + // DeletionProtection: Whether the instance created from this machine + // image should be protected against deletion. + DeletionProtection bool `json:"deletionProtection,omitempty"` + + // Description: An optional text description for the instances that are + // created from this machine image. + Description string `json:"description,omitempty"` + + // Disks: An array of disks that are associated with the instances that + // are created from this machine image. + Disks []*SavedAttachedDisk `json:"disks,omitempty"` + + // GuestAccelerators: A list of guest accelerator cards' type and count + // to use for instances created from this machine image. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + + // KeyRevocationActionType: KeyRevocationActionType of the instance. + // Supported options are "STOP" and "NONE". The default value is "NONE" + // if it is not specified. + // + // Possible values: + // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This + // value is unused. + // "NONE" - Indicates user chose no operation. + // "STOP" - Indicates user chose to opt for VM shutdown on key + // revocation. + KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` + + // Labels: Labels to apply to instances that are created from this + // machine image. + Labels map[string]string `json:"labels,omitempty"` + + // MachineType: The machine type to use for instances that are created + // from this machine image. + MachineType string `json:"machineType,omitempty"` + + // Metadata: The metadata key/value pairs to assign to instances that + // are created from this machine image. These pairs can consist of + // custom metadata or predefined keys. See Project and instance metadata + // for more information. + Metadata *Metadata `json:"metadata,omitempty"` + + // MinCpuPlatform: Minimum cpu/platform to be used by instances created + // from this machine image. The instance may be scheduled on the + // specified or newer cpu/platform. Applicable values are the friendly + // names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or + // minCpuPlatform: "Intel Sandy Bridge". For more information, read + // Specifying a Minimum CPU Platform. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` + + // NetworkInterfaces: An array of network access configurations for this + // interface. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + + // PostKeyRevocationActionType: PostKeyRevocationActionType of the + // instance. + // + // Possible values: + // "NOOP" - Indicates user chose no operation. + // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This + // value is unused. + // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key + // revocation. + PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` + + // Scheduling: Specifies the scheduling options for the instances that + // are created from this machine image. + Scheduling *Scheduling `json:"scheduling,omitempty"` + + // ServiceAccounts: A list of service accounts with specified scopes. + // Access tokens for these service accounts are available to the + // instances that are created from this machine image. Use metadata + // queries to obtain the access tokens for these instances. + ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + + // Tags: A list of tags to apply to the instances that are created from + // this machine image. The tags identify valid sources or targets for + // network firewalls. The setTags method can modify this list of tags. + // Each tag within the list must comply with RFC1035. + Tags *Tags `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanIpForward") 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. "CanIpForward") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SourceInstanceProperties) MarshalJSON() ([]byte, error) { + type NoMethod SourceInstanceProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslCertificate: Represents an SSL Certificate resource. Google +// Compute Engine has two SSL Certificate resources: * Global +// (/compute/docs/reference/rest/beta/sslCertificates) * Regional +// (/compute/docs/reference/rest/beta/regionSslCertificates) The +// sslCertificates are used by: - external HTTPS load balancers - SSL +// proxy load balancers The regionSslCertificates are used by internal +// HTTPS load balancers. Optionally, certificate file contents that you +// upload can contain a set of up to five PEM-encoded certificates. The +// API call creates an object (sslCertificate) that holds this data. You +// can use SSL keys and certificates to secure connections to a load +// balancer. For more information, read Creating and using SSL +// certificates, SSL certificates quotas and limits, and Troubleshooting +// SSL certificates. +type SslCertificate struct { + // Certificate: A value read into memory from a certificate file. The + // certificate file must be in PEM format. The certificate chain must be + // no greater than 5 certs long. The chain must include at least one + // intermediate cert. + Certificate string `json:"certificate,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -53189,38 +51616,20 @@ type TargetHttpProxy struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a TargetHttpProxy. An up-to-date - // fingerprint must be provided in order to patch/update the - // TargetHttpProxy; otherwise, the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve the TargetHttpProxy. - Fingerprint string `json:"fingerprint,omitempty"` - - // HttpFilters: URLs to networkservices.HttpFilter resources enabled for - // xDS clients using this configuration. For example, - // https://networkservices.googleapis.com/v1alpha1/projects/project/locations/ - // locationhttpFilters/httpFilter Only filters that handle outbound - // connection and stream events may be specified. These filters work in - // conjunction with a default set of HTTP filters that may already be - // configured by Traffic Director. Traffic Director will determine the - // final location of these filters within xDS configuration based on the - // name of the HTTP filter. If Traffic Director positions multiple - // filters at the same location, those filters will be in the same order - // as specified in this list. httpFilters only applies for loadbalancers - // with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See - // ForwardingRule for more details. - HttpFilters []string `json:"httpFilters,omitempty"` + // ExpireTime: [Output Only] Expire time of the certificate. RFC3339 + ExpireTime string `json:"expireTime,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#targetHttpProxy - // for target HTTP proxies. + // Kind: [Output Only] Type of the resource. Always + // compute#sslCertificate for SSL certificates. Kind string `json:"kind,omitempty"` + // Managed: Configuration and status of a managed SSL certificate. + Managed *SslCertificateManagedSslCertificate `json:"managed,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -53230,68 +51639,74 @@ type TargetHttpProxy struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // ProxyBind: This field only applies when the forwarding rule that - // references this target proxy has a loadBalancingScheme set to - // INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies - // set up inbound traffic interception and bind to the IP address and - // port specified in the forwarding rule. This is generally useful when - // using Traffic Director to configure Envoy as a gateway or middle - // proxy (in other words, not a sidecar proxy). The Envoy proxy listens - // for inbound requests and handles requests when it receives them. The - // default is false. - ProxyBind bool `json:"proxyBind,omitempty"` + // PrivateKey: A value read into memory from a write-only private key + // file. The private key file must be in PEM format. For security, only + // insert requests include this field. + PrivateKey string `json:"privateKey,omitempty"` - // Region: [Output Only] URL of the region where the regional Target - // HTTP Proxy resides. This field is not applicable to global Target - // HTTP Proxies. + // Region: [Output Only] URL of the region where the regional SSL + // Certificate resides. This field is not applicable to global SSL + // Certificate. Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. + // SelfLink: [Output only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // UrlMap: URL to the UrlMap resource that defines the mapping from URL - // to the BackendService. - UrlMap string `json:"urlMap,omitempty"` + // SelfManaged: Configuration and status of a self-managed SSL + // certificate. + SelfManaged *SslCertificateSelfManagedSslCertificate `json:"selfManaged,omitempty"` + + // SubjectAlternativeNames: [Output Only] Domains associated with the + // certificate via Subject Alternative Name. + SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty"` + + // Type: (Optional) Specifies the type of SSL certificate, either + // "SELF_MANAGED" or "MANAGED". If not specified, the certificate is + // self-managed and the fields certificate and private_key are used. + // + // Possible values: + // "MANAGED" - Google-managed SSLCertificate. + // "SELF_MANAGED" - Certificate uploaded by user. + // "TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Certificate") 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Certificate") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxy +func (s *SslCertificate) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificate raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpProxyAggregatedList struct { +type SslCertificateAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetHttpProxiesScopedList resources. - Items map[string]TargetHttpProxiesScopedList `json:"items,omitempty"` + // Items: A list of SslCertificatesScopedList resources. + Items map[string]SslCertificatesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always - // compute#targetHttpProxyAggregatedList for lists of Target HTTP - // Proxies. + // compute#sslCertificateAggregatedList for lists of SSL Certificates. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -53309,7 +51724,7 @@ type TargetHttpProxyAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetHttpProxyAggregatedListWarning `json:"warning,omitempty"` + Warning *SslCertificateAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -53332,15 +51747,15 @@ type TargetHttpProxyAggregatedList struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedList +func (s *SslCertificateAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxyAggregatedListWarning: [Output Only] Informational +// SslCertificateAggregatedListWarning: [Output Only] Informational // warning message. -type TargetHttpProxyAggregatedListWarning struct { +type SslCertificateAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -53408,7 +51823,7 @@ type TargetHttpProxyAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetHttpProxyAggregatedListWarningData `json:"data,omitempty"` + Data []*SslCertificateAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -53431,13 +51846,13 @@ type TargetHttpProxyAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedListWarning +func (s *SslCertificateAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpProxyAggregatedListWarningData struct { +type SslCertificateAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -53468,23 +51883,22 @@ type TargetHttpProxyAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedListWarningData +func (s *SslCertificateAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxyList: A list of TargetHttpProxy resources. -type TargetHttpProxyList struct { +// SslCertificateList: Contains a list of SslCertificate resources. +type SslCertificateList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetHttpProxy resources. - Items []*TargetHttpProxy `json:"items,omitempty"` + // Items: A list of SslCertificate resources. + Items []*SslCertificate `json:"items,omitempty"` - // Kind: Type of resource. Always compute#targetHttpProxyList for lists - // of target HTTP proxies. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -53499,7 +51913,7 @@ type TargetHttpProxyList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetHttpProxyListWarning `json:"warning,omitempty"` + Warning *SslCertificateListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -53522,15 +51936,15 @@ type TargetHttpProxyList struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyList +func (s *SslCertificateList) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxyListWarning: [Output Only] Informational warning +// SslCertificateListWarning: [Output Only] Informational warning // message. -type TargetHttpProxyListWarning struct { +type SslCertificateListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -53598,7 +52012,7 @@ type TargetHttpProxyListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetHttpProxyListWarningData `json:"data,omitempty"` + Data []*SslCertificateListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -53621,13 +52035,13 @@ type TargetHttpProxyListWarning struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyListWarning +func (s *SslCertificateListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpProxyListWarningData struct { +type SslCertificateListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -53658,30 +52072,124 @@ type TargetHttpProxyListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetHttpProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyListWarningData +func (s *SslCertificateListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpsProxiesScopedList struct { - // TargetHttpsProxies: A list of TargetHttpsProxies contained in this - // scope. - TargetHttpsProxies []*TargetHttpsProxy `json:"targetHttpsProxies,omitempty"` +// SslCertificateManagedSslCertificate: Configuration and status of a +// managed SSL certificate. +type SslCertificateManagedSslCertificate struct { + // DomainStatus: [Output only] Detailed statuses of the domains + // specified for managed certificate resource. + DomainStatus map[string]string `json:"domainStatus,omitempty"` + + // Domains: The domains for which a managed SSL certificate will be + // generated. Each Google-managed SSL certificate supports up to the + // maximum number of domains per Google-managed SSL certificate + // (/load-balancing/docs/quotas#ssl_certificates). + Domains []string `json:"domains,omitempty"` + + // Status: [Output only] Status of the managed certificate resource. + // + // Possible values: + // "ACTIVE" - The certificate management is working, and a certificate + // has been provisioned. + // "MANAGED_CERTIFICATE_STATUS_UNSPECIFIED" + // "PROVISIONING" - The certificate management is working. GCP will + // attempt to provision the first certificate. + // "PROVISIONING_FAILED" - Certificate provisioning failed due to an + // issue with the DNS or load balancing configuration. For details of + // which domain failed, consult domain_status field. + // "PROVISIONING_FAILED_PERMANENTLY" - Certificate provisioning failed + // due to an issue with the DNS or load balancing configuration. It + // won't be retried. To try again delete and create a new managed + // SslCertificate resource. For details of which domain failed, consult + // domain_status field. + // "RENEWAL_FAILED" - Renewal of the certificate has failed due to an + // issue with the DNS or load balancing configuration. The existing cert + // is still serving; however, it will expire shortly. To provision a + // renewed certificate, delete and create a new managed SslCertificate + // resource. For details on which domain failed, consult domain_status + // field. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DomainStatus") 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. "DomainStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificateManagedSslCertificate) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateManagedSslCertificate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslCertificateSelfManagedSslCertificate: Configuration and status of +// a self-managed SSL certificate. +type SslCertificateSelfManagedSslCertificate struct { + // Certificate: A local certificate file. The certificate must be in PEM + // format. The certificate chain must be no greater than 5 certs long. + // The chain must include at least one intermediate cert. + Certificate string `json:"certificate,omitempty"` + + // PrivateKey: A write-only private key in PEM format. Only insert + // requests will include this field. + PrivateKey string `json:"privateKey,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Certificate") 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. "Certificate") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificateSelfManagedSslCertificate) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateSelfManagedSslCertificate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SslCertificatesScopedList struct { + // SslCertificates: List of SslCertificates contained in this scope. + SslCertificates []*SslCertificate `json:"sslCertificates,omitempty"` // Warning: Informational warning which replaces the list of backend // services when the list is empty. - Warning *TargetHttpsProxiesScopedListWarning `json:"warning,omitempty"` + Warning *SslCertificatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetHttpsProxies") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "SslCertificates") 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. "TargetHttpsProxies") to + // NullFields is a list of field names (e.g. "SslCertificates") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -53691,15 +52199,15 @@ type TargetHttpsProxiesScopedList struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedList +func (s *SslCertificatesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificatesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxiesScopedListWarning: Informational warning which +// SslCertificatesScopedListWarning: Informational warning which // replaces the list of backend services when the list is empty. -type TargetHttpsProxiesScopedListWarning struct { +type SslCertificatesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -53767,7 +52275,7 @@ type TargetHttpsProxiesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetHttpsProxiesScopedListWarningData `json:"data,omitempty"` + Data []*SslCertificatesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -53790,13 +52298,13 @@ type TargetHttpsProxiesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedListWarning +func (s *SslCertificatesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificatesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpsProxiesScopedListWarningData struct { +type SslCertificatesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -53827,300 +52335,24 @@ type TargetHttpsProxiesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetCertificateMapRequest struct { - // CertificateMap: URL of the Certificate Map to associate with this - // TargetHttpsProxy. Accepted format is - // //certificatemanager.googleapis.com/projects/{project - // }/locations/{location}/certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CertificateMap") 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. "CertificateMap") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetCertificateMapRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetQuicOverrideRequest struct { - // QuicOverride: QUIC policy for the TargetHttpsProxy resource. - // - // Possible values: - // "DISABLE" - The load balancer will not attempt to negotiate QUIC - // with clients. - // "ENABLE" - The load balancer will attempt to negotiate QUIC with - // clients. - // "NONE" - No overrides to the default QUIC policy. This option is - // implicit if no QUIC override has been specified in the request. - QuicOverride string `json:"quicOverride,omitempty"` - - // ForceSendFields is a list of field names (e.g. "QuicOverride") 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. "QuicOverride") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxiesSetQuicOverrideRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetQuicOverrideRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. At least one SSL certificate - // must be specified. Currently, you may specify up to 15 SSL - // certificates. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SslCertificates") 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. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetSslCertificatesRequest +func (s *SslCertificatesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificatesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxy: Represents a Target HTTPS Proxy resource. Google -// Compute Engine has two Target HTTPS Proxy resources: * Global -// (/compute/docs/reference/rest/beta/targetHttpsProxies) * Regional -// (/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target -// HTTPS proxy is a component of GCP HTTPS load balancers. * -// targetHttpsProxies are used by external HTTPS load balancers. * -// regionTargetHttpsProxies are used by internal HTTPS load balancers. -// Forwarding rules reference a target HTTPS proxy, and the target proxy -// then references a URL map. For more information, read Using Target -// Proxies and Forwarding rule concepts. -type TargetHttpsProxy struct { - // Authentication: [Deprecated] Use serverTlsPolicy instead. - Authentication string `json:"authentication,omitempty"` - - // Authorization: [Deprecated] Use authorizationPolicy instead. - Authorization string `json:"authorization,omitempty"` - - // AuthorizationPolicy: Optional. A URL referring to a - // networksecurity.AuthorizationPolicy resource that describes how the - // proxy should authorize inbound traffic. If left blank, access will - // not be restricted by an authorization policy. Refer to the - // AuthorizationPolicy resource for additional details. - // authorizationPolicy only applies to a global TargetHttpsProxy - // attached to globalForwardingRules with the loadBalancingScheme set to - // INTERNAL_SELF_MANAGED. Note: This field currently has no impact. - AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` - - // CertificateMap: URL of a certificate map that identifies a - // certificate map associated with the given target proxy. This field - // can only be set for global target proxies. If set, sslCertificates - // will be ignored. Accepted format is - // //certificatemanager.googleapis.com/projects/{project - // }/locations/{location}/certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a TargetHttpsProxy. An - // up-to-date fingerprint must be provided in order to patch the - // TargetHttpsProxy; otherwise, the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve the TargetHttpsProxy. - Fingerprint string `json:"fingerprint,omitempty"` - - // HttpFilters: URLs to networkservices.HttpFilter resources enabled for - // xDS clients using this configuration. For example, - // https://networkservices.googleapis.com/beta/projects/project/locations/ - // locationhttpFilters/httpFilter Only filters that handle outbound - // connection and stream events may be specified. These filters work in - // conjunction with a default set of HTTP filters that may already be - // configured by Traffic Director. Traffic Director will determine the - // final location of these filters within xDS configuration based on the - // name of the HTTP filter. If Traffic Director positions multiple - // filters at the same location, those filters will be in the same order - // as specified in this list. httpFilters only applies for loadbalancers - // with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See - // ForwardingRule for more details. - HttpFilters []string `json:"httpFilters,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy - // for target HTTPS proxies. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // ProxyBind: This field only applies when the forwarding rule that - // references this target proxy has a loadBalancingScheme set to - // INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies - // set up inbound traffic interception and bind to the IP address and - // port specified in the forwarding rule. This is generally useful when - // using Traffic Director to configure Envoy as a gateway or middle - // proxy (in other words, not a sidecar proxy). The Envoy proxy listens - // for inbound requests and handles requests when it receives them. The - // default is false. - ProxyBind bool `json:"proxyBind,omitempty"` - - // QuicOverride: Specifies the QUIC override policy for this - // TargetHttpsProxy resource. This setting determines whether the load - // balancer attempts to negotiate QUIC with clients. You can specify - // NONE, ENABLE, or DISABLE. - When quic-override is set to NONE, Google - // manages whether QUIC is used. - When quic-override is set to ENABLE, - // the load balancer uses QUIC when possible. - When quic-override is - // set to DISABLE, the load balancer doesn't use QUIC. - If the - // quic-override flag is not specified, NONE is implied. - // - // Possible values: - // "DISABLE" - The load balancer will not attempt to negotiate QUIC - // with clients. - // "ENABLE" - The load balancer will attempt to negotiate QUIC with - // clients. - // "NONE" - No overrides to the default QUIC policy. This option is - // implicit if no QUIC override has been specified in the request. - QuicOverride string `json:"quicOverride,omitempty"` - - // Region: [Output Only] URL of the region where the regional - // TargetHttpsProxy resides. This field is not applicable to global - // TargetHttpsProxies. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerTlsPolicy: Optional. A URL referring to a - // networksecurity.ServerTlsPolicy resource that describes how the proxy - // should authenticate inbound traffic. serverTlsPolicy only applies to - // a global TargetHttpsProxy attached to globalForwardingRules with the - // loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL or - // EXTERNAL_MANAGED. For details which ServerTlsPolicy resources are - // accepted with INTERNAL_SELF_MANAGED and which with EXTERNAL, - // EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy - // documentation. If left blank, communications are not encrypted. - ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` - - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections between users and the load balancer. At - // least one SSL certificate must be specified. Currently, you may - // specify up to 15 SSL certificates. sslCertificates do not apply when - // the load balancing scheme is set to INTERNAL_SELF_MANAGED. - SslCertificates []string `json:"sslCertificates,omitempty"` - - // SslPolicy: URL of SslPolicy resource that will be associated with the - // TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource - // has no SSL policy configured. - SslPolicy string `json:"sslPolicy,omitempty"` - - // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource - // that defines the mapping from URL to the BackendService. For example, - // the following are all valid URLs for specifying a URL map: - - // https://www.googleapis.compute/v1/projects/project/global/urlMaps/ - // url-map - projects/project/global/urlMaps/url-map - - // global/urlMaps/url-map - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Authentication") 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. "Authentication") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxy - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +type SslPoliciesAggregatedList struct { + Etag string `json:"etag,omitempty"` -type TargetHttpsProxyAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetHttpsProxiesScopedList resources. - Items map[string]TargetHttpsProxiesScopedList `json:"items,omitempty"` + // Items: A list of SslPoliciesScopedList resources. + Items map[string]SslPoliciesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always - // compute#targetHttpsProxyAggregatedList for lists of Target HTTP - // Proxies. + // compute#sslPolicyAggregatedList for lists of SSL Policies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -54138,13 +52370,13 @@ type TargetHttpsProxyAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetHttpsProxyAggregatedListWarning `json:"warning,omitempty"` + Warning *SslPoliciesAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -54152,7 +52384,7 @@ type TargetHttpsProxyAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Etag") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -54161,15 +52393,15 @@ type TargetHttpsProxyAggregatedList struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedList +func (s *SslPoliciesAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxyAggregatedListWarning: [Output Only] Informational -// warning message. -type TargetHttpsProxyAggregatedListWarning struct { +// SslPoliciesAggregatedListWarning: [Output Only] Informational warning +// message. +type SslPoliciesAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -54237,7 +52469,7 @@ type TargetHttpsProxyAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetHttpsProxyAggregatedListWarningData `json:"data,omitempty"` + Data []*SslPoliciesAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -54260,13 +52492,13 @@ type TargetHttpsProxyAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedListWarning +func (s *SslPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpsProxyAggregatedListWarningData struct { +type SslPoliciesAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -54297,23 +52529,22 @@ type TargetHttpsProxyAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedListWarningData +func (s *SslPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. -type TargetHttpsProxyList struct { +type SslPoliciesList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetHttpsProxy resources. - Items []*TargetHttpsProxy `json:"items,omitempty"` + // Items: A list of SslPolicy resources. + Items []*SslPolicy `json:"items,omitempty"` - // Kind: Type of resource. Always compute#targetHttpsProxyList for lists - // of target HTTPS proxies. + // Kind: [Output Only] Type of the resource. Always + // compute#sslPoliciesList for lists of sslPolicies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -54328,7 +52559,7 @@ type TargetHttpsProxyList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetHttpsProxyListWarning `json:"warning,omitempty"` + Warning *SslPoliciesListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -54351,15 +52582,14 @@ type TargetHttpsProxyList struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyList +func (s *SslPoliciesList) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxyListWarning: [Output Only] Informational warning -// message. -type TargetHttpsProxyListWarning struct { +// SslPoliciesListWarning: [Output Only] Informational warning message. +type SslPoliciesListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -54427,7 +52657,7 @@ type TargetHttpsProxyListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetHttpsProxyListWarningData `json:"data,omitempty"` + Data []*SslPoliciesListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -54450,13 +52680,13 @@ type TargetHttpsProxyListWarning struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyListWarning +func (s *SslPoliciesListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetHttpsProxyListWarningData struct { +type SslPoliciesListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -54487,134 +52717,51 @@ type TargetHttpsProxyListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyListWarningData +func (s *SslPoliciesListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstance: Represents a Target Instance resource. You can use a -// target instance to handle traffic for one or more forwarding rules, -// which is ideal for forwarding protocol traffic that is managed by a -// single source. For example, ESP, AH, TCP, or UDP. For more -// information, read Target instances. -type TargetInstance struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instance: A URL to the virtual machine instance that handles traffic - // for this target instance. When creating a target instance, you can - // provide the fully-qualified URL or a valid partial URL to the desired - // virtual machine. For example, the following are all valid URLs: - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone - // /instances/instance - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - Instance string `json:"instance,omitempty"` - - // Kind: [Output Only] The type of the resource. Always - // compute#targetInstance for target instances. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // NatPolicy: Must have a value of NO_NAT. Protocol forwarding delivers - // packets while preserving the destination IP address of the forwarding - // rule referencing the target instance. - // - // Possible values: - // "NO_NAT" - No NAT performed. - NatPolicy string `json:"natPolicy,omitempty"` - - // Network: The URL of the network this target instance uses to forward - // traffic. If not specified, the traffic will be forwarded to the - // network that the default network interface belongs to. - Network string `json:"network,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Zone: [Output Only] URL of the zone where the target instance - // resides. You must specify this field as part of the HTTP request URL. - // It is not settable as a field in the request body. - Zone string `json:"zone,omitempty"` +type SslPoliciesListAvailableFeaturesResponse struct { + Features []string `json:"features,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Features") 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. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Features") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetInstance) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstance +func (s *SslPoliciesListAvailableFeaturesResponse) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesListAvailableFeaturesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetInstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetInstance resources. - Items map[string]TargetInstancesScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *TargetInstanceAggregatedListWarning `json:"warning,omitempty"` +type SslPoliciesScopedList struct { + // SslPolicies: A list of SslPolicies contained in this scope. + SslPolicies []*SslPolicy `json:"sslPolicies,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: Informational warning which replaces the list of SSL + // policies when the list is empty. + Warning *SslPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "SslPolicies") 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 @@ -54622,24 +52769,24 @@ type TargetInstanceAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "SslPolicies") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedList +func (s *SslPoliciesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstanceAggregatedListWarning: [Output Only] Informational -// warning message. -type TargetInstanceAggregatedListWarning struct { +// SslPoliciesScopedListWarning: Informational warning which replaces +// the list of SSL policies when the list is empty. +type SslPoliciesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -54707,7 +52854,7 @@ type TargetInstanceAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetInstanceAggregatedListWarningData `json:"data,omitempty"` + Data []*SslPoliciesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -54730,13 +52877,13 @@ type TargetInstanceAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetInstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedListWarning +func (s *SslPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetInstanceAggregatedListWarningData struct { +type SslPoliciesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -54767,68 +52914,130 @@ type TargetInstanceAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetInstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedListWarningData +func (s *SslPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslPoliciesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstanceList: Contains a list of TargetInstance resources. -type TargetInstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +// SslPolicy: Represents an SSL Policy resource. Use SSL policies to +// control the SSL features, such as versions and cipher suites, offered +// by an HTTPS or SSL Proxy load balancer. For more information, read +// SSL Policy Concepts. +type SslPolicy struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Items: A list of TargetInstance resources. - Items []*TargetInstance `json:"items,omitempty"` + // CustomFeatures: A list of features enabled when the selected profile + // is CUSTOM. The method returns the set of features that can be + // specified in this list. This field must be empty if the profile is + // not CUSTOM. + CustomFeatures []string `json:"customFeatures,omitempty"` - // Kind: Type of resource. + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // EnabledFeatures: [Output Only] The list of features enabled in the + // SSL policy. + EnabledFeatures []string `json:"enabledFeatures,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a SslPolicy. An up-to-date + // fingerprint must be provided in order to update the SslPolicy, + // otherwise the request will fail with error 412 conditionNotMet. To + // see the latest fingerprint, make a get() request to retrieve an + // SslPolicy. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output only] Type of the resource. Always compute#sslPolicyfor + // SSL policies. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // MinTlsVersion: The minimum version of SSL protocol that can be used + // by the clients to establish a connection with the load balancer. This + // can be one of TLS_1_0, TLS_1_1, TLS_1_2. + // + // Possible values: + // "TLS_1_0" - TLS 1.0 + // "TLS_1_1" - TLS 1.1 + // "TLS_1_2" - TLS 1.2 + MinTlsVersion string `json:"minTlsVersion,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. + // Name: Name of the resource. The name must be 1-63 characters long, + // and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + Name string `json:"name,omitempty"` + + // Profile: Profile specifies the set of SSL features that can be used + // by the load balancer when negotiating SSL with clients. This can be + // one of COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If using CUSTOM, + // the set of SSL features to enable must be specified in the + // customFeatures field. + // + // Possible values: + // "COMPATIBLE" - Compatible profile. Allows the broadset set of + // clients, even those which support only out-of-date SSL features to + // negotiate with the load balancer. + // "CUSTOM" - Custom profile. Allow only the set of allowed SSL + // features specified in the customFeatures field. + // "MODERN" - Modern profile. Supports a wide set of SSL features, + // allowing modern clients to negotiate SSL with the load balancer. + // "RESTRICTED" - Restricted profile. Supports a reduced set of SSL + // features, intended to meet stricter compliance requirements. + Profile string `json:"profile,omitempty"` + + // Region: [Output Only] URL of the region where the regional SSL policy + // resides. This field is not applicable to global SSL policies. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetInstanceListWarning `json:"warning,omitempty"` + // Warnings: [Output Only] If potential misconfigurations are detected + // for this SSL policy, this field will be populated with warning + // messages. + Warnings []*SslPolicyWarnings `json:"warnings,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // 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. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *TargetInstanceList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceList +func (s *SslPolicy) MarshalJSON() ([]byte, error) { + type NoMethod SslPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstanceListWarning: [Output Only] Informational warning -// message. -type TargetInstanceListWarning struct { +type SslPolicyWarnings struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -54896,7 +53105,7 @@ type TargetInstanceListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetInstanceListWarningData `json:"data,omitempty"` + Data []*SslPolicyWarningsData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -54919,13 +53128,13 @@ type TargetInstanceListWarning struct { NullFields []string `json:"-"` } -func (s *TargetInstanceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceListWarning +func (s *SslPolicyWarnings) MarshalJSON() ([]byte, error) { + type NoMethod SslPolicyWarnings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetInstanceListWarningData struct { +type SslPolicyWarningsData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -54956,21 +53165,19 @@ type TargetInstanceListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetInstanceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceListWarningData +func (s *SslPolicyWarningsData) MarshalJSON() ([]byte, error) { + type NoMethod SslPolicyWarningsData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetInstancesScopedList struct { - // TargetInstances: A list of target instances contained in this scope. - TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` +type SslPolicyReference struct { + // SslPolicy: URL of the SSL policy resource. Set this to empty string + // to clear any existing SSL policy associated with the target proxy + // resource. + SslPolicy string `json:"sslPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetInstances") to + // ForceSendFields is a list of field names (e.g. "SslPolicy") 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 @@ -54978,99 +53185,25 @@ type TargetInstancesScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetInstances") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "SslPolicy") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedList +func (s *SslPolicyReference) MarshalJSON() ([]byte, error) { + type NoMethod SslPolicyReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstancesScopedListWarning: Informational warning which -// replaces the list of addresses when the list is empty. -type TargetInstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` - - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` +type StatefulPolicy struct { + PreservedState *StatefulPolicyPreservedState `json:"preservedState,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "PreservedState") 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 @@ -55078,36 +53211,40 @@ type TargetInstancesScopedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "PreservedState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedListWarning +func (s *StatefulPolicy) MarshalJSON() ([]byte, error) { + type NoMethod StatefulPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetInstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +// StatefulPolicyPreservedState: Configuration of preserved resources. +type StatefulPolicyPreservedState struct { + // Disks: Disks created on the instances that will be preserved on + // instance delete, update, etc. This map is keyed with the device names + // of the disks. + Disks map[string]StatefulPolicyPreservedStateDiskDevice `json:"disks,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // ExternalIPs: External network IPs assigned to the instances that will + // be preserved on instance delete, update, etc. This map is keyed with + // the network interface name. + ExternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"externalIPs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // InternalIPs: Internal network IPs assigned to the instances that will + // be preserved on instance delete, update, etc. This map is keyed with + // the network interface name. + InternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"internalIPs,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disks") 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 @@ -55115,7 +53252,7 @@ type TargetInstancesScopedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Disks") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -55124,132 +53261,26 @@ type TargetInstancesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedListWarningData +func (s *StatefulPolicyPreservedState) MarshalJSON() ([]byte, error) { + type NoMethod StatefulPolicyPreservedState raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPool: Represents a Target Pool resource. Target pools are used -// for network TCP/UDP load balancing. A target pool references member -// instances, an associated legacy HttpHealthCheck resource, and, -// optionally, a backup target pool. For more information, read Using -// target pools. -type TargetPool struct { - // BackupPool: The server-defined URL for the resource. This field is - // applicable only when the containing target pool is serving a - // forwarding rule as the primary pool, and its failoverRatio field is - // properly set to a value between [0, 1]. backupPool and failoverRatio - // together define the fallback behavior of the primary target pool: if - // the ratio of the healthy instances in the primary pool is at or below - // failoverRatio, traffic arriving at the load-balanced IP will be - // directed to the backup pool. In case where failoverRatio and - // backupPool are not set, or all the instances in the backup pool are - // unhealthy, the traffic will be directed back to the primary pool in - // the "force" mode, where traffic will be spread to the healthy - // instances with the best effort, or to all instances when no instance - // is healthy. - BackupPool string `json:"backupPool,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // FailoverRatio: This field is applicable only when the containing - // target pool is serving a forwarding rule as the primary pool (i.e., - // not as a backup pool to some other target pool). The value of the - // field must be in [0, 1]. If set, backupPool must also be set. They - // together define the fallback behavior of the primary target pool: if - // the ratio of the healthy instances in the primary pool is at or below - // this number, traffic arriving at the load-balanced IP will be - // directed to the backup pool. In case where failoverRatio is not set - // or all the instances in the backup pool are unhealthy, the traffic - // will be directed back to the primary pool in the "force" mode, where - // traffic will be spread to the healthy instances with the best effort, - // or to all instances when no instance is healthy. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - - // HealthChecks: The URL of the HttpHealthCheck resource. A member - // instance in this pool is considered healthy if and only if the health - // checks pass. Only legacy HttpHealthChecks are supported. Only one - // health check may be specified. - HealthChecks []string `json:"healthChecks,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Instances: A list of resource URLs to the virtual machine instances - // serving this pool. They must live in zones contained in the same - // region as this pool. - Instances []string `json:"instances,omitempty"` - - // Kind: [Output Only] Type of the resource. Always compute#targetPool - // for target pools. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] URL of the region where the target pool - // resides. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // SessionAffinity: Session affinity option, must be one of the - // following values: NONE: Connections from the same client IP may go to - // any instance in the pool. CLIENT_IP: Connections from the same client - // IP will go to the same instance in the pool while that instance - // remains healthy. CLIENT_IP_PROTO: Connections from the same client IP - // with the same IP protocol will go to the same instance in the pool - // while that instance remains healthy. +type StatefulPolicyPreservedStateDiskDevice struct { + // AutoDelete: These stateful disks will never be deleted during + // autohealing, update or VM instance recreate operations. This flag is + // used to configure if the disk should be deleted after it is no longer + // used by the group, e.g. when the given instance or the whole group is + // deleted. Note: disks attached in READ_ONLY mode cannot be + // auto-deleted. // // Possible values: - // "CLIENT_IP" - 2-tuple hash on packet's source and destination IP - // addresses. Connections from the same source IP address to the same - // destination IP address will be served by the same backend VM while - // that VM remains healthy. - // "CLIENT_IP_NO_DESTINATION" - 1-tuple hash only on packet's source - // IP address. Connections from the same source IP address will be - // served by the same backend VM while that VM remains healthy. This - // option can only be used for Internal TCP/UDP Load Balancing. - // "CLIENT_IP_PORT_PROTO" - 5-tuple hash on packet's source and - // destination IP addresses, IP protocol, and source and destination - // ports. Connections for the same IP protocol from the same source IP - // address and port to the same destination IP address and port will be - // served by the same backend VM while that VM remains healthy. This - // option cannot be used for HTTP(S) load balancing. - // "CLIENT_IP_PROTO" - 3-tuple hash on packet's source and destination - // IP addresses, and IP protocol. Connections for the same IP protocol - // from the same source IP address to the same destination IP address - // will be served by the same backend VM while that VM remains healthy. - // This option cannot be used for HTTP(S) load balancing. - // "GENERATED_COOKIE" - Hash based on a cookie generated by the L7 - // loadbalancer. Only valid for HTTP(S) load balancing. - // "HEADER_FIELD" - The hash is based on a user specified header - // field. - // "HTTP_COOKIE" - The hash is based on a user provided cookie. - // "NONE" - No session affinity. Connections from the same client IP - // may go to any instance in the pool. - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // "NEVER" + // "ON_PERMANENT_INSTANCE_DELETION" + AutoDelete string `json:"autoDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupPool") to + // ForceSendFields is a list of field names (e.g. "AutoDelete") 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 @@ -55257,7 +53288,7 @@ type TargetPool struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupPool") to include in + // NullFields is a list of field names (e.g. "AutoDelete") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -55266,61 +53297,25 @@ type TargetPool struct { NullFields []string `json:"-"` } -func (s *TargetPool) MarshalJSON() ([]byte, error) { - type NoMethod TargetPool +func (s *StatefulPolicyPreservedStateDiskDevice) MarshalJSON() ([]byte, error) { + type NoMethod StatefulPolicyPreservedStateDiskDevice raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *TargetPool) UnmarshalJSON(data []byte) error { - type NoMethod TargetPool - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type TargetPoolAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetPool resources. - Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolAggregatedList for aggregated lists of target - // pools. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *TargetPoolAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +type StatefulPolicyPreservedStateNetworkIp struct { + // AutoDelete: These stateful IPs will never be released during + // autohealing, update or VM instance recreate operations. This flag is + // used to configure if the IP reservation should be deleted after it is + // no longer used by the group, e.g. when the given instance or the + // whole group is deleted. + // + // Possible values: + // "NEVER" + // "ON_PERMANENT_INSTANCE_DELETION" + AutoDelete string `json:"autoDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "AutoDelete") 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 @@ -55328,8 +53323,8 @@ type TargetPoolAggregatedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "AutoDelete") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -55337,27 +53332,324 @@ type TargetPoolAggregatedList struct { NullFields []string `json:"-"` } -func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedList +func (s *StatefulPolicyPreservedStateNetworkIp) MarshalJSON() ([]byte, error) { + type NoMethod StatefulPolicyPreservedStateNetworkIp raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPoolAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetPoolAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk +// Subnetwork: Represents a Subnetwork resource. A subnetwork (also +// known as a subnet) is a logical partition of a Virtual Private Cloud +// network with one primary IP range and zero or more secondary IP +// ranges. For more information, read Virtual Private Cloud (VPC) +// Network. +type Subnetwork struct { + // AllowSubnetCidrRoutesOverlap: Whether this subnetwork's ranges can + // conflict with existing static routes. Setting this to true allows + // this subnetwork's primary and secondary ranges to overlap with (and + // contain) static routes that have already been configured on the + // corresponding network. For example if a static route has range + // 10.1.0.0/16, a subnet range 10.0.0.0/8 could only be created if + // allow_conflicting_routes=true. Overlapping is only allowed on + // subnetwork operations; routes whose ranges conflict with this + // subnetwork's ranges won't be allowed unless + // route.allow_conflicting_subnetworks is set to true. Typically packets + // destined to IPs within the subnetwork (which may contain + // private/sensitive data) are prevented from leaving the virtual + // network. Setting this field to true will disable this feature. The + // default value is false and applies to all existing subnetworks and + // automatically created subnetworks. This field cannot be set to true + // at resource creation time. + AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. This field can be set only at + // resource creation time. + Description string `json:"description,omitempty"` + + // EnableFlowLogs: Whether to enable flow logging for this subnetwork. + // If this field is not explicitly set, it will not appear in get + // listings. If not set the default behavior is determined by the org + // policy, if there is no org policy specified, then it will default to + // disabled. This field isn't supported if the subnet purpose field is + // set to REGIONAL_MANAGED_PROXY. + EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` + + // ExternalIpv6Prefix: The external IPv6 address range that is owned by + // this subnetwork. + ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a Subnetwork. An up-to-date + // fingerprint must be provided in order to update the Subnetwork, + // otherwise the request will fail with error 412 conditionNotMet. To + // see the latest fingerprint, make a get() request to retrieve a + // Subnetwork. + Fingerprint string `json:"fingerprint,omitempty"` + + // GatewayAddress: [Output Only] The gateway address for default routes + // to reach destination addresses outside this subnetwork. + GatewayAddress string `json:"gatewayAddress,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // InternalIpv6Prefix: [Output Only] The internal IPv6 address range + // that is assigned to this subnetwork. + InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` + + // IpCidrRange: The range of internal addresses that are owned by this + // subnetwork. Provide this property when you create the subnetwork. For + // example, 10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and + // non-overlapping within a network. Only IPv4 is supported. This field + // is set at resource creation time. The range can be any range listed + // in the Valid ranges list. The range can be expanded after creation + // using expandIpCidrRange. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Ipv6AccessType: The access type of IPv6 address this subnet holds. + // It's immutable and can only be specified during creation or the first + // time the subnet is updated into IPV4_IPV6 dual stack. + // + // Possible values: + // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses + // that are accessible via the Internet, as well as the VPC network. + // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses + // that are only accessible over the VPC network. + Ipv6AccessType string `json:"ipv6AccessType,omitempty"` + + // Ipv6CidrRange: [Output Only] This field is for internal use. + Ipv6CidrRange string `json:"ipv6CidrRange,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#subnetwork + // for Subnetwork resources. + Kind string `json:"kind,omitempty"` + + // LogConfig: This field denotes the VPC flow logging options for this + // subnetwork. If logging is enabled, logs are exported to Cloud + // Logging. + LogConfig *SubnetworkLogConfig `json:"logConfig,omitempty"` + + // Name: The name of the resource, provided by the client when initially + // creating the resource. The name must be 1-63 characters long, and + // comply with RFC1035. Specifically, the name must be 1-63 characters + // long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` + // which means the first character must be a lowercase letter, and all + // following characters must be a dash, lowercase letter, or digit, + // except the last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: The URL of the network to which this subnetwork belongs, + // provided by the client when initially creating the subnetwork. This + // field can be set only at resource creation time. + Network string `json:"network,omitempty"` + + // PrivateIpGoogleAccess: Whether the VMs in this subnet can access + // Google services without assigned external IP addresses. This field + // can be both set at resource creation time and updated using + // setPrivateIpGoogleAccess. + PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` + + // PrivateIpv6GoogleAccess: This field is for internal use. This field + // can be both set at resource creation time and updated using patch. + // + // Possible values: + // "DISABLE_GOOGLE_ACCESS" - Disable private IPv6 access to/from + // Google services. + // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private + // IPv6 access to/from Google services. + // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 + // access from VMs in this subnet to Google services. + PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` + + // Purpose: The purpose of the resource. This field can be either + // PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or + // INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in + // auto mode networks. A subnet with purpose set to + // REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved + // for regional Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private + // Service Connect. A subnet with purpose set to + // INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used + // only by regional internal HTTP(S) load balancers. Note that + // REGIONAL_MANAGED_PROXY is the preferred setting for all regional + // Envoy load balancers. If unspecified, the subnet purpose defaults to + // PRIVATE. The enableFlowLogs field isn't supported if the subnet + // purpose field is set to REGIONAL_MANAGED_PROXY. + // + // Possible values: + // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal + // HTTP(S) Load Balancing. + // "PRIVATE" - Regular user created or automatically created subnet. + // "PRIVATE_RFC_1918" - Regular user created or automatically created + // subnet. + // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service + // Connect in the producer network. + // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional + // Internal/External HTTP(S) Load Balancing. + Purpose string `json:"purpose,omitempty"` + + // Region: URL of the region where the Subnetwork resides. This field + // can be set only at resource creation time. + Region string `json:"region,omitempty"` + + // ReservedInternalRange: The URL of the reserved internal range. + ReservedInternalRange string `json:"reservedInternalRange,omitempty"` + + // Role: The role of subnetwork. Currently, this field is only used when + // purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + // BACKUP. An ACTIVE subnetwork is one that is currently being used for + // Envoy-based load balancers in a region. A BACKUP subnetwork is one + // that is ready to be promoted to ACTIVE or is currently draining. This + // field can be updated with a patch request. + // + // Possible values: + // "ACTIVE" - The ACTIVE subnet that is currently used. + // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. + Role string `json:"role,omitempty"` + + // SecondaryIpRanges: An array of configurations for secondary IP ranges + // for VM instances contained in this subnetwork. The primary IP of such + // VM must belong to the primary ipCidrRange of the subnetwork. The + // alias IPs may belong to either primary or secondary ranges. This + // field can be updated with a patch request. + SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // StackType: The stack type for the subnet. If set to IPV4_ONLY, new + // VMs in the subnet are assigned IPv4 addresses only. If set to + // IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 + // addresses. If not specified, IPV4_ONLY is used. This field can be + // both set at resource creation time and updated using patch. + // + // Possible values: + // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 + // addresses. + // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 + // addresses. + StackType string `json:"stackType,omitempty"` + + // State: [Output Only] The state of the subnetwork, which can be one of + // the following values: READY: Subnetwork is created and ready to use + // DRAINING: only applicable to subnetworks that have the purpose set to + // INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the + // load balancer are being drained. A subnetwork that is draining cannot + // be used or modified until it reaches a status of READY + // + // Possible values: + // "DRAINING" - Subnetwork is being drained. + // "READY" - Subnetwork is ready for use. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AllowSubnetCidrRoutesOverlap") 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. + // "AllowSubnetCidrRoutesOverlap") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Subnetwork) MarshalJSON() ([]byte, error) { + type NoMethod Subnetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SubnetworkAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of SubnetworksScopedList resources. + Items map[string]SubnetworksScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#subnetworkAggregatedList for aggregated lists of subnetworks. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *SubnetworkAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SubnetworkAggregatedListWarning: [Output Only] Informational warning +// message. +type SubnetworkAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk // that is larger than image size. // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the // resources has a type marked as experimental @@ -55413,7 +53705,7 @@ type TargetPoolAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetPoolAggregatedListWarningData `json:"data,omitempty"` + Data []*SubnetworkAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -55436,13 +53728,13 @@ type TargetPoolAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetPoolAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedListWarning +func (s *SubnetworkAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetPoolAggregatedListWarningData struct { +type SubnetworkAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -55473,58 +53765,23 @@ type TargetPoolAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetPoolAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetPoolInstanceHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#targetPoolInstanceHealth when checking the health of an - // instance. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "HealthStatus") 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. "HealthStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolInstanceHealth +func (s *SubnetworkAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPoolList: Contains a list of TargetPool resources. -type TargetPoolList struct { +// SubnetworkList: Contains a list of Subnetwork resources. +type SubnetworkList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetPool resources. - Items []*TargetPool `json:"items,omitempty"` + // Items: A list of Subnetwork resources. + Items []*Subnetwork `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#targetPoolList - // for lists of target pools. + // Kind: [Output Only] Type of resource. Always compute#subnetworkList + // for lists of subnetworks. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -55539,7 +53796,7 @@ type TargetPoolList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetPoolListWarning `json:"warning,omitempty"` + Warning *SubnetworkListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -55562,14 +53819,14 @@ type TargetPoolList struct { NullFields []string `json:"-"` } -func (s *TargetPoolList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolList +func (s *SubnetworkList) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPoolListWarning: [Output Only] Informational warning message. -type TargetPoolListWarning struct { +// SubnetworkListWarning: [Output Only] Informational warning message. +type SubnetworkListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -55637,7 +53894,7 @@ type TargetPoolListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetPoolListWarningData `json:"data,omitempty"` + Data []*SubnetworkListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -55660,13 +53917,13 @@ type TargetPoolListWarning struct { NullFields []string `json:"-"` } -func (s *TargetPoolListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolListWarning +func (s *SubnetworkListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetPoolListWarningData struct { +type SubnetworkListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -55697,82 +53954,125 @@ type TargetPoolListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetPoolListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolListWarningData +func (s *SubnetworkListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetPoolsAddHealthCheckRequest struct { - // HealthChecks: The HttpHealthCheck to add to the target pool. - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` +// SubnetworkLogConfig: The available logging options for this +// subnetwork. +type SubnetworkLogConfig struct { + // AggregationInterval: Can only be specified if VPC flow logging for + // this subnetwork is enabled. Toggles the aggregation interval for + // collecting flow logs. Increasing the interval time will reduce the + // amount of generated flow logs for long lasting connections. Default + // is an interval of 5 seconds per connection. + // + // Possible values: + // "INTERVAL_10_MIN" + // "INTERVAL_15_MIN" + // "INTERVAL_1_MIN" + // "INTERVAL_30_SEC" + // "INTERVAL_5_MIN" + // "INTERVAL_5_SEC" + AggregationInterval string `json:"aggregationInterval,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") 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:"-"` + // Enable: Whether to enable flow logging for this subnetwork. If this + // field is not explicitly set, it will not appear in get listings. If + // not set the default behavior is determined by the org policy, if + // there is no org policy specified, then it will default to disabled. + // Flow logging isn't supported if the subnet purpose field is set to + // REGIONAL_MANAGED_PROXY. + Enable bool `json:"enable,omitempty"` - // NullFields is a list of field names (e.g. "HealthChecks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // FilterExpr: Can only be specified if VPC flow logs for this + // subnetwork is enabled. The filter expression is used to define which + // VPC flow logs should be exported to Cloud Logging. + FilterExpr string `json:"filterExpr,omitempty"` -func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsAddHealthCheckRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // FlowSampling: Can only be specified if VPC flow logging for this + // subnetwork is enabled. The value of the field must be in [0, 1]. Set + // the sampling rate of VPC flow logs within the subnetwork where 1.0 + // means all collected logs are reported and 0.0 means no logs are + // reported. Default is 0.5 unless otherwise specified by the org + // policy, which means half of all collected logs are reported. + FlowSampling float64 `json:"flowSampling,omitempty"` -type TargetPoolsAddInstanceRequest struct { - // Instances: A full or partial URL to an instance to add to this target - // pool. This can be a full or partial URL. For example, the following - // are valid URLs: - - // https://www.googleapis.com/compute/v1/projects/project-id/zones/zone - // /instances/instance-name - - // projects/project-id/zones/zone/instances/instance-name - - // zones/zone/instances/instance-name - Instances []*InstanceReference `json:"instances,omitempty"` + // Metadata: Can only be specified if VPC flow logs for this subnetwork + // is enabled. Configures whether all, none or a subset of metadata + // fields should be added to the reported VPC flow logs. Default is + // EXCLUDE_ALL_METADATA. + // + // Possible values: + // "CUSTOM_METADATA" + // "EXCLUDE_ALL_METADATA" + // "INCLUDE_ALL_METADATA" + Metadata string `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with + // MetadataFields: Can only be specified if VPC flow logs for this + // subnetwork is enabled and "metadata" was set to CUSTOM_METADATA. + MetadataFields []string `json:"metadataFields,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationInterval") + // 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. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AggregationInterval") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsAddInstanceRequest +func (s *SubnetworkLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkLogConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetPoolsRemoveHealthCheckRequest struct { - // HealthChecks: Health check URL to be removed. This can be a full or - // valid partial URL. For example, the following are valid URLs: - - // https://www.googleapis.com/compute/beta/projects/project - // /global/httpHealthChecks/health-check - - // projects/project/global/httpHealthChecks/health-check - - // global/httpHealthChecks/health-check - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` +func (s *SubnetworkLogConfig) UnmarshalJSON(data []byte) error { + type NoMethod SubnetworkLogConfig + var s1 struct { + FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FlowSampling = float64(s1.FlowSampling) + return nil +} - // ForceSendFields is a list of field names (e.g. "HealthChecks") to +// SubnetworkSecondaryRange: Represents a secondary IP range of a +// subnetwork. +type SubnetworkSecondaryRange struct { + // IpCidrRange: The range of IP addresses belonging to this subnetwork + // secondary range. Provide this property when you create the + // subnetwork. Ranges must be unique and non-overlapping with all + // primary and secondary IP ranges within a network. Only IPv4 is + // supported. The range can be any range listed in the Valid ranges + // list. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // RangeName: The name associated with this subnetwork secondary range, + // used when adding an alias IP range to a VM instance. The name must be + // 1-63 characters long, and comply with RFC1035. The name must be + // unique within the subnetwork. + RangeName string `json:"rangeName,omitempty"` + + // ReservedInternalRange: The URL of the reserved internal range. + ReservedInternalRange string `json:"reservedInternalRange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpCidrRange") 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 @@ -55780,7 +54080,7 @@ type TargetPoolsRemoveHealthCheckRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") to include + // NullFields is a list of field names (e.g. "IpCidrRange") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -55789,17 +54089,21 @@ type TargetPoolsRemoveHealthCheckRequest struct { NullFields []string `json:"-"` } -func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsRemoveHealthCheckRequest +func (s *SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkSecondaryRange raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetPoolsRemoveInstanceRequest struct { - // Instances: URLs of the instances to be removed from target pool. - Instances []*InstanceReference `json:"instances,omitempty"` +type SubnetworksExpandIpCidrRangeRequest struct { + // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses + // that are legal on this Subnetwork. This range should be disjoint from + // other subnetworks within this network. This range can only be larger + // than (i.e. a superset of) the range previously defined before the + // update. + IpCidrRange string `json:"ipCidrRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to + // ForceSendFields is a list of field names (e.g. "IpCidrRange") 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 @@ -55807,30 +54111,30 @@ type TargetPoolsRemoveInstanceRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "IpCidrRange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsRemoveInstanceRequest +func (s *SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworksExpandIpCidrRangeRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetPoolsScopedList struct { - // TargetPools: A list of target pools contained in this scope. - TargetPools []*TargetPool `json:"targetPools,omitempty"` +type SubnetworksScopedList struct { + // Subnetworks: A list of subnetworks contained in this scope. + Subnetworks []*Subnetwork `json:"subnetworks,omitempty"` - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` + // Warning: An informational warning that appears when the list of + // addresses is empty. + Warning *SubnetworksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetPools") to + // ForceSendFields is a list of field names (e.g. "Subnetworks") 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 @@ -55838,7 +54142,7 @@ type TargetPoolsScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetPools") to include + // NullFields is a list of field names (e.g. "Subnetworks") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -55847,15 +54151,15 @@ type TargetPoolsScopedList struct { NullFields []string `json:"-"` } -func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedList +func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworksScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPoolsScopedListWarning: Informational warning which replaces -// the list of addresses when the list is empty. -type TargetPoolsScopedListWarning struct { +// SubnetworksScopedListWarning: An informational warning that appears +// when the list of addresses is empty. +type SubnetworksScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -55923,7 +54227,7 @@ type TargetPoolsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` + Data []*SubnetworksScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -55946,13 +54250,13 @@ type TargetPoolsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedListWarning +func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworksScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetPoolsScopedListWarningData struct { +type SubnetworksScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -55983,44 +54287,75 @@ type TargetPoolsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedListWarningData +func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworksScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetReference struct { - Target string `json:"target,omitempty"` +type SubnetworksSetPrivateIpGoogleAccessRequest struct { + PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - // ForceSendFields is a list of field names (e.g. "Target") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "PrivateIpGoogleAccess") 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. "Target") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "PrivateIpGoogleAccess") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *TargetReference) MarshalJSON() ([]byte, error) { - type NoMethod TargetReference +func (s *SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworksSetPrivateIpGoogleAccessRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetSslProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetSslProxy. - Service string `json:"service,omitempty"` +// Subsetting: Subsetting configuration for this BackendService. +// Currently this is applicable only for Internal TCP/UDP load +// balancing, Internal HTTP(S) load balancing and Traffic Director. +type Subsetting struct { + // Possible values: + // "CONSISTENT_HASH_SUBSETTING" - Subsetting based on consistent + // hashing. For Traffic Director, the number of backends per backend + // group (the subset size) is based on the `subset_size` parameter. For + // Internal HTTP(S) load balancing, the number of backends per backend + // group (the subset size) is dynamically adjusted in two cases: - As + // the number of proxy instances participating in Internal HTTP(S) load + // balancing increases, the subset size decreases. - When the total + // number of backends in a network exceeds the capacity of a single + // proxy instance, subset sizes are reduced automatically for each + // service that has backend subsetting enabled. + // "NONE" - No Subsetting. Clients may open connections and send + // traffic to all backends of this backend service. This can lead to + // performance issues if there is substantial imbalance in the count of + // clients and backends. + Policy string `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to + // SubsetSize: The number of backends per backend group assigned to each + // proxy instance or each service mesh client. An input parameter to the + // `CONSISTENT_HASH_SUBSETTING` algorithm. Can only be set if `policy` + // is set to `CONSISTENT_HASH_SUBSETTING`. Can only be set if load + // balancing scheme is `INTERNAL_MANAGED` or `INTERNAL_SELF_MANAGED`. + // `subset_size` is optional for Internal HTTP(S) load balancing and + // required for Traffic Director. If you do not provide this value, + // Cloud Load Balancing will calculate it dynamically to optimize the + // number of proxies/clients visible to each backend and vice versa. + // Must be greater than 0. If `subset_size` is larger than the number of + // backends/endpoints, then subsetting is disabled. + SubsetSize int64 `json:"subsetSize,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -56028,8 +54363,8 @@ type TargetSslProxiesSetBackendServiceRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -56037,53 +54372,76 @@ type TargetSslProxiesSetBackendServiceRequest struct { NullFields []string `json:"-"` } -func (s *TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetBackendServiceRequest +func (s *Subsetting) MarshalJSON() ([]byte, error) { + type NoMethod Subsetting raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetSslProxiesSetCertificateMapRequest struct { - // CertificateMap: URL of the Certificate Map to associate with this - // TargetSslProxy. Accepted format is - // //certificatemanager.googleapis.com/projects/{project - // }/locations/{location}/certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CertificateMap") 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:"-"` +type TCPHealthCheck struct { + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 80. Valid values are 1 through 65535. + Port int64 `json:"port,omitempty"` - // NullFields is a list of field names (e.g. "CertificateMap") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // PortName: Not supported. + PortName string `json:"portName,omitempty"` -func (s *TargetSslProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetCertificateMapRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. + // + // Possible values: + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. + PortSpecification string `json:"portSpecification,omitempty"` -type TargetSslProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. // // Possible values: // "NONE" // "PROXY_V1" ProxyHeader string `json:"proxyHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to + // Request: Instructs the health check prober to send this exact ASCII + // string, up to 1024 bytes in length, after establishing the TCP + // connection. + Request string `json:"request,omitempty"` + + // Response: Creates a content-based TCP health check. In addition to + // establishing a TCP connection, you can configure the health check to + // pass only when the backend sends this exact response ASCII string, up + // to 1024 bytes in length. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp + Response string `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Port") 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 @@ -56091,28 +54449,37 @@ type TargetSslProxiesSetProxyHeaderRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Port") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetProxyHeaderRequest +func (s *TCPHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod TCPHealthCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetSslProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of URLs to SslCertificate resources to - // associate with this TargetSslProxy. At least one SSL certificate must - // be specified. Currently, you may specify up to 15 SSL certificates. - SslCertificates []string `json:"sslCertificates,omitempty"` +// Tags: A set of instance tags. +type Tags struct { + // Fingerprint: Specifies a fingerprint for this request, which is + // essentially a hash of the tags' contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update tags. You must always + // provide an up-to-date fingerprint hash in order to update or change + // tags. To see the latest fingerprint, make get() request to the + // instance. + Fingerprint string `json:"fingerprint,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to + // Items: An array of tags. Each tag must be 1-63 characters long, and + // comply with RFC1035. + Items []string `json:"items,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fingerprint") 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 @@ -56120,36 +54487,28 @@ type TargetSslProxiesSetSslCertificatesRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetSslCertificatesRequest +func (s *Tags) MarshalJSON() ([]byte, error) { + type NoMethod Tags raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetSslProxy: Represents a Target SSL Proxy resource. A target SSL -// proxy is a component of a SSL Proxy load balancer. Global forwarding -// rules reference a target SSL proxy, and the target proxy then -// references an external backend service. For more information, read -// Using Target Proxies. -type TargetSslProxy struct { - // CertificateMap: URL of a certificate map that identifies a - // certificate map associated with the given target proxy. This field - // can only be set for global target proxies. If set, sslCertificates - // will be ignored. Accepted format is - // //certificatemanager.googleapis.com/projects/{project - // }/locations/{location}/certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - +// TargetGrpcProxy: Represents a Target gRPC Proxy resource. A target +// gRPC proxy is a component of load balancers intended for load +// balancing gRPC traffic. Only global forwarding rules with load +// balancing scheme INTERNAL_SELF_MANAGED can reference a target gRPC +// proxy. The target gRPC Proxy references a URL map that specifies how +// traffic is routed to gRPC backend services. +type TargetGrpcProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -56158,12 +54517,21 @@ type TargetSslProxy struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a TargetGrpcProxy. An up-to-date + // fingerprint must be provided in order to patch/update the + // TargetGrpcProxy; otherwise, the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve the TargetGrpcProxy. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource type. The + // server generates this identifier. Id uint64 `json:"id,omitempty,string"` // Kind: [Output Only] Type of the resource. Always - // compute#targetSslProxy for target SSL proxies. + // compute#targetGrpcProxy for target grpc proxies. Kind string `json:"kind,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -56175,46 +54543,43 @@ type TargetSslProxy struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL with id for the + // resource. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections to Backends. At least one SSL certificate - // must be specified. Currently, you may specify up to 15 SSL - // certificates. sslCertificates do not apply when the load balancing - // scheme is set to INTERNAL_SELF_MANAGED. - SslCertificates []string `json:"sslCertificates,omitempty"` + // UrlMap: URL to the UrlMap resource that defines the mapping from URL + // to the BackendService. The protocol field in the BackendService must + // be set to GRPC. + UrlMap string `json:"urlMap,omitempty"` - // SslPolicy: URL of SslPolicy resource that will be associated with the - // TargetSslProxy resource. If not set, the TargetSslProxy resource will - // not have any SSL policy configured. - SslPolicy string `json:"sslPolicy,omitempty"` + // ValidateForProxyless: If true, indicates that the BackendServices + // referenced by the urlMap may be accessed by gRPC applications without + // using a sidecar proxy. This will enable configuration checks on + // urlMap and its referenced BackendServices to not allow unsupported + // features. A gRPC application must use "xds:///" scheme in the target + // URI of the service it is connecting to. If false, indicates that the + // BackendServices referenced by the urlMap will be accessed by gRPC + // applications via a sidecar proxy. In this case, a gRPC application + // must not use "xds:///" scheme in the target URI of the service it is + // connecting to + ValidateForProxyless bool `json:"validateForProxyless,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CertificateMap") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // 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. "CertificateMap") to + // NullFields is a list of field names (e.g. "CreationTimestamp") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -56224,22 +54589,22 @@ type TargetSslProxy struct { NullFields []string `json:"-"` } -func (s *TargetSslProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxy +func (s *TargetGrpcProxy) MarshalJSON() ([]byte, error) { + type NoMethod TargetGrpcProxy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetSslProxyList: Contains a list of TargetSslProxy resources. -type TargetSslProxyList struct { +type TargetGrpcProxyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetSslProxy resources. - Items []*TargetSslProxy `json:"items,omitempty"` + // Items: A list of TargetGrpcProxy resources. + Items []*TargetGrpcProxy `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of the resource. Always + // compute#targetGrpcProxy for target grpc proxies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -56254,7 +54619,7 @@ type TargetSslProxyList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetSslProxyListWarning `json:"warning,omitempty"` + Warning *TargetGrpcProxyListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -56277,15 +54642,15 @@ type TargetSslProxyList struct { NullFields []string `json:"-"` } -func (s *TargetSslProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyList +func (s *TargetGrpcProxyList) MarshalJSON() ([]byte, error) { + type NoMethod TargetGrpcProxyList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetSslProxyListWarning: [Output Only] Informational warning +// TargetGrpcProxyListWarning: [Output Only] Informational warning // message. -type TargetSslProxyListWarning struct { +type TargetGrpcProxyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -56353,7 +54718,7 @@ type TargetSslProxyListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetSslProxyListWarningData `json:"data,omitempty"` + Data []*TargetGrpcProxyListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -56376,13 +54741,13 @@ type TargetSslProxyListWarning struct { NullFields []string `json:"-"` } -func (s *TargetSslProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyListWarning +func (s *TargetGrpcProxyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetGrpcProxyListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetSslProxyListWarningData struct { +type TargetGrpcProxyListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -56413,29 +54778,30 @@ type TargetSslProxyListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetSslProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyListWarningData +func (s *TargetGrpcProxyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetGrpcProxyListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetTcpProxiesScopedList struct { - // TargetTcpProxies: A list of TargetTcpProxies contained in this scope. - TargetTcpProxies []*TargetTcpProxy `json:"targetTcpProxies,omitempty"` +type TargetHttpProxiesScopedList struct { + // TargetHttpProxies: A list of TargetHttpProxies contained in this + // scope. + TargetHttpProxies []*TargetHttpProxy `json:"targetHttpProxies,omitempty"` // Warning: Informational warning which replaces the list of backend // services when the list is empty. - Warning *TargetTcpProxiesScopedListWarning `json:"warning,omitempty"` + Warning *TargetHttpProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetTcpProxies") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "TargetHttpProxies") + // 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. "TargetTcpProxies") to + // NullFields is a list of field names (e.g. "TargetHttpProxies") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -56445,15 +54811,15 @@ type TargetTcpProxiesScopedList struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedList +func (s *TargetHttpProxiesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxiesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetTcpProxiesScopedListWarning: Informational warning which +// TargetHttpProxiesScopedListWarning: Informational warning which // replaces the list of backend services when the list is empty. -type TargetTcpProxiesScopedListWarning struct { +type TargetHttpProxiesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -56521,7 +54887,7 @@ type TargetTcpProxiesScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetTcpProxiesScopedListWarningData `json:"data,omitempty"` + Data []*TargetHttpProxiesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -56544,13 +54910,13 @@ type TargetTcpProxiesScopedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedListWarning +func (s *TargetHttpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxiesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetTcpProxiesScopedListWarningData struct { +type TargetHttpProxiesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -56581,92 +54947,61 @@ type TargetTcpProxiesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedListWarningData +func (s *TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxiesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetTcpProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the - // targetTcpProxy. - Service string `json:"service,omitempty"` +// TargetHttpProxy: Represents a Target HTTP Proxy resource. Google +// Compute Engine has two Target HTTP Proxy resources: * Global +// (/compute/docs/reference/rest/beta/targetHttpProxies) * Regional +// (/compute/docs/reference/rest/beta/regionTargetHttpProxies) A target +// HTTP proxy is a component of GCP HTTP load balancers. * +// targetHttpProxies are used by external HTTP load balancers and +// Traffic Director. * regionTargetHttpProxies are used by internal HTTP +// load balancers. Forwarding rules reference a target HTTP proxy, and +// the target proxy then references a URL map. For more information, +// read Using Target Proxies and Forwarding rule concepts. +type TargetHttpProxy struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") 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:"-"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // NullFields is a list of field names (e.g. "Service") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a TargetHttpProxy. An up-to-date + // fingerprint must be provided in order to patch/update the + // TargetHttpProxy; otherwise, the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve the TargetHttpProxy. + Fingerprint string `json:"fingerprint,omitempty"` -func (s *TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesSetBackendServiceRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending - // data to the backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProxyHeader") 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. "ProxyHeader") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesSetProxyHeaderRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxy: Represents a Target TCP Proxy resource. A target TCP -// proxy is a component of a TCP Proxy load balancer. Global forwarding -// rules reference target TCP proxy, and the target proxy then -// references an external backend service. For more information, read -// TCP Proxy Load Balancing overview. -type TargetTcpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + // HttpFilters: URLs to networkservices.HttpFilter resources enabled for + // xDS clients using this configuration. For example, + // https://networkservices.googleapis.com/v1alpha1/projects/project/locations/ + // locationhttpFilters/httpFilter Only filters that handle outbound + // connection and stream events may be specified. These filters work in + // conjunction with a default set of HTTP filters that may already be + // configured by Traffic Director. Traffic Director will determine the + // final location of these filters within xDS configuration based on the + // name of the HTTP filter. If Traffic Director positions multiple + // filters at the same location, those filters will be in the same order + // as specified in this list. httpFilters only applies for loadbalancers + // with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See + // ForwardingRule for more details. + HttpFilters []string `json:"httpFilters,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always - // compute#targetTcpProxy for target TCP proxies. + // Kind: [Output Only] Type of resource. Always compute#targetHttpProxy + // for target HTTP proxies. Kind string `json:"kind,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -56689,24 +55024,17 @@ type TargetTcpProxy struct { // default is false. ProxyBind bool `json:"proxyBind,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // Region: [Output Only] URL of the region where the regional TCP proxy - // resides. This field is not applicable to global TCP proxy. + // Region: [Output Only] URL of the region where the regional Target + // HTTP Proxy resides. This field is not applicable to global Target + // HTTP Proxies. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` + // UrlMap: URL to the UrlMap resource that defines the mapping from URL + // to the BackendService. + UrlMap string `json:"urlMap,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -56730,22 +55058,23 @@ type TargetTcpProxy struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxy +func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetTcpProxyAggregatedList struct { +type TargetHttpProxyAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetTcpProxiesScopedList resources. - Items map[string]TargetTcpProxiesScopedList `json:"items,omitempty"` + // Items: A list of TargetHttpProxiesScopedList resources. + Items map[string]TargetHttpProxiesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always - // compute#targetTcpProxyAggregatedList for lists of Target TCP Proxies. + // compute#targetHttpProxyAggregatedList for lists of Target HTTP + // Proxies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -56763,7 +55092,7 @@ type TargetTcpProxyAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetTcpProxyAggregatedListWarning `json:"warning,omitempty"` + Warning *TargetHttpProxyAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -56786,15 +55115,15 @@ type TargetTcpProxyAggregatedList struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedList +func (s *TargetHttpProxyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxyAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetTcpProxyAggregatedListWarning: [Output Only] Informational +// TargetHttpProxyAggregatedListWarning: [Output Only] Informational // warning message. -type TargetTcpProxyAggregatedListWarning struct { +type TargetHttpProxyAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -56862,7 +55191,7 @@ type TargetTcpProxyAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetTcpProxyAggregatedListWarningData `json:"data,omitempty"` + Data []*TargetHttpProxyAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -56885,13 +55214,13 @@ type TargetTcpProxyAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedListWarning +func (s *TargetHttpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxyAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetTcpProxyAggregatedListWarningData struct { +type TargetHttpProxyAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -56922,22 +55251,23 @@ type TargetTcpProxyAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedListWarningData +func (s *TargetHttpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxyAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetTcpProxyList: Contains a list of TargetTcpProxy resources. -type TargetTcpProxyList struct { +// TargetHttpProxyList: A list of TargetHttpProxy resources. +type TargetHttpProxyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetTcpProxy resources. - Items []*TargetTcpProxy `json:"items,omitempty"` + // Items: A list of TargetHttpProxy resources. + Items []*TargetHttpProxy `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: Type of resource. Always compute#targetHttpProxyList for lists + // of target HTTP proxies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -56952,7 +55282,7 @@ type TargetTcpProxyList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *TargetTcpProxyListWarning `json:"warning,omitempty"` + Warning *TargetHttpProxyListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -56975,15 +55305,15 @@ type TargetTcpProxyList struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyList +func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxyList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetTcpProxyListWarning: [Output Only] Informational warning +// TargetHttpProxyListWarning: [Output Only] Informational warning // message. -type TargetTcpProxyListWarning struct { +type TargetHttpProxyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -57051,7 +55381,7 @@ type TargetTcpProxyListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetTcpProxyListWarningData `json:"data,omitempty"` + Data []*TargetHttpProxyListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -57074,13 +55404,13 @@ type TargetTcpProxyListWarning struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyListWarning +func (s *TargetHttpProxyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxyListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetTcpProxyListWarningData struct { +type TargetHttpProxyListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -57111,93 +55441,22 @@ type TargetTcpProxyListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyListWarningData +func (s *TargetHttpProxyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxyListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGateway: Represents a Target VPN Gateway resource. The -// target VPN gateway resource represents a Classic Cloud VPN gateway. -// For more information, read the the Cloud VPN Overview. -type TargetVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule - // resources. ForwardingRules are created using - // compute.forwardingRules.insert and associated with a VPN gateway. - ForwardingRules []string `json:"forwardingRules,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // LabelFingerprint: A fingerprint for the labels being applied to this - // TargetVpnGateway, which is essentially a hash of the labels set used - // for optimistic locking. The fingerprint is initially generated by - // Compute Engine and changes after every request to modify or update - // labels. You must always provide an up-to-date fingerprint hash in - // order to update or change labels, otherwise the request will fail - // with error 412 conditionNotMet. To see the latest fingerprint, make a - // get() request to retrieve a TargetVpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels for this resource. These can only be added or modified - // by the setLabels method. Each label key/value pair must comply with - // RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Network: URL of the network to which this VPN gateway is attached. - // Provided by the client when the VPN gateway is created. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URL of the region where the target VPN gateway - // resides. You must specify this field as part of the HTTP request URL. - // It is not settable as a field in the request body. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // Status: [Output Only] The status of the VPN gateway, which can be one - // of the following: CREATING, READY, FAILED, or DELETING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - Status string `json:"status,omitempty"` - - // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. - // VpnTunnels are created using the compute.vpntunnels.insert method and - // associated with a VPN gateway. - Tunnels []string `json:"tunnels,omitempty"` +type TargetHttpsProxiesScopedList struct { + // TargetHttpsProxies: A list of TargetHttpsProxies contained in this + // scope. + TargetHttpsProxies []*TargetHttpsProxy `json:"targetHttpsProxies,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *TargetHttpsProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // ForceSendFields is a list of field names (e.g. "TargetHttpsProxies") // 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 @@ -57205,7 +55464,7 @@ type TargetVpnGateway struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to + // NullFields is a list of field names (e.g. "TargetHttpsProxies") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -57215,71 +55474,15 @@ type TargetVpnGateway struct { NullFields []string `json:"-"` } -func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGateway - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of TargetVpnGateway resources. - Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *TargetVpnGatewayAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedList +func (s *TargetHttpsProxiesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGatewayAggregatedListWarning: [Output Only] Informational -// warning message. -type TargetVpnGatewayAggregatedListWarning struct { +// TargetHttpsProxiesScopedListWarning: Informational warning which +// replaces the list of backend services when the list is empty. +type TargetHttpsProxiesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -57347,7 +55550,7 @@ type TargetVpnGatewayAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetVpnGatewayAggregatedListWarningData `json:"data,omitempty"` + Data []*TargetHttpsProxiesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -57370,13 +55573,13 @@ type TargetVpnGatewayAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetVpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedListWarning +func (s *TargetHttpsProxiesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetVpnGatewayAggregatedListWarningData struct { +type TargetHttpsProxiesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -57407,23 +55610,300 @@ type TargetVpnGatewayAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetVpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedListWarningData +func (s *TargetHttpsProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. -type TargetVpnGatewayList struct { +type TargetHttpsProxiesSetCertificateMapRequest struct { + // CertificateMap: URL of the Certificate Map to associate with this + // TargetHttpsProxy. Accepted format is + // //certificatemanager.googleapis.com/projects/{project + // }/locations/{location}/certificateMaps/{resourceName}. + CertificateMap string `json:"certificateMap,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CertificateMap") 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. "CertificateMap") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesSetCertificateMapRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpsProxiesSetQuicOverrideRequest struct { + // QuicOverride: QUIC policy for the TargetHttpsProxy resource. + // + // Possible values: + // "DISABLE" - The load balancer will not attempt to negotiate QUIC + // with clients. + // "ENABLE" - The load balancer will attempt to negotiate QUIC with + // clients. + // "NONE" - No overrides to the default QUIC policy. This option is + // implicit if no QUIC override has been specified in the request. + QuicOverride string `json:"quicOverride,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QuicOverride") 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. "QuicOverride") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxiesSetQuicOverrideRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesSetQuicOverrideRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpsProxiesSetSslCertificatesRequest struct { + // SslCertificates: New set of SslCertificate resources to associate + // with this TargetHttpsProxy resource. At least one SSL certificate + // must be specified. Currently, you may specify up to 15 SSL + // certificates. + SslCertificates []string `json:"sslCertificates,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SslCertificates") 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. "SslCertificates") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesSetSslCertificatesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetHttpsProxy: Represents a Target HTTPS Proxy resource. Google +// Compute Engine has two Target HTTPS Proxy resources: * Global +// (/compute/docs/reference/rest/beta/targetHttpsProxies) * Regional +// (/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target +// HTTPS proxy is a component of GCP HTTPS load balancers. * +// targetHttpsProxies are used by external HTTPS load balancers. * +// regionTargetHttpsProxies are used by internal HTTPS load balancers. +// Forwarding rules reference a target HTTPS proxy, and the target proxy +// then references a URL map. For more information, read Using Target +// Proxies and Forwarding rule concepts. +type TargetHttpsProxy struct { + // Authentication: [Deprecated] Use serverTlsPolicy instead. + Authentication string `json:"authentication,omitempty"` + + // Authorization: [Deprecated] Use authorizationPolicy instead. + Authorization string `json:"authorization,omitempty"` + + // AuthorizationPolicy: Optional. A URL referring to a + // networksecurity.AuthorizationPolicy resource that describes how the + // proxy should authorize inbound traffic. If left blank, access will + // not be restricted by an authorization policy. Refer to the + // AuthorizationPolicy resource for additional details. + // authorizationPolicy only applies to a global TargetHttpsProxy + // attached to globalForwardingRules with the loadBalancingScheme set to + // INTERNAL_SELF_MANAGED. Note: This field currently has no impact. + AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` + + // CertificateMap: URL of a certificate map that identifies a + // certificate map associated with the given target proxy. This field + // can only be set for global target proxies. If set, sslCertificates + // will be ignored. Accepted format is + // //certificatemanager.googleapis.com/projects/{project + // }/locations/{location}/certificateMaps/{resourceName}. + CertificateMap string `json:"certificateMap,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a TargetHttpsProxy. An + // up-to-date fingerprint must be provided in order to patch the + // TargetHttpsProxy; otherwise, the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve the TargetHttpsProxy. + Fingerprint string `json:"fingerprint,omitempty"` + + // HttpFilters: URLs to networkservices.HttpFilter resources enabled for + // xDS clients using this configuration. For example, + // https://networkservices.googleapis.com/beta/projects/project/locations/ + // locationhttpFilters/httpFilter Only filters that handle outbound + // connection and stream events may be specified. These filters work in + // conjunction with a default set of HTTP filters that may already be + // configured by Traffic Director. Traffic Director will determine the + // final location of these filters within xDS configuration based on the + // name of the HTTP filter. If Traffic Director positions multiple + // filters at the same location, those filters will be in the same order + // as specified in this list. httpFilters only applies for loadbalancers + // with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See + // ForwardingRule for more details. + HttpFilters []string `json:"httpFilters,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy + // for target HTTPS proxies. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // ProxyBind: This field only applies when the forwarding rule that + // references this target proxy has a loadBalancingScheme set to + // INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies + // set up inbound traffic interception and bind to the IP address and + // port specified in the forwarding rule. This is generally useful when + // using Traffic Director to configure Envoy as a gateway or middle + // proxy (in other words, not a sidecar proxy). The Envoy proxy listens + // for inbound requests and handles requests when it receives them. The + // default is false. + ProxyBind bool `json:"proxyBind,omitempty"` + + // QuicOverride: Specifies the QUIC override policy for this + // TargetHttpsProxy resource. This setting determines whether the load + // balancer attempts to negotiate QUIC with clients. You can specify + // NONE, ENABLE, or DISABLE. - When quic-override is set to NONE, Google + // manages whether QUIC is used. - When quic-override is set to ENABLE, + // the load balancer uses QUIC when possible. - When quic-override is + // set to DISABLE, the load balancer doesn't use QUIC. - If the + // quic-override flag is not specified, NONE is implied. + // + // Possible values: + // "DISABLE" - The load balancer will not attempt to negotiate QUIC + // with clients. + // "ENABLE" - The load balancer will attempt to negotiate QUIC with + // clients. + // "NONE" - No overrides to the default QUIC policy. This option is + // implicit if no QUIC override has been specified in the request. + QuicOverride string `json:"quicOverride,omitempty"` + + // Region: [Output Only] URL of the region where the regional + // TargetHttpsProxy resides. This field is not applicable to global + // TargetHttpsProxies. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerTlsPolicy: Optional. A URL referring to a + // networksecurity.ServerTlsPolicy resource that describes how the proxy + // should authenticate inbound traffic. serverTlsPolicy only applies to + // a global TargetHttpsProxy attached to globalForwardingRules with the + // loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL or + // EXTERNAL_MANAGED. For details which ServerTlsPolicy resources are + // accepted with INTERNAL_SELF_MANAGED and which with EXTERNAL, + // EXTERNAL_MANAGED loadBalancingScheme consult ServerTlsPolicy + // documentation. If left blank, communications are not encrypted. + ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` + + // SslCertificates: URLs to SslCertificate resources that are used to + // authenticate connections between users and the load balancer. At + // least one SSL certificate must be specified. Currently, you may + // specify up to 15 SSL certificates. sslCertificates do not apply when + // the load balancing scheme is set to INTERNAL_SELF_MANAGED. + SslCertificates []string `json:"sslCertificates,omitempty"` + + // SslPolicy: URL of SslPolicy resource that will be associated with the + // TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource + // has no SSL policy configured. + SslPolicy string `json:"sslPolicy,omitempty"` + + // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource + // that defines the mapping from URL to the BackendService. For example, + // the following are all valid URLs for specifying a URL map: - + // https://www.googleapis.compute/v1/projects/project/global/urlMaps/ + // url-map - projects/project/global/urlMaps/url-map - + // global/urlMaps/url-map + UrlMap string `json:"urlMap,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Authentication") 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. "Authentication") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpsProxyAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of TargetVpnGateway resources. - Items []*TargetVpnGateway `json:"items,omitempty"` + // Items: A list of TargetHttpsProxiesScopedList resources. + Items map[string]TargetHttpsProxiesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway - // for target VPN gateways. + // Kind: [Output Only] Type of resource. Always + // compute#targetHttpsProxyAggregatedList for lists of Target HTTP + // Proxies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -57437,8 +55917,11 @@ type TargetVpnGatewayList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *TargetVpnGatewayListWarning `json:"warning,omitempty"` + Warning *TargetHttpsProxyAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -57461,15 +55944,15 @@ type TargetVpnGatewayList struct { NullFields []string `json:"-"` } -func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayList +func (s *TargetHttpsProxyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGatewayListWarning: [Output Only] Informational warning -// message. -type TargetVpnGatewayListWarning struct { +// TargetHttpsProxyAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetHttpsProxyAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -57537,7 +56020,7 @@ type TargetVpnGatewayListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetVpnGatewayListWarningData `json:"data,omitempty"` + Data []*TargetHttpsProxyAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -57560,13 +56043,13 @@ type TargetVpnGatewayListWarning struct { NullFields []string `json:"-"` } -func (s *TargetVpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayListWarning +func (s *TargetHttpsProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetVpnGatewayListWarningData struct { +type TargetHttpsProxyAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -57597,48 +56080,69 @@ type TargetVpnGatewayListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayListWarningData +func (s *TargetHttpsProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] A list of target VPN gateways - // contained in this scope. - TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` +// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. +type TargetHttpsProxyList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"` + // Items: A list of TargetHttpsProxy resources. + Items []*TargetHttpsProxy `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetVpnGateways") - // to unconditionally include in API requests. By default, fields with + // Kind: Type of resource. Always compute#targetHttpsProxyList for lists + // of target HTTPS proxies. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *TargetHttpsProxyListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with // empty 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. "TargetVpnGateways") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedList +func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGatewaysScopedListWarning: [Output Only] Informational -// warning which replaces the list of addresses when the list is empty. -type TargetVpnGatewaysScopedListWarning struct { +// TargetHttpsProxyListWarning: [Output Only] Informational warning +// message. +type TargetHttpsProxyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -57706,7 +56210,7 @@ type TargetVpnGatewaysScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"` + Data []*TargetHttpsProxyListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -57729,13 +56233,13 @@ type TargetVpnGatewaysScopedListWarning struct { NullFields []string `json:"-"` } -func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedListWarning +func (s *TargetHttpsProxyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type TargetVpnGatewaysScopedListWarningData struct { +type TargetHttpsProxyListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -57766,271 +56270,41 @@ type TargetVpnGatewaysScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestFailure struct { - // ActualOutputUrl: The actual output URL evaluated by a load balancer - // containing the scheme, host, path and query parameters. - ActualOutputUrl string `json:"actualOutputUrl,omitempty"` - - // ActualRedirectResponseCode: Actual HTTP status code for rule with - // `urlRedirect` calculated by load balancer - ActualRedirectResponseCode int64 `json:"actualRedirectResponseCode,omitempty"` - - // ActualService: BackendService or BackendBucket returned by load - // balancer. - ActualService string `json:"actualService,omitempty"` - - // ExpectedOutputUrl: The expected output URL evaluated by a load - // balancer containing the scheme, host, path and query parameters. - ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` - - // ExpectedRedirectResponseCode: Expected HTTP status code for rule with - // `urlRedirect` calculated by load balancer - ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` - - // ExpectedService: Expected BackendService or BackendBucket resource - // the given URL should be mapped to. - ExpectedService string `json:"expectedService,omitempty"` - - // Headers: HTTP headers of the request. - Headers []*UrlMapTestHeader `json:"headers,omitempty"` - - // Host: Host portion of the URL. - Host string `json:"host,omitempty"` - - // Path: Path portion including query parameters in the URL. - Path string `json:"path,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActualOutputUrl") 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. "ActualOutputUrl") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *TestFailure) MarshalJSON() ([]byte, error) { - type NoMethod TestFailure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsRequest struct { - // Permissions: The set of permissions to check for the 'resource'. - // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type TestPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type Uint128 struct { - High uint64 `json:"high,omitempty,string"` - - Low uint64 `json:"low,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "High") 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. "High") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Uint128) MarshalJSON() ([]byte, error) { - type NoMethod Uint128 +func (s *TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMap: Represents a URL Map resource. Compute Engine has two URL Map -// resources: * Global (/compute/docs/reference/rest/beta/urlMaps) * -// Regional (/compute/docs/reference/rest/beta/regionUrlMaps) A URL map -// resource is a component of certain types of cloud load balancers and -// Traffic Director: * urlMaps are used by external HTTP(S) load -// balancers and Traffic Director. * regionUrlMaps are used by internal -// HTTP(S) load balancers. For a list of supported URL map features by -// the load balancer type, see the Load balancing features: Routing and -// traffic management table. For a list of supported URL map features -// for Traffic Director, see the Traffic Director features: Routing and -// traffic management table. This resource defines mappings from -// hostnames and URL paths to either a backend service or a backend -// bucket. To use the global urlMaps resource, the backend service must -// have a loadBalancingScheme of either EXTERNAL or -// INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend -// service must have a loadBalancingScheme of INTERNAL_MANAGED. For more -// information, read URL Map Concepts. -type UrlMap struct { +// TargetInstance: Represents a Target Instance resource. You can use a +// target instance to handle traffic for one or more forwarding rules, +// which is ideal for forwarding protocol traffic that is managed by a +// single source. For example, ESP, AH, TCP, or UDP. For more +// information, read Target instances. +type TargetInstance struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy - // specifies how the Load Balancer returns error responses when - // BackendServiceor BackendBucket responds with an error. This policy - // takes effect at the Load Balancer level and applies only when no - // policy has been defined for the error code at lower levels like - // PathMatcher, RouteRule and PathRule within this UrlMap. For example, - // consider a UrlMap with the following configuration: - - // defaultCustomErrorResponsePolicy containing policies for responding - // to 5xx and 4xx errors - A PathMatcher configured for *.example.com - // has defaultCustomErrorResponsePolicy for 4xx. If a request for - // http://www.example.com/ encounters a 404, the policy in - // pathMatcher.defaultCustomErrorResponsePolicy will be enforced. When - // the request for http://www.example.com/ encounters a 502, the policy - // in UrlMap.defaultCustomErrorResponsePolicy will be enforced. When a - // request that does not match any host in *.example.com such as - // http://www.myotherexample.com/, encounters a 404, - // UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in - // conjunction with defaultRouteAction.retryPolicy, retries take - // precedence. Only once all retries are exhausted, the - // defaultCustomErrorResponsePolicy is applied. While attempting a - // retry, if load balancer is successful in reaching the service, the - // defaultCustomErrorResponsePolicy is ignored and the response from the - // service is returned to the client. defaultCustomErrorResponsePolicy - // is supported only for Global External HTTP(S) load balancing. - DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` - - // DefaultRouteAction: defaultRouteAction takes effect when none of the - // hostRules match. The load balancer performs advanced routing actions, - // such as URL rewrites and header transformations, before forwarding - // the request to the selected backend. If defaultRouteAction specifies - // any weightedBackendServices, defaultService must not be set. - // Conversely if defaultService is set, defaultRouteAction cannot - // contain any weightedBackendServices. Only one of defaultRouteAction - // or defaultUrlRedirect must be set. URL maps for Classic external - // HTTP(S) load balancers only support the urlRewrite action within - // defaultRouteAction. defaultRouteAction has no effect when the URL map - // is bound to a target gRPC proxy that has the validateForProxyless - // field set to true. - DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` - - // DefaultService: The full or partial URL of the defaultService - // resource to which traffic is directed if none of the hostRules match. - // If defaultRouteAction is also specified, advanced routing actions, - // such as URL rewrites, take effect before sending the request to the - // backend. However, if defaultService is specified, defaultRouteAction - // cannot contain any weightedBackendServices. Conversely, if - // routeAction specifies any weightedBackendServices, service must not - // be specified. Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. defaultService - // has no effect when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - DefaultService string `json:"defaultService,omitempty"` - - // DefaultUrlRedirect: When none of the specified hostRules match, the - // request is redirected to a URL specified by defaultUrlRedirect. If - // defaultUrlRedirect is specified, defaultService or defaultRouteAction - // must not be set. Not supported when the URL map is bound to a target - // gRPC proxy. - DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` - // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field is ignored when inserting a UrlMap. An up-to-date fingerprint - // must be provided in order to update the UrlMap, otherwise the request - // will fail with error 412 conditionNotMet. To see the latest - // fingerprint, make a get() request to retrieve a UrlMap. - Fingerprint string `json:"fingerprint,omitempty"` - - // HeaderAction: Specifies changes to request and response headers that - // need to take effect for the selected backendService. The headerAction - // specified here take effect after headerAction specified under - // pathMatcher. headerAction is not supported for load balancers that - // have their loadBalancingScheme set to EXTERNAL. Not supported when - // the URL map is bound to a target gRPC proxy that has - // validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - - // HostRules: The list of host rules to use against the URL. - HostRules []*HostRule `json:"hostRules,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#urlMaps for - // url maps. + // Instance: A URL to the virtual machine instance that handles traffic + // for this target instance. When creating a target instance, you can + // provide the fully-qualified URL or a valid partial URL to the desired + // virtual machine. For example, the following are all valid URLs: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /instances/instance - projects/project/zones/zone/instances/instance + // - zones/zone/instances/instance + Instance string `json:"instance,omitempty"` + + // Kind: [Output Only] The type of the resource. Always + // compute#targetInstance for target instances. Kind string `json:"kind,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -58042,24 +56316,30 @@ type UrlMap struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // PathMatchers: The list of named PathMatchers to use against the URL. - PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` + // NatPolicy: Must have a value of NO_NAT. Protocol forwarding delivers + // packets while preserving the destination IP address of the forwarding + // rule referencing the target instance. + // + // Possible values: + // "NO_NAT" - No NAT performed. + NatPolicy string `json:"natPolicy,omitempty"` - // Region: [Output Only] URL of the region where the regional URL map - // resides. This field is not applicable to global URL maps. You must - // specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. - Region string `json:"region,omitempty"` + // Network: The URL of the network this target instance uses to forward + // traffic. If not specified, the traffic will be forwarded to the + // network that the default network interface belongs to. + Network string `json:"network,omitempty"` + + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this target instance. + SecurityPolicy string `json:"securityPolicy,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Tests: The list of expected URL mapping tests. Request to update the - // UrlMap succeeds only if all test cases pass. You can specify a - // maximum of 100 tests per UrlMap. Not supported when the URL map is - // bound to a target gRPC proxy that has validateForProxyless field set - // to true. - Tests []*UrlMapTest `json:"tests,omitempty"` + // Zone: [Output Only] URL of the zone where the target instance + // resides. You must specify this field as part of the HTTP request URL. + // It is not settable as a field in the request body. + Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -58083,20 +56363,19 @@ type UrlMap struct { NullFields []string `json:"-"` } -func (s *UrlMap) MarshalJSON() ([]byte, error) { - type NoMethod UrlMap +func (s *TargetInstance) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstance raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMapList: Contains a list of UrlMap resources. -type UrlMapList struct { +type TargetInstanceAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of UrlMap resources. - Items []*UrlMap `json:"items,omitempty"` + // Items: A list of TargetInstance resources. + Items map[string]TargetInstancesScopedList `json:"items,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` @@ -58112,8 +56391,11 @@ type UrlMapList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *UrlMapListWarning `json:"warning,omitempty"` + Warning *TargetInstanceAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -58136,14 +56418,15 @@ type UrlMapList struct { NullFields []string `json:"-"` } -func (s *UrlMapList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapList +func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstanceAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMapListWarning: [Output Only] Informational warning message. -type UrlMapListWarning struct { +// TargetInstanceAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetInstanceAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -58211,7 +56494,7 @@ type UrlMapListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*UrlMapListWarningData `json:"data,omitempty"` + Data []*TargetInstanceAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -58234,13 +56517,13 @@ type UrlMapListWarning struct { NullFields []string `json:"-"` } -func (s *UrlMapListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapListWarning +func (s *TargetInstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstanceAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UrlMapListWarningData struct { +type TargetInstanceAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -58271,181 +56554,20 @@ type UrlMapListWarningData struct { NullFields []string `json:"-"` } -func (s *UrlMapListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type UrlMapReference struct { - UrlMap string `json:"urlMap,omitempty"` - - // ForceSendFields is a list of field names (e.g. "UrlMap") 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. "UrlMap") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapReference) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapReference - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapTest: Message for the expected URL mappings. -type UrlMapTest struct { - // Description: Description of this test case. - Description string `json:"description,omitempty"` - - // ExpectedOutputUrl: The expected output URL evaluated by the load - // balancer containing the scheme, host, path and query parameters. For - // rules that forward requests to backends, the test passes only when - // expectedOutputUrl matches the request forwarded by the load balancer - // to backends. For rules with urlRewrite, the test verifies that the - // forwarded request matches hostRewrite and pathPrefixRewrite in the - // urlRewrite action. When service is specified, expectedOutputUrl`s - // scheme is ignored. For rules with urlRedirect, the test passes only - // if expectedOutputUrl matches the URL in the load balancer's redirect - // response. If urlRedirect specifies https_redirect, the test passes - // only if the scheme in expectedOutputUrl is also set to HTTPS. If - // urlRedirect specifies strip_query, the test passes only if - // expectedOutputUrl does not contain any query parameters. - // expectedOutputUrl is optional when service is specified. - ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` - - // ExpectedRedirectResponseCode: For rules with urlRedirect, the test - // passes only if expectedRedirectResponseCode matches the HTTP status - // code in load balancer's redirect response. - // expectedRedirectResponseCode cannot be set when service is set. - ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` - - // Headers: HTTP headers for this request. If headers contains a host - // header, then host must also match the header value. - Headers []*UrlMapTestHeader `json:"headers,omitempty"` - - // Host: Host portion of the URL. If headers contains a host header, - // then host must also match the header value. - Host string `json:"host,omitempty"` - - // Path: Path portion of the URL. - Path string `json:"path,omitempty"` - - // Service: Expected BackendService or BackendBucket resource the given - // URL should be mapped to. The service field cannot be set if - // expectedRedirectResponseCode is set. - Service string `json:"service,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapTest) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapTest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapTestHeader: HTTP headers used in UrlMapTests. -type UrlMapTestHeader struct { - // Name: Header name. - Name string `json:"name,omitempty"` - - // Value: Header value. - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty 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 *UrlMapTestHeader) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapTestHeader - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// UrlMapValidationResult: Message representing the validation result -// for a UrlMap. -type UrlMapValidationResult struct { - LoadErrors []string `json:"loadErrors,omitempty"` - - // LoadSucceeded: Whether the given UrlMap can be successfully loaded. - // If false, 'loadErrors' indicates the reasons. - LoadSucceeded bool `json:"loadSucceeded,omitempty"` - - TestFailures []*TestFailure `json:"testFailures,omitempty"` - - // TestPassed: If successfully loaded, this field indicates whether the - // test passed. If false, 'testFailures's indicate the reason of - // failure. - TestPassed bool `json:"testPassed,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LoadErrors") 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. "LoadErrors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapValidationResult +func (s *TargetInstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstanceAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UrlMapsAggregatedList struct { +// TargetInstanceList: Contains a list of TargetInstance resources. +type TargetInstanceList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of UrlMapsScopedList resources. - Items map[string]UrlMapsScopedList `json:"items,omitempty"` + // Items: A list of TargetInstance resources. + Items []*TargetInstance `json:"items,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` @@ -58461,11 +56583,8 @@ type UrlMapsAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *UrlMapsAggregatedListWarning `json:"warning,omitempty"` + Warning *TargetInstanceListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -58488,15 +56607,15 @@ type UrlMapsAggregatedList struct { NullFields []string `json:"-"` } -func (s *UrlMapsAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedList +func (s *TargetInstanceList) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstanceList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMapsAggregatedListWarning: [Output Only] Informational warning +// TargetInstanceListWarning: [Output Only] Informational warning // message. -type UrlMapsAggregatedListWarning struct { +type TargetInstanceListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -58564,7 +56683,7 @@ type UrlMapsAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*UrlMapsAggregatedListWarningData `json:"data,omitempty"` + Data []*TargetInstanceListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -58587,13 +56706,13 @@ type UrlMapsAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *UrlMapsAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedListWarning +func (s *TargetInstanceListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstanceListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UrlMapsAggregatedListWarningData struct { +type TargetInstanceListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -58624,21 +56743,21 @@ type UrlMapsAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *UrlMapsAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedListWarningData +func (s *TargetInstanceListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstanceListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UrlMapsScopedList struct { - // UrlMaps: A list of UrlMaps contained in this scope. - UrlMaps []*UrlMap `json:"urlMaps,omitempty"` +type TargetInstancesScopedList struct { + // TargetInstances: A list of target instances contained in this scope. + TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` - // Warning: Informational warning which replaces the list of backend - // services when the list is empty. - Warning *UrlMapsScopedListWarning `json:"warning,omitempty"` + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "UrlMaps") to + // ForceSendFields is a list of field names (e.g. "TargetInstances") 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 @@ -58646,24 +56765,25 @@ type UrlMapsScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UrlMaps") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "TargetInstances") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *UrlMapsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedList +func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstancesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMapsScopedListWarning: Informational warning which replaces the -// list of backend services when the list is empty. -type UrlMapsScopedListWarning struct { +// TargetInstancesScopedListWarning: Informational warning which +// replaces the list of addresses when the list is empty. +type TargetInstancesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -58731,7 +56851,7 @@ type UrlMapsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*UrlMapsScopedListWarningData `json:"data,omitempty"` + Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -58754,13 +56874,13 @@ type UrlMapsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *UrlMapsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedListWarning +func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstancesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UrlMapsScopedListWarningData struct { +type TargetInstancesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -58791,74 +56911,136 @@ type UrlMapsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *UrlMapsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedListWarningData +func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetInstancesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UrlMapsValidateRequest struct { - // LoadBalancingSchemes: Specifies the load balancer type(s) this - // validation request is for. Use EXTERNAL_MANAGED for HTTP/HTTPS - // External Global Load Balancer with Advanced Traffic Management. Use - // EXTERNAL for Classic HTTP/HTTPS External Global Load Balancer. Other - // load balancer types are not supported. For more information, refer to - // Choosing a load balancer. If unspecified, the load balancing scheme - // will be inferred from the backend service resources this URL map - // references. If that can not be inferred (for example, this URL map - // only references backend buckets, or this Url map is for rewrites and - // redirects only and doesn't reference any backends), EXTERNAL will be - // used as the default type. If specified, the scheme(s) must not - // conflict with the load balancing scheme of the backend service - // resources this Url map references. - // - // Possible values: - // "EXTERNAL" - Signifies that this will be used for Classic L7 - // External Load Balancing. - // "EXTERNAL_MANAGED" - Signifies that this will be used for - // Envoy-based L7 External Load Balancing. - // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - If unspecified, the - // validation will try to infer the scheme from the backend service - // resources this Url map references. If the inferrence is not possible, - // EXTERNAL will be used as the default type. - LoadBalancingSchemes []string `json:"loadBalancingSchemes,omitempty"` - - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` +// TargetPool: Represents a Target Pool resource. Target pools are used +// for network TCP/UDP load balancing. A target pool references member +// instances, an associated legacy HttpHealthCheck resource, and, +// optionally, a backup target pool. For more information, read Using +// target pools. +type TargetPool struct { + // BackupPool: The server-defined URL for the resource. This field is + // applicable only when the containing target pool is serving a + // forwarding rule as the primary pool, and its failoverRatio field is + // properly set to a value between [0, 1]. backupPool and failoverRatio + // together define the fallback behavior of the primary target pool: if + // the ratio of the healthy instances in the primary pool is at or below + // failoverRatio, traffic arriving at the load-balanced IP will be + // directed to the backup pool. In case where failoverRatio and + // backupPool are not set, or all the instances in the backup pool are + // unhealthy, the traffic will be directed back to the primary pool in + // the "force" mode, where traffic will be spread to the healthy + // instances with the best effort, or to all instances when no instance + // is healthy. + BackupPool string `json:"backupPool,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "LoadBalancingSchemes") 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:"-"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // NullFields is a list of field names (e.g. "LoadBalancingSchemes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` -func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsValidateRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // FailoverRatio: This field is applicable only when the containing + // target pool is serving a forwarding rule as the primary pool (i.e., + // not as a backup pool to some other target pool). The value of the + // field must be in [0, 1]. If set, backupPool must also be set. They + // together define the fallback behavior of the primary target pool: if + // the ratio of the healthy instances in the primary pool is at or below + // this number, traffic arriving at the load-balanced IP will be + // directed to the backup pool. In case where failoverRatio is not set + // or all the instances in the backup pool are unhealthy, the traffic + // will be directed back to the primary pool in the "force" mode, where + // traffic will be spread to the healthy instances with the best effort, + // or to all instances when no instance is healthy. + FailoverRatio float64 `json:"failoverRatio,omitempty"` -type UrlMapsValidateResponse struct { - Result *UrlMapValidationResult `json:"result,omitempty"` + // HealthChecks: The URL of the HttpHealthCheck resource. A member + // instance in this pool is considered healthy if and only if the health + // checks pass. Only legacy HttpHealthChecks are supported. Only one + // health check may be specified. + HealthChecks []string `json:"healthChecks,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Instances: A list of resource URLs to the virtual machine instances + // serving this pool. They must live in zones contained in the same + // region as this pool. + Instances []string `json:"instances,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#targetPool + // for target pools. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Region: [Output Only] URL of the region where the target pool + // resides. + Region string `json:"region,omitempty"` + + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this target pool. + SecurityPolicy string `json:"securityPolicy,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SessionAffinity: Session affinity option, must be one of the + // following values: NONE: Connections from the same client IP may go to + // any instance in the pool. CLIENT_IP: Connections from the same client + // IP will go to the same instance in the pool while that instance + // remains healthy. CLIENT_IP_PROTO: Connections from the same client IP + // with the same IP protocol will go to the same instance in the pool + // while that instance remains healthy. + // + // Possible values: + // "CLIENT_IP" - 2-tuple hash on packet's source and destination IP + // addresses. Connections from the same source IP address to the same + // destination IP address will be served by the same backend VM while + // that VM remains healthy. + // "CLIENT_IP_NO_DESTINATION" - 1-tuple hash only on packet's source + // IP address. Connections from the same source IP address will be + // served by the same backend VM while that VM remains healthy. This + // option can only be used for Internal TCP/UDP Load Balancing. + // "CLIENT_IP_PORT_PROTO" - 5-tuple hash on packet's source and + // destination IP addresses, IP protocol, and source and destination + // ports. Connections for the same IP protocol from the same source IP + // address and port to the same destination IP address and port will be + // served by the same backend VM while that VM remains healthy. This + // option cannot be used for HTTP(S) load balancing. + // "CLIENT_IP_PROTO" - 3-tuple hash on packet's source and destination + // IP addresses, and IP protocol. Connections for the same IP protocol + // from the same source IP address to the same destination IP address + // will be served by the same backend VM while that VM remains healthy. + // This option cannot be used for HTTP(S) load balancing. + // "GENERATED_COOKIE" - Hash based on a cookie generated by the L7 + // loadbalancer. Only valid for HTTP(S) load balancing. + // "HEADER_FIELD" - The hash is based on a user specified header + // field. + // "HTTP_COOKIE" - The hash is based on a user provided cookie. + // "NONE" - No session affinity. Connections from the same client IP + // may go to any instance in the pool. + SessionAffinity string `json:"sessionAffinity,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to + // ForceSendFields is a list of field names (e.g. "BackupPool") 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 @@ -58866,8 +57048,8 @@ type UrlMapsValidateResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BackupPool") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -58875,43 +57057,61 @@ type UrlMapsValidateResponse struct { NullFields []string `json:"-"` } -func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsValidateResponse +func (s *TargetPool) MarshalJSON() ([]byte, error) { + type NoMethod TargetPool raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlRewrite: The spec for modifying the path before sending the -// request to the matched backend service. -type UrlRewrite struct { - // HostRewrite: Before forwarding the request to the selected service, - // the request's host header is replaced with contents of hostRewrite. - // The value must be from 1 to 255 characters. - HostRewrite string `json:"hostRewrite,omitempty"` +func (s *TargetPool) UnmarshalJSON(data []byte) error { + type NoMethod TargetPool + var s1 struct { + FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FailoverRatio = float64(s1.FailoverRatio) + return nil +} - // PathPrefixRewrite: Before forwarding the request to the selected - // backend service, the matching portion of the request's path is - // replaced by pathPrefixRewrite. The value must be from 1 to 1024 - // characters. - PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` +type TargetPoolAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // PathTemplateRewrite: If specified, the pattern rewrites the URL path - // (based on the :path header) using the HTTP template syntax. A - // corresponding path_template_match must be specified. Any template - // variables must exist in the path_template_match field. - -At least - // one variable must be specified in the path_template_match field - You - // can omit variables from the rewritten URL - The * and ** operators - // cannot be matched unless they have a corresponding variable name - - // e.g. {format=*} or {var=**}. For example, a path_template_match of - // /static/{format=**} could be rewritten as /static/content/{format} to - // prefix /content to the URL. Variables can also be re-ordered in a - // rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as - // /content/{format}/{country}/{suffix}. At least one non-empty - // routeRules[].matchRules[].path_template_match is required. Only one - // of path_prefix_rewrite or path_template_rewrite may be specified. - PathTemplateRewrite string `json:"pathTemplateRewrite,omitempty"` + // Items: A list of TargetPool resources. + Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRewrite") to + // Kind: [Output Only] Type of resource. Always + // compute#targetPoolAggregatedList for aggregated lists of target + // pools. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *TargetPoolAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -58919,139 +57119,170 @@ type UrlRewrite struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRewrite") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *UrlRewrite) MarshalJSON() ([]byte, error) { - type NoMethod UrlRewrite +func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UsableSubnetwork: Subnetwork which the current user has -// compute.subnetworks.use permission on. -type UsableSubnetwork struct { - // ExternalIpv6Prefix: [Output Only] The external IPv6 address range - // that is assigned to this subnetwork. - ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` - - // InternalIpv6Prefix: [Output Only] The internal IPv6 address range - // that is assigned to this subnetwork. - InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` - - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. - IpCidrRange string `json:"ipCidrRange,omitempty"` - - // Ipv6AccessType: The access type of IPv6 address this subnet holds. - // It's immutable and can only be specified during creation or the first - // time the subnet is updated into IPV4_IPV6 dual stack. +// TargetPoolAggregatedListWarning: [Output Only] Informational warning +// message. +type TargetPoolAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. // // Possible values: - // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses - // that are accessible via the Internet, as well as the VPC network. - // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses - // that are only accessible over the VPC network. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // Network: Network URL. - Network string `json:"network,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*TargetPoolAggregatedListWarningData `json:"data,omitempty"` - // Purpose: The purpose of the resource. This field can be either - // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created - // subnetwork that is reserved for Internal HTTP(S) Load Balancing. If - // unspecified, the purpose defaults to PRIVATE_RFC_1918. The - // enableFlowLogs field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. - // - // Possible values: - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal - // HTTP(S) Load Balancing. - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_RFC_1918" - Regular user created or automatically created - // subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional - // Internal/External HTTP(S) Load Balancing. - Purpose string `json:"purpose,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // Role: The role of subnetwork. Currently, this field is only used when - // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to - // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being - // used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one - // that is ready to be promoted to ACTIVE or is currently draining. This - // field can be updated with a patch request. - // - // Possible values: - // "ACTIVE" - The ACTIVE subnet that is currently used. - // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. - Role string `json:"role,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // SecondaryIpRanges: Secondary IP ranges. - SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // StackType: The stack type for the subnet. If set to IPV4_ONLY, new - // VMs in the subnet are assigned IPv4 addresses only. If set to - // IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 - // addresses. If not specified, IPV4_ONLY is used. This field can be - // both set at resource creation time and updated using patch. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 - // addresses. - StackType string `json:"stackType,omitempty"` +func (s *TargetPoolAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Subnetwork: Subnetwork URL. - Subnetwork string `json:"subnetwork,omitempty"` +type TargetPoolAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExternalIpv6Prefix") - // to unconditionally include in API requests. By default, fields with + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with // empty 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. "ExternalIpv6Prefix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *UsableSubnetwork) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetwork +func (s *TargetPoolAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UsableSubnetworkSecondaryRange: Secondary IP range of a usable -// subnetwork. -type UsableSubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. - IpCidrRange string `json:"ipCidrRange,omitempty"` +type TargetPoolInstanceHealth struct { + HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - // RangeName: The name associated with this subnetwork secondary range, - // used when adding an alias IP range to a VM instance. The name must be - // 1-63 characters long, and comply with RFC1035. The name must be - // unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` + // Kind: [Output Only] Type of resource. Always + // compute#targetPoolInstanceHealth when checking the health of an + // instance. + Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "HealthStatus") 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 @@ -59059,7 +57290,7 @@ type UsableSubnetworkSecondaryRange struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include + // NullFields is a list of field names (e.g. "HealthStatus") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -59068,23 +57299,23 @@ type UsableSubnetworkSecondaryRange struct { NullFields []string `json:"-"` } -func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworkSecondaryRange +func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolInstanceHealth raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UsableSubnetworksAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. +// TargetPoolList: Contains a list of TargetPool resources. +type TargetPoolList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output] A list of usable subnetwork URLs. - Items []*UsableSubnetwork `json:"items,omitempty"` + // Items: A list of TargetPool resources. + Items []*TargetPool `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#usableSubnetworksAggregatedList for aggregated lists of - // usable subnetworks. + // Kind: [Output Only] Type of resource. Always compute#targetPoolList + // for lists of target pools. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -59092,16 +57323,14 @@ type UsableSubnetworksAggregatedList struct { // than maxResults, use the nextPageToken as a value for the query // parameter pageToken in the next list request. Subsequent list // requests will have their own nextPageToken to continue paging through - // the results. In special cases listUsable may return 0 subnetworks and - // nextPageToken which still should be used to get the next page of - // results. + // the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *UsableSubnetworksAggregatedListWarning `json:"warning,omitempty"` + Warning *TargetPoolListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -59124,15 +57353,14 @@ type UsableSubnetworksAggregatedList struct { NullFields []string `json:"-"` } -func (s *UsableSubnetworksAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedList +func (s *TargetPoolList) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UsableSubnetworksAggregatedListWarning: [Output Only] Informational -// warning message. -type UsableSubnetworksAggregatedListWarning struct { +// TargetPoolListWarning: [Output Only] Informational warning message. +type TargetPoolListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -59200,7 +57428,7 @@ type UsableSubnetworksAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*UsableSubnetworksAggregatedListWarningData `json:"data,omitempty"` + Data []*TargetPoolListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -59223,13 +57451,13 @@ type UsableSubnetworksAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *UsableSubnetworksAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedListWarning +func (s *TargetPoolListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type UsableSubnetworksAggregatedListWarningData struct { +type TargetPoolListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -59260,33 +57488,17 @@ type UsableSubnetworksAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *UsableSubnetworksAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedListWarningData +func (s *TargetPoolListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UsageExportLocation: The location in Cloud Storage and naming method -// of the daily usage report. Contains bucket_name and report_name -// prefix. -type UsageExportLocation struct { - // BucketName: The name of an existing bucket in Cloud Storage where the - // usage report object is stored. The Google Service Account is granted - // write access to this bucket. This can either be the bucket name by - // itself, such as example-bucket, or the bucket name with gs:// or - // https://storage.googleapis.com/ in front of it, such as - // gs://example-bucket. - BucketName string `json:"bucketName,omitempty"` - - // ReportNamePrefix: An optional prefix for the name of the usage report - // object stored in bucketName. If not supplied, defaults to usage_gce. - // The report is stored as a CSV file named - // report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the - // usage according to Pacific Time. If you supply a prefix, it should - // conform to Cloud Storage object naming conventions. - ReportNamePrefix string `json:"reportNamePrefix,omitempty"` +type TargetPoolsAddHealthCheckRequest struct { + // HealthChecks: The HttpHealthCheck to add to the target pool. + HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - // ForceSendFields is a list of field names (e.g. "BucketName") to + // ForceSendFields is a list of field names (e.g. "HealthChecks") 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 @@ -59294,30 +57506,32 @@ type UsageExportLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "HealthChecks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *UsageExportLocation) MarshalJSON() ([]byte, error) { - type NoMethod UsageExportLocation +func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolsAddHealthCheckRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmEndpointNatMappings: Contain information of Nat mapping for a VM -// endpoint (i.e., NIC). -type VmEndpointNatMappings struct { - // InstanceName: Name of the VM instance which the endpoint belongs to - InstanceName string `json:"instanceName,omitempty"` - - InterfaceNatMappings []*VmEndpointNatMappingsInterfaceNatMappings `json:"interfaceNatMappings,omitempty"` +type TargetPoolsAddInstanceRequest struct { + // Instances: A full or partial URL to an instance to add to this target + // pool. This can be a full or partial URL. For example, the following + // are valid URLs: - + // https://www.googleapis.com/compute/v1/projects/project-id/zones/zone + // /instances/instance-name - + // projects/project-id/zones/zone/instances/instance-name - + // zones/zone/instances/instance-name + Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceName") to + // ForceSendFields is a list of field names (e.g. "Instances") 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 @@ -59325,170 +57539,89 @@ type VmEndpointNatMappings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VmEndpointNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappings +func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolsAddInstanceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmEndpointNatMappingsInterfaceNatMappings: Contain information of Nat -// mapping for an interface of this endpoint. -type VmEndpointNatMappingsInterfaceNatMappings struct { - // DrainNatIpPortRanges: List of all drain IP:port-range mappings - // assigned to this interface. These ranges are inclusive, that is, both - // the first and the last ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. - DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` - - // NatIpPortRanges: A list of all IP:port-range mappings assigned to - // this interface. These ranges are inclusive, that is, both the first - // and the last ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. - NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` - - // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs - // allocated to this interface. It equals to the aggregated port number - // in the field drain_nat_ip_port_ranges. - NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` - - // NumTotalNatPorts: Total number of ports across all NAT IPs allocated - // to this interface. It equals to the aggregated port number in the - // field nat_ip_port_ranges. - NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` - - // RuleMappings: Information about mappings provided by rules in this - // NAT. - RuleMappings []*VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings `json:"ruleMappings,omitempty"` - - // SourceAliasIpRange: Alias IP range for this interface endpoint. It - // will be a private (RFC 1918) IP range. Examples: "10.33.4.55/32", or - // "192.168.5.0/24". - SourceAliasIpRange string `json:"sourceAliasIpRange,omitempty"` - - // SourceVirtualIp: Primary IP of the VM for this NIC. - SourceVirtualIp string `json:"sourceVirtualIp,omitempty"` +type TargetPoolsRemoveHealthCheckRequest struct { + // HealthChecks: Health check URL to be removed. This can be a full or + // valid partial URL. For example, the following are valid URLs: - + // https://www.googleapis.com/compute/beta/projects/project + // /global/httpHealthChecks/health-check - + // projects/project/global/httpHealthChecks/health-check - + // global/httpHealthChecks/health-check + HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DrainNatIpPortRanges") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "HealthChecks") 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. "DrainNatIpPortRanges") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "HealthChecks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VmEndpointNatMappingsInterfaceNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsInterfaceNatMappings +func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolsRemoveHealthCheckRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings: Contains -// information of NAT Mappings provided by a NAT Rule. -type VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings struct { - // DrainNatIpPortRanges: List of all drain IP:port-range mappings - // assigned to this interface by this rule. These ranges are inclusive, - // that is, both the first and the last ports can be used for NAT. - // Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. - DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` - - // NatIpPortRanges: A list of all IP:port-range mappings assigned to - // this interface by this rule. These ranges are inclusive, that is, - // both the first and the last ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. - NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` - - // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs - // allocated to this interface by this rule. It equals the aggregated - // port number in the field drain_nat_ip_port_ranges. - NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` - - // NumTotalNatPorts: Total number of ports across all NAT IPs allocated - // to this interface by this rule. It equals the aggregated port number - // in the field nat_ip_port_ranges. - NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` - - // RuleNumber: Rule number of the NAT Rule. - RuleNumber int64 `json:"ruleNumber,omitempty"` +type TargetPoolsRemoveInstanceRequest struct { + // Instances: URLs of the instances to be removed from target pool. + Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DrainNatIpPortRanges") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Instances") 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. "DrainNatIpPortRanges") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings +func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolsRemoveInstanceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmEndpointNatMappingsList: Contains a list of VmEndpointNatMappings. -type VmEndpointNatMappingsList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id string `json:"id,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#vmEndpointNatMappingsList for lists of Nat mappings of VM - // endpoints. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Result: [Output Only] A list of Nat mapping information of VM - // endpoints. - Result []*VmEndpointNatMappings `json:"result,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *VmEndpointNatMappingsListWarning `json:"warning,omitempty"` +type TargetPoolsScopedList struct { + // TargetPools: A list of target pools contained in this scope. + TargetPools []*TargetPool `json:"targetPools,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "TargetPools") 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 @@ -59496,24 +57629,24 @@ type VmEndpointNatMappingsList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "TargetPools") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VmEndpointNatMappingsList) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsList +func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmEndpointNatMappingsListWarning: [Output Only] Informational warning -// message. -type VmEndpointNatMappingsListWarning struct { +// TargetPoolsScopedListWarning: Informational warning which replaces +// the list of addresses when the list is empty. +type TargetPoolsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -59581,7 +57714,7 @@ type VmEndpointNatMappingsListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*VmEndpointNatMappingsListWarningData `json:"data,omitempty"` + Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -59604,13 +57737,13 @@ type VmEndpointNatMappingsListWarning struct { NullFields []string `json:"-"` } -func (s *VmEndpointNatMappingsListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarning +func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VmEndpointNatMappingsListWarningData struct { +type TargetPoolsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -59641,19 +57774,173 @@ type VmEndpointNatMappingsListWarningData struct { NullFields []string `json:"-"` } -func (s *VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarningData +func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetPoolsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGateway: Represents a HA VPN gateway. HA VPN is a -// high-availability (HA) Cloud VPN solution that lets you securely -// connect your on-premises network to your Google Cloud Virtual Private -// Cloud network through an IPsec VPN connection in a single region. For -// more information about Cloud HA VPN solutions, see Cloud VPN -// topologies . -type VpnGateway struct { +type TargetReference struct { + Target string `json:"target,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Target") 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. "Target") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetReference) MarshalJSON() ([]byte, error) { + type NoMethod TargetReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetSslProxiesSetBackendServiceRequest struct { + // Service: The URL of the new BackendService resource for the + // targetSslProxy. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Service") 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. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxiesSetBackendServiceRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetSslProxiesSetCertificateMapRequest struct { + // CertificateMap: URL of the Certificate Map to associate with this + // TargetSslProxy. Accepted format is + // //certificatemanager.googleapis.com/projects/{project + // }/locations/{location}/certificateMaps/{resourceName}. + CertificateMap string `json:"certificateMap,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CertificateMap") 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. "CertificateMap") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetSslProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxiesSetCertificateMapRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetSslProxiesSetProxyHeaderRequest struct { + // ProxyHeader: The new type of proxy header to append before sending + // data to the backend. NONE or PROXY_V1 are allowed. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ProxyHeader") 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. "ProxyHeader") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxiesSetProxyHeaderRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetSslProxiesSetSslCertificatesRequest struct { + // SslCertificates: New set of URLs to SslCertificate resources to + // associate with this TargetSslProxy. At least one SSL certificate must + // be specified. Currently, you may specify up to 15 SSL certificates. + SslCertificates []string `json:"sslCertificates,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SslCertificates") 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. "SslCertificates") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxiesSetSslCertificatesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetSslProxy: Represents a Target SSL Proxy resource. A target SSL +// proxy is a component of a SSL Proxy load balancer. Global forwarding +// rules reference a target SSL proxy, and the target proxy then +// references an external backend service. For more information, read +// Using Target Proxies. +type TargetSslProxy struct { + // CertificateMap: URL of a certificate map that identifies a + // certificate map associated with the given target proxy. This field + // can only be set for global target proxies. If set, sslCertificates + // will be ignored. Accepted format is + // //certificatemanager.googleapis.com/projects/{project + // }/locations/{location}/certificateMaps/{resourceName}. + CertificateMap string `json:"certificateMap,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -59662,39 +57949,14 @@ type VpnGateway struct { // property when you create the resource. Description string `json:"description,omitempty"` - // GatewayIpVersion: The IP family of the gateway IPs for the HA-VPN - // gateway interfaces. If not specified, IPV4 will be used. - // - // Possible values: - // "IPV4" - Every HA-VPN gateway interface is configured with an IPv4 - // address. - // "IPV6" - Every HA-VPN gateway interface is configured with an IPv6 - // address. - GatewayIpVersion string `json:"gatewayIpVersion,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. + // Kind: [Output Only] Type of the resource. Always + // compute#targetSslProxy for target SSL proxies. Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // VpnGateway, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels, otherwise the request will fail with error - // 412 conditionNotMet. To see the latest fingerprint, make a get() - // request to retrieve a VpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - - // Labels: Labels for this resource. These can only be added or modified - // by the setLabels method. Each label key/value pair must comply with - // RFC1035. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -59704,43 +57966,46 @@ type VpnGateway struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: URL of the network to which this VPN gateway is attached. - // Provided by the client when the VPN gateway is created. - Network string `json:"network,omitempty"` - - // Region: [Output Only] URL of the region where the VPN gateway - // resides. - Region string `json:"region,omitempty"` + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for this VPN gateway to identify the IP - // protocols that are enabled. Possible values are: IPV4_ONLY, - // IPV4_IPV6. If not specified, IPV4_ONLY will be used. - // - // Possible values: - // "IPV4_IPV6" - Enable VPN gateway with both IPv4 and IPv6 protocols. - // "IPV4_ONLY" - Enable VPN gateway with only IPv4 protocol. - StackType string `json:"stackType,omitempty"` + // Service: URL to the BackendService resource. + Service string `json:"service,omitempty"` - // VpnInterfaces: The list of VPN interfaces associated with this VPN - // gateway. - VpnInterfaces []*VpnGatewayVpnGatewayInterface `json:"vpnInterfaces,omitempty"` + // SslCertificates: URLs to SslCertificate resources that are used to + // authenticate connections to Backends. At least one SSL certificate + // must be specified. Currently, you may specify up to 15 SSL + // certificates. sslCertificates do not apply when the load balancing + // scheme is set to INTERNAL_SELF_MANAGED. + SslCertificates []string `json:"sslCertificates,omitempty"` + + // SslPolicy: URL of SslPolicy resource that will be associated with the + // TargetSslProxy resource. If not set, the TargetSslProxy resource will + // not have any SSL policy configured. + SslPolicy string `json:"sslPolicy,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CertificateMap") 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. "CreationTimestamp") to + // NullFields is a list of field names (e.g. "CertificateMap") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -59750,22 +58015,22 @@ type VpnGateway struct { NullFields []string `json:"-"` } -func (s *VpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod VpnGateway +func (s *TargetSslProxy) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnGatewayAggregatedList struct { +// TargetSslProxyList: Contains a list of TargetSslProxy resources. +type TargetSslProxyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of VpnGateway resources. - Items map[string]VpnGatewaysScopedList `json:"items,omitempty"` + // Items: A list of TargetSslProxy resources. + Items []*TargetSslProxy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -59779,11 +58044,8 @@ type VpnGatewayAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnGatewayAggregatedListWarning `json:"warning,omitempty"` + Warning *TargetSslProxyListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -59806,15 +58068,15 @@ type VpnGatewayAggregatedList struct { NullFields []string `json:"-"` } -func (s *VpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedList +func (s *TargetSslProxyList) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxyList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewayAggregatedListWarning: [Output Only] Informational warning +// TargetSslProxyListWarning: [Output Only] Informational warning // message. -type VpnGatewayAggregatedListWarning struct { +type TargetSslProxyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -59882,7 +58144,7 @@ type VpnGatewayAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*VpnGatewayAggregatedListWarningData `json:"data,omitempty"` + Data []*TargetSslProxyListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -59905,13 +58167,13 @@ type VpnGatewayAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *VpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedListWarning +func (s *TargetSslProxyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxyListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnGatewayAggregatedListWarningData struct { +type TargetSslProxyListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -59942,44 +58204,21 @@ type VpnGatewayAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *VpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedListWarningData +func (s *TargetSslProxyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetSslProxyListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewayList: Contains a list of VpnGateway resources. -type VpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of VpnGateway resources. - Items []*VpnGateway `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *VpnGatewayListWarning `json:"warning,omitempty"` +type TargetTcpProxiesScopedList struct { + // TargetTcpProxies: A list of TargetTcpProxies contained in this scope. + TargetTcpProxies []*TargetTcpProxy `json:"targetTcpProxies,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *TargetTcpProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "TargetTcpProxies") 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 @@ -59987,23 +58226,25 @@ type VpnGatewayList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "TargetTcpProxies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *VpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayList +func (s *TargetTcpProxiesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewayListWarning: [Output Only] Informational warning message. -type VpnGatewayListWarning struct { +// TargetTcpProxiesScopedListWarning: Informational warning which +// replaces the list of backend services when the list is empty. +type TargetTcpProxiesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -60071,7 +58312,7 @@ type VpnGatewayListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*VpnGatewayListWarningData `json:"data,omitempty"` + Data []*TargetTcpProxiesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -60094,13 +58335,13 @@ type VpnGatewayListWarning struct { NullFields []string `json:"-"` } -func (s *VpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayListWarning +func (s *TargetTcpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnGatewayListWarningData struct { +type TargetTcpProxiesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -60131,17 +58372,18 @@ type VpnGatewayListWarningData struct { NullFields []string `json:"-"` } -func (s *VpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayListWarningData +func (s *TargetTcpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnGatewayStatus struct { - // VpnConnections: List of VPN connection for this VpnGateway. - VpnConnections []*VpnGatewayStatusVpnConnection `json:"vpnConnections,omitempty"` +type TargetTcpProxiesSetBackendServiceRequest struct { + // Service: The URL of the new BackendService resource for the + // targetTcpProxy. + Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnConnections") to + // ForceSendFields is a list of field names (e.g. "Service") 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 @@ -60149,52 +58391,31 @@ type VpnGatewayStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnConnections") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VpnGatewayStatus) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatus +func (s *TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesSetBackendServiceRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewayStatusHighAvailabilityRequirementState: Describes the high -// availability requirement state for the VPN connection between this -// Cloud VPN gateway and a peer gateway. -type VpnGatewayStatusHighAvailabilityRequirementState struct { - // State: Indicates the high availability requirement state for the VPN - // connection. Valid values are CONNECTION_REDUNDANCY_MET, - // CONNECTION_REDUNDANCY_NOT_MET. - // - // Possible values: - // "CONNECTION_REDUNDANCY_MET" - VPN tunnels are configured with - // adequate redundancy from Cloud VPN gateway to the peer VPN gateway. - // For both GCP-to-non-GCP and GCP-to-GCP connections, the adequate - // redundancy is a pre-requirement for users to get 99.99% availability - // on GCP side; please note that for any connection, end-to-end 99.99% - // availability is subject to proper configuration on the peer VPN - // gateway. - // "CONNECTION_REDUNDANCY_NOT_MET" - VPN tunnels are not configured - // with adequate redundancy from the Cloud VPN gateway to the peer - // gateway - State string `json:"state,omitempty"` - - // UnsatisfiedReason: Indicates the reason why the VPN connection does - // not meet the high availability redundancy criteria/requirement. Valid - // values is INCOMPLETE_TUNNELS_COVERAGE. +type TargetTcpProxiesSetProxyHeaderRequest struct { + // ProxyHeader: The new type of proxy header to append before sending + // data to the backend. NONE or PROXY_V1 are allowed. // // Possible values: - // "INCOMPLETE_TUNNELS_COVERAGE" - UnsatisfiedReason string `json:"unsatisfiedReason,omitempty"` + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to + // ForceSendFields is a list of field names (e.g. "ProxyHeader") 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 @@ -60202,45 +58423,95 @@ type VpnGatewayStatusHighAvailabilityRequirementState struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ProxyHeader") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VpnGatewayStatusHighAvailabilityRequirementState) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusHighAvailabilityRequirementState +func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxiesSetProxyHeaderRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewayStatusTunnel: Contains some information about a VPN tunnel. -type VpnGatewayStatusTunnel struct { - // LocalGatewayInterface: The VPN gateway interface this VPN tunnel is - // associated with. - LocalGatewayInterface int64 `json:"localGatewayInterface,omitempty"` +// TargetTcpProxy: Represents a Target TCP Proxy resource. A target TCP +// proxy is a component of a TCP Proxy load balancer. Global forwarding +// rules reference target TCP proxy, and the target proxy then +// references an external backend service. For more information, read +// TCP Proxy Load Balancing overview. +type TargetTcpProxy struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // PeerGatewayInterface: The peer gateway interface this VPN tunnel is - // connected to, the peer gateway could either be an external VPN - // gateway or a Google Cloud VPN gateway. - PeerGatewayInterface int64 `json:"peerGatewayInterface,omitempty"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // TunnelUrl: URL reference to the VPN tunnel. - TunnelUrl string `json:"tunnelUrl,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "LocalGatewayInterface") 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. + // Kind: [Output Only] Type of the resource. Always + // compute#targetTcpProxy for target TCP proxies. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // ProxyBind: This field only applies when the forwarding rule that + // references this target proxy has a loadBalancingScheme set to + // INTERNAL_SELF_MANAGED. When this field is set to true, Envoy proxies + // set up inbound traffic interception and bind to the IP address and + // port specified in the forwarding rule. This is generally useful when + // using Traffic Director to configure Envoy as a gateway or middle + // proxy (in other words, not a sidecar proxy). The Envoy proxy listens + // for inbound requests and handles requests when it receives them. The + // default is false. + ProxyBind bool `json:"proxyBind,omitempty"` + + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` + + // Region: [Output Only] URL of the region where the regional TCP proxy + // resides. This field is not applicable to global TCP proxy. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Service: URL to the BackendService resource. + Service string `json:"service,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty 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. "LocalGatewayInterface") to + // NullFields is a list of field names (e.g. "CreationTimestamp") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -60250,90 +58521,145 @@ type VpnGatewayStatusTunnel struct { NullFields []string `json:"-"` } -func (s *VpnGatewayStatusTunnel) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusTunnel +func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewayStatusVpnConnection: A VPN connection contains all VPN -// tunnels connected from this VpnGateway to the same peer gateway. The -// peer gateway could either be an external VPN gateway or a Google -// Cloud VPN gateway. -type VpnGatewayStatusVpnConnection struct { - // PeerExternalGateway: URL reference to the peer external VPN gateways - // to which the VPN tunnels in this VPN connection are connected. This - // field is mutually exclusive with peer_gcp_gateway. - PeerExternalGateway string `json:"peerExternalGateway,omitempty"` +type TargetTcpProxyAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // PeerGcpGateway: URL reference to the peer side VPN gateways to which - // the VPN tunnels in this VPN connection are connected. This field is - // mutually exclusive with peer_gcp_gateway. - PeerGcpGateway string `json:"peerGcpGateway,omitempty"` + // Items: A list of TargetTcpProxiesScopedList resources. + Items map[string]TargetTcpProxiesScopedList `json:"items,omitempty"` - // State: HighAvailabilityRequirementState for the VPN connection. - State *VpnGatewayStatusHighAvailabilityRequirementState `json:"state,omitempty"` + // Kind: [Output Only] Type of resource. Always + // compute#targetTcpProxyAggregatedList for lists of Target TCP Proxies. + Kind string `json:"kind,omitempty"` - // Tunnels: List of VPN tunnels that are in this VPN connection. - Tunnels []*VpnGatewayStatusTunnel `json:"tunnels,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "PeerExternalGateway") - // to unconditionally include in API requests. By default, fields with + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *TargetTcpProxyAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with // empty 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. "PeerExternalGateway") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VpnGatewayStatusVpnConnection) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusVpnConnection +func (s *TargetTcpProxyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewayVpnGatewayInterface: A VPN gateway interface. -type VpnGatewayVpnGatewayInterface struct { - // Id: [Output Only] Numeric identifier for this VPN interface - // associated with the VPN gateway. - Id int64 `json:"id,omitempty"` - - // InterconnectAttachment: URL of the VLAN attachment - // (interconnectAttachment) resource for this VPN gateway interface. - // When the value of this field is present, the VPN gateway is used for - // HA VPN over Cloud Interconnect; all egress or ingress traffic for - // this VPN gateway interface goes through the specified VLAN attachment - // resource. - InterconnectAttachment string `json:"interconnectAttachment,omitempty"` +// TargetTcpProxyAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetTcpProxyAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // IpAddress: [Output Only] IP address for this VPN interface associated - // with the VPN gateway. The IP address could be either a regional - // external IP address or a regional internal IP address. The two IP - // addresses for a VPN gateway must be all regional external or regional - // internal IP addresses. There cannot be a mix of regional external IP - // addresses and regional internal IP addresses. For HA VPN over Cloud - // Interconnect, the IP addresses for both interfaces could either be - // regional internal IP addresses or regional external IP addresses. For - // regular (non HA VPN over Cloud Interconnect) HA VPN tunnels, the IP - // address must be a regional external IP address. - IpAddress string `json:"ipAddress,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*TargetTcpProxyAggregatedListWarningData `json:"data,omitempty"` - // Ipv6Address: [Output Only] IPv6 address for this VPN interface - // associated with the VPN gateway. The IPv6 address must be a regional - // external IPv6 address. The format is RFC 5952 format (e.g. - // 2001:db8::2d9:51:0:0). - Ipv6Address string `json:"ipv6Address,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -60341,7 +58667,7 @@ type VpnGatewayVpnGatewayInterface struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "Code") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -60350,20 +58676,27 @@ type VpnGatewayVpnGatewayInterface struct { NullFields []string `json:"-"` } -func (s *VpnGatewayVpnGatewayInterface) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayVpnGatewayInterface +func (s *TargetTcpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnGatewaysGetStatusResponse struct { - Result *VpnGatewayStatus `json:"result,omitempty"` +type TargetTcpProxyAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Result") to + // ForceSendFields is a list of field names (e.g. "Key") 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 @@ -60371,7 +58704,7 @@ type VpnGatewaysGetStatusResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API + // NullFields is a list of field names (e.g. "Key") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -60380,22 +58713,43 @@ type VpnGatewaysGetStatusResponse struct { NullFields []string `json:"-"` } -func (s *VpnGatewaysGetStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysGetStatusResponse +func (s *TargetTcpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnGatewaysScopedList struct { - // VpnGateways: [Output Only] A list of VPN gateways contained in this - // scope. - VpnGateways []*VpnGateway `json:"vpnGateways,omitempty"` +// TargetTcpProxyList: Contains a list of TargetTcpProxy resources. +type TargetTcpProxyList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of addresses when the list is empty. - Warning *VpnGatewaysScopedListWarning `json:"warning,omitempty"` + // Items: A list of TargetTcpProxy resources. + Items []*TargetTcpProxy `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnGateways") to + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *TargetTcpProxyListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -60403,24 +58757,24 @@ type VpnGatewaysScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnGateways") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *VpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedList +func (s *TargetTcpProxyList) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnGatewaysScopedListWarning: [Output Only] Informational warning -// which replaces the list of addresses when the list is empty. -type VpnGatewaysScopedListWarning struct { +// TargetTcpProxyListWarning: [Output Only] Informational warning +// message. +type TargetTcpProxyListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -60488,7 +58842,7 @@ type VpnGatewaysScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*VpnGatewaysScopedListWarningData `json:"data,omitempty"` + Data []*TargetTcpProxyListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -60511,13 +58865,13 @@ type VpnGatewaysScopedListWarning struct { NullFields []string `json:"-"` } -func (s *VpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedListWarning +func (s *TargetTcpProxyListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnGatewaysScopedListWarningData struct { +type TargetTcpProxyListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -60548,15 +58902,16 @@ type VpnGatewaysScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedListWarningData +func (s *TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetTcpProxyListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnel: Represents a Cloud VPN Tunnel resource. For more -// information about VPN, read the the Cloud VPN Overview. -type VpnTunnel struct { +// TargetVpnGateway: Represents a Target VPN Gateway resource. The +// target VPN gateway resource represents a Classic Cloud VPN gateway. +// For more information, read the the Cloud VPN Overview. +type TargetVpnGateway struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -60565,31 +58920,27 @@ type VpnTunnel struct { // property when you create the resource. Description string `json:"description,omitempty"` - // DetailedStatus: [Output Only] Detailed status message for the VPN - // tunnel. - DetailedStatus string `json:"detailedStatus,omitempty"` + // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule + // resources. ForwardingRules are created using + // compute.forwardingRules.insert and associated with a VPN gateway. + ForwardingRules []string `json:"forwardingRules,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // IkeVersion: IKE protocol version to use when establishing the VPN - // tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. - // The default version is 2. - IkeVersion int64 `json:"ikeVersion,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. + // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway + // for target VPN gateways. Kind string `json:"kind,omitempty"` // LabelFingerprint: A fingerprint for the labels being applied to this - // VpnTunnel, which is essentially a hash of the labels set used for - // optimistic locking. The fingerprint is initially generated by Compute - // Engine and changes after every request to modify or update labels. - // You must always provide an up-to-date fingerprint hash in order to - // update or change labels, otherwise the request will fail with error - // 412 conditionNotMet. To see the latest fingerprint, make a get() - // request to retrieve a VpnTunnel. + // TargetVpnGateway, which is essentially a hash of the labels set used + // for optimistic locking. The fingerprint is initially generated by + // Compute Engine and changes after every request to modify or update + // labels. You must always provide an up-to-date fingerprint hash in + // order to update or change labels, otherwise the request will fail + // with error 412 conditionNotMet. To see the latest fingerprint, make a + // get() request to retrieve a TargetVpnGateway. LabelFingerprint string `json:"labelFingerprint,omitempty"` // Labels: Labels for this resource. These can only be added or modified @@ -60597,12 +58948,6 @@ type VpnTunnel struct { // RFC1035. Label values may be empty. Labels map[string]string `json:"labels,omitempty"` - // LocalTrafficSelector: Local traffic selector to use when establishing - // the VPN tunnel with the peer VPN gateway. The value should be a CIDR - // formatted string, for example: 192.168.0.0/16. The ranges must be - // disjoint. Only IPv4 is supported. - LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` - // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -60612,115 +58957,32 @@ type VpnTunnel struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // PeerExternalGateway: URL of the peer side external VPN gateway to - // which this VPN tunnel is connected. Provided by the client when the - // VPN tunnel is created. This field is exclusive with the field - // peerGcpGateway. - PeerExternalGateway string `json:"peerExternalGateway,omitempty"` - - // PeerExternalGatewayInterface: The interface ID of the external VPN - // gateway to which this VPN tunnel is connected. Provided by the client - // when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, - // `3`. The number of IDs in use depends on the external VPN gateway - // redundancy type. - PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` - - // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this - // VPN tunnel is connected. Provided by the client when the VPN tunnel - // is created. This field can be used when creating highly available VPN - // from VPC network to VPC network, the field is exclusive with the - // field peerExternalGateway. If provided, the VPN tunnel will - // automatically use the same vpnGatewayInterface ID in the peer GCP VPN - // gateway. - PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. - PeerIp string `json:"peerIp,omitempty"` + // Network: URL of the network to which this VPN gateway is attached. + // Provided by the client when the VPN gateway is created. + Network string `json:"network,omitempty"` - // Region: [Output Only] URL of the region where the VPN tunnel resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. + // Region: [Output Only] URL of the region where the target VPN gateway + // resides. You must specify this field as part of the HTTP request URL. + // It is not settable as a field in the request body. Region string `json:"region,omitempty"` - // RemoteTrafficSelector: Remote traffic selectors to use when - // establishing the VPN tunnel with the peer VPN gateway. The value - // should be a CIDR formatted string, for example: 192.168.0.0/16. The - // ranges should be disjoint. Only IPv4 is supported. - RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - - // Router: URL of the router resource to be used for dynamic routing. - Router string `json:"router,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // SharedSecret: Shared secret used to set the secure session between - // the Cloud VPN gateway and the peer VPN gateway. - SharedSecret string `json:"sharedSecret,omitempty"` - - // SharedSecretHash: Hash of the shared secret. - SharedSecretHash string `json:"sharedSecretHash,omitempty"` - - // Status: [Output Only] The status of the VPN tunnel, which can be one - // of the following: - PROVISIONING: Resource is being allocated for the - // VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all - // VPN-related configs from the user. Network, TargetVpnGateway, - // VpnTunnel, ForwardingRule, and Route resources are needed to setup - // the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with - // the peer VPN. - ESTABLISHED: Secure session is successfully - // established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced - // by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for - // example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - // - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - // - FAILED: Tunnel creation has failed and the tunnel is not ready to - // be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - - // REJECTED: Tunnel configuration was rejected, can be result of being - // denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of - // allocating all required resources. - STOPPED: Tunnel is stopped due - // to its Forwarding Rules being deleted for Classic VPN tunnels or the - // project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity - // does not match peer IP, probably behind NAT. - - // TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for - // an HA-VPN tunnel. + // Status: [Output Only] The status of the VPN gateway, which can be one + // of the following: CREATING, READY, FAILED, or DELETING. // // Possible values: - // "ALLOCATING_RESOURCES" - Cloud VPN is in the process of allocating - // all required resources (specifically, a borg task). - // "AUTHORIZATION_ERROR" - Auth error (e.g. bad shared secret). - // "DEPROVISIONING" - Resources is being deallocated for the VPN - // tunnel. - // "ESTABLISHED" - Secure session is successfully established with - // peer VPN. - // "FAILED" - Tunnel creation has failed and the tunnel is not ready - // to be used. - // "FIRST_HANDSHAKE" - Successful first handshake with peer VPN. - // "NEGOTIATION_FAILURE" - Handshake failed. - // "NETWORK_ERROR" - Deprecated, replaced by NO_INCOMING_PACKETS - // "NO_INCOMING_PACKETS" - No incoming packets from peer - // "PROVISIONING" - Resource is being allocated for the VPN tunnel. - // "REJECTED" - Tunnel configuration was rejected, can be result of - // being denylisted. - // "STOPPED" - Tunnel is stopped due to its Forwarding Rules being - // deleted. - // "WAITING_FOR_FULL_CONFIG" - Waiting to receive all VPN-related - // configs from user. Network, TargetVpnGateway, VpnTunnel, - // ForwardingRule and Route resources are needed to setup VPN tunnel. + // "CREATING" + // "DELETING" + // "FAILED" + // "READY" Status string `json:"status,omitempty"` - // TargetVpnGateway: URL of the Target VPN gateway with which this VPN - // tunnel is associated. Provided by the client when the VPN tunnel is - // created. - TargetVpnGateway string `json:"targetVpnGateway,omitempty"` - - // VpnGateway: URL of the VPN gateway with which this VPN tunnel is - // associated. Provided by the client when the VPN tunnel is created. - // This must be used (instead of target_vpn_gateway) if a High - // Availability VPN gateway resource is created. - VpnGateway string `json:"vpnGateway,omitempty"` - - // VpnGatewayInterface: The interface ID of the VPN gateway with which - // this VPN tunnel is associated. Possible values are: `0`, `1`. - VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` + // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. + // VpnTunnels are created using the compute.vpntunnels.insert method and + // associated with a VPN gateway. + Tunnels []string `json:"tunnels,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -60744,22 +59006,22 @@ type VpnTunnel struct { NullFields []string `json:"-"` } -func (s *VpnTunnel) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnel +func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGateway raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnTunnelAggregatedList struct { +type TargetVpnGatewayAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of VpnTunnelsScopedList resources. - Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` + // Items: A list of TargetVpnGateway resources. + Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. + // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway + // for target VPN gateways. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -60777,7 +59039,7 @@ type VpnTunnelAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *VpnTunnelAggregatedListWarning `json:"warning,omitempty"` + Warning *TargetVpnGatewayAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -60800,15 +59062,15 @@ type VpnTunnelAggregatedList struct { NullFields []string `json:"-"` } -func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedList +func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewayAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnelAggregatedListWarning: [Output Only] Informational warning -// message. -type VpnTunnelAggregatedListWarning struct { +// TargetVpnGatewayAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetVpnGatewayAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -60876,7 +59138,7 @@ type VpnTunnelAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*VpnTunnelAggregatedListWarningData `json:"data,omitempty"` + Data []*TargetVpnGatewayAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -60899,13 +59161,13 @@ type VpnTunnelAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *VpnTunnelAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedListWarning +func (s *TargetVpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewayAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnTunnelAggregatedListWarningData struct { +type TargetVpnGatewayAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -60936,23 +59198,23 @@ type VpnTunnelAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *VpnTunnelAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedListWarningData +func (s *TargetVpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewayAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnelList: Contains a list of VpnTunnel resources. -type VpnTunnelList struct { +// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. +type TargetVpnGatewayList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of VpnTunnel resources. - Items []*VpnTunnel `json:"items,omitempty"` + // Items: A list of TargetVpnGateway resources. + Items []*TargetVpnGateway `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. + // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway + // for target VPN gateways. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -60967,7 +59229,7 @@ type VpnTunnelList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *VpnTunnelListWarning `json:"warning,omitempty"` + Warning *TargetVpnGatewayListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -60990,14 +59252,15 @@ type VpnTunnelList struct { NullFields []string `json:"-"` } -func (s *VpnTunnelList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelList +func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewayList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnelListWarning: [Output Only] Informational warning message. -type VpnTunnelListWarning struct { +// TargetVpnGatewayListWarning: [Output Only] Informational warning +// message. +type TargetVpnGatewayListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -61065,7 +59328,7 @@ type VpnTunnelListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*VpnTunnelListWarningData `json:"data,omitempty"` + Data []*TargetVpnGatewayListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -61088,13 +59351,13 @@ type VpnTunnelListWarning struct { NullFields []string `json:"-"` } -func (s *VpnTunnelListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelListWarning +func (s *TargetVpnGatewayListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewayListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnTunnelListWarningData struct { +type TargetVpnGatewayListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -61125,46 +59388,48 @@ type VpnTunnelListWarningData struct { NullFields []string `json:"-"` } -func (s *VpnTunnelListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelListWarningData +func (s *TargetVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewayListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnTunnelsScopedList struct { - // VpnTunnels: A list of VPN tunnels contained in this scope. - VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` +type TargetVpnGatewaysScopedList struct { + // TargetVpnGateways: [Output Only] A list of target VPN gateways + // contained in this scope. + TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"` + // Warning: [Output Only] Informational warning which replaces the list + // of addresses when the list is empty. + Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnTunnels") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "TargetVpnGateways") + // 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. "VpnTunnels") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "TargetVpnGateways") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedList +func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewaysScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnelsScopedListWarning: Informational warning which replaces the -// list of addresses when the list is empty. -type VpnTunnelsScopedListWarning struct { +// TargetVpnGatewaysScopedListWarning: [Output Only] Informational +// warning which replaces the list of addresses when the list is empty. +type TargetVpnGatewaysScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -61232,7 +59497,7 @@ type VpnTunnelsScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"` + Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -61255,13 +59520,13 @@ type VpnTunnelsScopedListWarning struct { NullFields []string `json:"-"` } -func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedListWarning +func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewaysScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type VpnTunnelsScopedListWarningData struct { +type TargetVpnGatewaysScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -61292,28 +59557,47 @@ type VpnTunnelsScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedListWarningData +func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetVpnGatewaysScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type WafExpressionSet struct { - // Aliases: A list of alternate IDs. The format should be: - E.g. - // XSS-stable Generic suffix like "stable" is particularly useful if a - // policy likes to avail newer set of expressions without having to - // change the policy. A given alias name can't be used for more than one - // entity set. - Aliases []string `json:"aliases,omitempty"` +type TestFailure struct { + // ActualOutputUrl: The actual output URL evaluated by a load balancer + // containing the scheme, host, path and query parameters. + ActualOutputUrl string `json:"actualOutputUrl,omitempty"` - // Expressions: List of available expressions. - Expressions []*WafExpressionSetExpression `json:"expressions,omitempty"` + // ActualRedirectResponseCode: Actual HTTP status code for rule with + // `urlRedirect` calculated by load balancer + ActualRedirectResponseCode int64 `json:"actualRedirectResponseCode,omitempty"` - // Id: Google specified expression set ID. The format should be: - E.g. - // XSS-20170329 required - Id string `json:"id,omitempty"` + // ActualService: BackendService or BackendBucket returned by load + // balancer. + ActualService string `json:"actualService,omitempty"` - // ForceSendFields is a list of field names (e.g. "Aliases") to + // ExpectedOutputUrl: The expected output URL evaluated by a load + // balancer containing the scheme, host, path and query parameters. + ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` + + // ExpectedRedirectResponseCode: Expected HTTP status code for rule with + // `urlRedirect` calculated by load balancer + ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` + + // ExpectedService: Expected BackendService or BackendBucket resource + // the given URL should be mapped to. + ExpectedService string `json:"expectedService,omitempty"` + + // Headers: HTTP headers of the request. + Headers []*UrlMapTestHeader `json:"headers,omitempty"` + + // Host: Host portion of the URL. + Host string `json:"host,omitempty"` + + // Path: Path portion including query parameters in the URL. + Path string `json:"path,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActualOutputUrl") 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 @@ -61321,36 +59605,29 @@ type WafExpressionSet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Aliases") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ActualOutputUrl") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *WafExpressionSet) MarshalJSON() ([]byte, error) { - type NoMethod WafExpressionSet +func (s *TestFailure) MarshalJSON() ([]byte, error) { + type NoMethod TestFailure raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type WafExpressionSetExpression struct { - // Id: Expression ID should uniquely identify the origin of the - // expression. E.g. owasp-crs-v020901-id973337 identifies Owasp core - // rule set version 2.9.1 rule id 973337. The ID could be used to - // determine the individual attack definition that has been detected. It - // could also be used to exclude it from the policy in case of false - // positive. required - Id string `json:"id,omitempty"` - - // Sensitivity: The sensitivity value associated with the WAF rule ID. - // This corresponds to the ModSecurity paranoia level, ranging from 1 to - // 4. 0 is reserved for opt-in only rules. - Sensitivity int64 `json:"sensitivity,omitempty"` +type TestPermissionsRequest struct { + // Permissions: The set of permissions to check for the 'resource'. + // Permissions with wildcards (such as '*' or 'storage.*') are not + // allowed. + Permissions []string `json:"permissions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Permissions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -61358,52 +59635,31 @@ type WafExpressionSetExpression struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *WafExpressionSetExpression) MarshalJSON() ([]byte, error) { - type NoMethod WafExpressionSetExpression +func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestPermissionsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WeightedBackendService: In contrast to a single BackendService in -// HttpRouteAction to which all matching traffic is directed to, -// WeightedBackendService allows traffic to be split across multiple -// backend services. The volume of traffic for each backend service is -// proportional to the weight specified in each WeightedBackendService -type WeightedBackendService struct { - // BackendService: The full or partial URL to the default BackendService - // resource. Before forwarding the request to backendService, the load - // balancer applies any relevant headerActions specified as part of this - // backendServiceWeight. - BackendService string `json:"backendService,omitempty"` - - // HeaderAction: Specifies changes to request and response headers that - // need to take effect for the selected backendService. headerAction - // specified here take effect before headerAction in the enclosing - // HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported - // for load balancers that have their loadBalancingScheme set to - // EXTERNAL. Not supported when the URL map is bound to a target gRPC - // proxy that has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` +type TestPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` - // Weight: Specifies the fraction of traffic sent to a backend service, - // computed as weight / (sum of all weightedBackendService weights in - // routeAction) . The selection of a backend service is determined only - // for new traffic. Once a user's request has been directed to a backend - // service, subsequent requests are sent to the same backend service as - // determined by the backend service's session affinity policy. The - // value must be from 0 to 1000. - Weight int64 `json:"weight,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BackendService") to + // ForceSendFields is a list of field names (e.g. "Permissions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -61411,53 +59667,27 @@ type WeightedBackendService struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *WeightedBackendService) MarshalJSON() ([]byte, error) { - type NoMethod WeightedBackendService +func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestPermissionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type XpnHostList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: [Output Only] A list of shared VPC host project URLs. - Items []*Project `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always compute#xpnHostList for - // lists of shared VPC hosts. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *XpnHostListWarning `json:"warning,omitempty"` +type Uint128 struct { + High uint64 `json:"high,omitempty,string"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + Low uint64 `json:"low,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "High") 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 @@ -61465,7 +59695,7 @@ type XpnHostList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "High") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -61474,64 +59704,287 @@ type XpnHostList struct { NullFields []string `json:"-"` } -func (s *XpnHostList) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostList +func (s *Uint128) MarshalJSON() ([]byte, error) { + type NoMethod Uint128 raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// XpnHostListWarning: [Output Only] Informational warning message. -type XpnHostListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a +// UrlMap: Represents a URL Map resource. Compute Engine has two URL Map +// resources: * Global (/compute/docs/reference/rest/beta/urlMaps) * +// Regional (/compute/docs/reference/rest/beta/regionUrlMaps) A URL map +// resource is a component of certain types of cloud load balancers and +// Traffic Director: * urlMaps are used by external HTTP(S) load +// balancers and Traffic Director. * regionUrlMaps are used by internal +// HTTP(S) load balancers. For a list of supported URL map features by +// the load balancer type, see the Load balancing features: Routing and +// traffic management table. For a list of supported URL map features +// for Traffic Director, see the Traffic Director features: Routing and +// traffic management table. This resource defines mappings from +// hostnames and URL paths to either a backend service or a backend +// bucket. To use the global urlMaps resource, the backend service must +// have a loadBalancingScheme of either EXTERNAL or +// INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend +// service must have a loadBalancingScheme of INTERNAL_MANAGED. For more +// information, read URL Map Concepts. +type UrlMap struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy + // specifies how the Load Balancer returns error responses when + // BackendServiceor BackendBucket responds with an error. This policy + // takes effect at the Load Balancer level and applies only when no + // policy has been defined for the error code at lower levels like + // PathMatcher, RouteRule and PathRule within this UrlMap. For example, + // consider a UrlMap with the following configuration: - + // defaultCustomErrorResponsePolicy containing policies for responding + // to 5xx and 4xx errors - A PathMatcher configured for *.example.com + // has defaultCustomErrorResponsePolicy for 4xx. If a request for + // http://www.example.com/ encounters a 404, the policy in + // pathMatcher.defaultCustomErrorResponsePolicy will be enforced. When + // the request for http://www.example.com/ encounters a 502, the policy + // in UrlMap.defaultCustomErrorResponsePolicy will be enforced. When a + // request that does not match any host in *.example.com such as + // http://www.myotherexample.com/, encounters a 404, + // UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in + // conjunction with defaultRouteAction.retryPolicy, retries take + // precedence. Only once all retries are exhausted, the + // defaultCustomErrorResponsePolicy is applied. While attempting a + // retry, if load balancer is successful in reaching the service, the + // defaultCustomErrorResponsePolicy is ignored and the response from the + // service is returned to the client. defaultCustomErrorResponsePolicy + // is supported only for Global External HTTP(S) load balancing. + DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` + + // DefaultRouteAction: defaultRouteAction takes effect when none of the + // hostRules match. The load balancer performs advanced routing actions, + // such as URL rewrites and header transformations, before forwarding + // the request to the selected backend. If defaultRouteAction specifies + // any weightedBackendServices, defaultService must not be set. + // Conversely if defaultService is set, defaultRouteAction cannot + // contain any weightedBackendServices. Only one of defaultRouteAction + // or defaultUrlRedirect must be set. URL maps for Classic external + // HTTP(S) load balancers only support the urlRewrite action within + // defaultRouteAction. defaultRouteAction has no effect when the URL map + // is bound to a target gRPC proxy that has the validateForProxyless + // field set to true. + DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` + + // DefaultService: The full or partial URL of the defaultService + // resource to which traffic is directed if none of the hostRules match. + // If defaultRouteAction is also specified, advanced routing actions, + // such as URL rewrites, take effect before sending the request to the + // backend. However, if defaultService is specified, defaultRouteAction + // cannot contain any weightedBackendServices. Conversely, if + // routeAction specifies any weightedBackendServices, service must not + // be specified. Only one of defaultService, defaultUrlRedirect , or + // defaultRouteAction.weightedBackendService must be set. defaultService + // has no effect when the URL map is bound to a target gRPC proxy that + // has the validateForProxyless field set to true. + DefaultService string `json:"defaultService,omitempty"` + + // DefaultUrlRedirect: When none of the specified hostRules match, the + // request is redirected to a URL specified by defaultUrlRedirect. If + // defaultUrlRedirect is specified, defaultService or defaultRouteAction + // must not be set. Not supported when the URL map is bound to a target + // gRPC proxy. + DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field is ignored when inserting a UrlMap. An up-to-date fingerprint + // must be provided in order to update the UrlMap, otherwise the request + // will fail with error 412 conditionNotMet. To see the latest + // fingerprint, make a get() request to retrieve a UrlMap. + Fingerprint string `json:"fingerprint,omitempty"` + + // HeaderAction: Specifies changes to request and response headers that + // need to take effect for the selected backendService. The headerAction + // specified here take effect after headerAction specified under + // pathMatcher. headerAction is not supported for load balancers that + // have their loadBalancingScheme set to EXTERNAL. Not supported when + // the URL map is bound to a target gRPC proxy that has + // validateForProxyless field set to true. + HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + + // HostRules: The list of host rules to use against the URL. + HostRules []*HostRule `json:"hostRules,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always compute#urlMaps for + // url maps. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // PathMatchers: The list of named PathMatchers to use against the URL. + PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` + + // Region: [Output Only] URL of the region where the regional URL map + // resides. This field is not applicable to global URL maps. You must + // specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Tests: The list of expected URL mapping tests. Request to update the + // UrlMap succeeds only if all test cases pass. You can specify a + // maximum of 100 tests per UrlMap. Not supported when the URL map is + // bound to a target gRPC proxy that has validateForProxyless field set + // to true. + Tests []*UrlMapTest `json:"tests,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UrlMap) MarshalJSON() ([]byte, error) { + type NoMethod UrlMap + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlMapList: Contains a list of UrlMap resources. +type UrlMapList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of UrlMap resources. + Items []*UrlMap `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *UrlMapListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapList) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlMapListWarning: [Output Only] Informational warning message. +type UrlMapListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a // resource is in use. // "RESOURCE_NOT_DELETED" - One or more of the resources set to // auto-delete could not be deleted because they were in use. @@ -61549,7 +60002,7 @@ type XpnHostListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*XpnHostListWarningData `json:"data,omitempty"` + Data []*UrlMapListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -61572,13 +60025,13 @@ type XpnHostListWarning struct { NullFields []string `json:"-"` } -func (s *XpnHostListWarning) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostListWarning +func (s *UrlMapListWarning) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type XpnHostListWarningData struct { +type UrlMapListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -61609,27 +60062,16 @@ type XpnHostListWarningData struct { NullFields []string `json:"-"` } -func (s *XpnHostListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostListWarningData +func (s *UrlMapListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// XpnResourceId: Service resource (a.k.a service project) ID. -type XpnResourceId struct { - // Id: The ID of the service resource. In the case of projects, this - // field supports project id (e.g., my-project-123) and project number - // (e.g. 12345678). - Id string `json:"id,omitempty"` - - // Type: The type of the service resource. - // - // Possible values: - // "PROJECT" - // "XPN_RESOURCE_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` +type UrlMapReference struct { + UrlMap string `json:"urlMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "UrlMap") 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 @@ -61637,7 +60079,7 @@ type XpnResourceId struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API + // NullFields is a list of field names (e.g. "UrlMap") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -61646,97 +60088,155 @@ type XpnResourceId struct { NullFields []string `json:"-"` } -func (s *XpnResourceId) MarshalJSON() ([]byte, error) { - type NoMethod XpnResourceId +func (s *UrlMapReference) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Zone: Represents a Zone resource. A zone is a deployment area. These -// deployment areas are subsets of a region. For example the zone -// us-east1-a is located in the us-east1 region. For more information, -// read Regions and Zones. -type Zone struct { - // AvailableCpuPlatforms: [Output Only] Available cpu/platform - // selections for the zone. - AvailableCpuPlatforms []string `json:"availableCpuPlatforms,omitempty"` +// UrlMapTest: Message for the expected URL mappings. +type UrlMapTest struct { + // Description: Description of this test case. + Description string `json:"description,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` + // ExpectedOutputUrl: The expected output URL evaluated by the load + // balancer containing the scheme, host, path and query parameters. For + // rules that forward requests to backends, the test passes only when + // expectedOutputUrl matches the request forwarded by the load balancer + // to backends. For rules with urlRewrite, the test verifies that the + // forwarded request matches hostRewrite and pathPrefixRewrite in the + // urlRewrite action. When service is specified, expectedOutputUrl`s + // scheme is ignored. For rules with urlRedirect, the test passes only + // if expectedOutputUrl matches the URL in the load balancer's redirect + // response. If urlRedirect specifies https_redirect, the test passes + // only if the scheme in expectedOutputUrl is also set to HTTPS. If + // urlRedirect specifies strip_query, the test passes only if + // expectedOutputUrl does not contain any query parameters. + // expectedOutputUrl is optional when service is specified. + ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with - // this zone. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + // ExpectedRedirectResponseCode: For rules with urlRedirect, the test + // passes only if expectedRedirectResponseCode matches the HTTP status + // code in load balancer's redirect response. + // expectedRedirectResponseCode cannot be set when service is set. + ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` + // Headers: HTTP headers for this request. If headers contains a host + // header, then host must also match the header value. + Headers []*UrlMapTestHeader `json:"headers,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` + // Host: Host portion of the URL. If headers contains a host header, + // then host must also match the header value. + Host string `json:"host,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#zone for - // zones. - Kind string `json:"kind,omitempty"` + // Path: Path portion of the URL. + Path string `json:"path,omitempty"` - // Name: [Output Only] Name of the resource. + // Service: Expected BackendService or BackendBucket resource the given + // URL should be mapped to. The service field cannot be set if + // expectedRedirectResponseCode is set. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapTest) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapTest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlMapTestHeader: HTTP headers used in UrlMapTests. +type UrlMapTestHeader struct { + // Name: Header name. Name string `json:"name,omitempty"` - // Region: [Output Only] Full URL reference to the region which hosts - // the zone. - Region string `json:"region,omitempty"` + // Value: Header value. + Value string `json:"value,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // 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:"-"` - // Status: [Output Only] Status of the zone, either UP or DOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` + // 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:"-"` +} - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` +func (s *UrlMapTestHeader) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapTestHeader + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// UrlMapValidationResult: Message representing the validation result +// for a UrlMap. +type UrlMapValidationResult struct { + LoadErrors []string `json:"loadErrors,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AvailableCpuPlatforms") 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. + // LoadSucceeded: Whether the given UrlMap can be successfully loaded. + // If false, 'loadErrors' indicates the reasons. + LoadSucceeded bool `json:"loadSucceeded,omitempty"` + + TestFailures []*TestFailure `json:"testFailures,omitempty"` + + // TestPassed: If successfully loaded, this field indicates whether the + // test passed. If false, 'testFailures's indicate the reason of + // failure. + TestPassed bool `json:"testPassed,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LoadErrors") 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. "AvailableCpuPlatforms") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "LoadErrors") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Zone) MarshalJSON() ([]byte, error) { - type NoMethod Zone +func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapValidationResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ZoneList: Contains a list of zone resources. -type ZoneList struct { +type UrlMapsAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of Zone resources. - Items []*Zone `json:"items,omitempty"` + // Items: A list of UrlMapsScopedList resources. + Items map[string]UrlMapsScopedList `json:"items,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` @@ -61752,8 +60252,11 @@ type ZoneList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *ZoneListWarning `json:"warning,omitempty"` + Warning *UrlMapsAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -61776,14 +60279,15 @@ type ZoneList struct { NullFields []string `json:"-"` } -func (s *ZoneList) MarshalJSON() ([]byte, error) { - type NoMethod ZoneList +func (s *UrlMapsAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ZoneListWarning: [Output Only] Informational warning message. -type ZoneListWarning struct { +// UrlMapsAggregatedListWarning: [Output Only] Informational warning +// message. +type UrlMapsAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -61851,7 +60355,7 @@ type ZoneListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ZoneListWarningData `json:"data,omitempty"` + Data []*UrlMapsAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -61874,13 +60378,13 @@ type ZoneListWarning struct { NullFields []string `json:"-"` } -func (s *ZoneListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ZoneListWarning +func (s *UrlMapsAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ZoneListWarningData struct { +type UrlMapsAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -61911,25 +60415,21 @@ type ZoneListWarningData struct { NullFields []string `json:"-"` } -func (s *ZoneListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ZoneListWarningData +func (s *UrlMapsAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ZoneSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` +type UrlMapsScopedList struct { + // UrlMaps: A list of UrlMaps contained in this scope. + UrlMaps []*UrlMap `json:"urlMaps,omitempty"` - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *UrlMapsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to + // ForceSendFields is a list of field names (e.g. "UrlMaps") 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 @@ -61937,7 +60437,196 @@ type ZoneSetLabelsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to + // NullFields is a list of field names (e.g. "UrlMaps") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlMapsScopedListWarning: Informational warning which replaces the +// list of backend services when the list is empty. +type UrlMapsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*UrlMapsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UrlMapsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UrlMapsValidateRequest struct { + // LoadBalancingSchemes: Specifies the load balancer type(s) this + // validation request is for. Use EXTERNAL_MANAGED for HTTP/HTTPS + // External Global Load Balancer with Advanced Traffic Management. Use + // EXTERNAL for Classic HTTP/HTTPS External Global Load Balancer. Other + // load balancer types are not supported. For more information, refer to + // Choosing a load balancer. If unspecified, the load balancing scheme + // will be inferred from the backend service resources this URL map + // references. If that can not be inferred (for example, this URL map + // only references backend buckets, or this Url map is for rewrites and + // redirects only and doesn't reference any backends), EXTERNAL will be + // used as the default type. If specified, the scheme(s) must not + // conflict with the load balancing scheme of the backend service + // resources this Url map references. + // + // Possible values: + // "EXTERNAL" - Signifies that this will be used for Classic L7 + // External Load Balancing. + // "EXTERNAL_MANAGED" - Signifies that this will be used for + // Envoy-based L7 External Load Balancing. + // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - If unspecified, the + // validation will try to infer the scheme from the backend service + // resources this Url map references. If the inferrence is not possible, + // EXTERNAL will be used as the default type. + LoadBalancingSchemes []string `json:"loadBalancingSchemes,omitempty"` + + // Resource: Content of the UrlMap to be validated. + Resource *UrlMap `json:"resource,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LoadBalancingSchemes") 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. "LoadBalancingSchemes") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -61947,28 +60636,277 @@ type ZoneSetLabelsRequest struct { NullFields []string `json:"-"` } -func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetLabelsRequest +func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsValidateRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ZoneSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` +type UrlMapsValidateResponse struct { + Result *UrlMapValidationResult `json:"result,omitempty"` - // Etag: Flatten Policy to create a backward compatible wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // Policy: REQUIRED: The complete policy to be applied to the - // 'resource'. The size of the policy is limited to a few 10s of KB. An - // empty policy is in general a valid policy but certain services (like - // Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Bindings") to + // NullFields is a list of field names (e.g. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsValidateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlRewrite: The spec for modifying the path before sending the +// request to the matched backend service. +type UrlRewrite struct { + // HostRewrite: Before forwarding the request to the selected service, + // the request's host header is replaced with contents of hostRewrite. + // The value must be from 1 to 255 characters. + HostRewrite string `json:"hostRewrite,omitempty"` + + // PathPrefixRewrite: Before forwarding the request to the selected + // backend service, the matching portion of the request's path is + // replaced by pathPrefixRewrite. The value must be from 1 to 1024 + // characters. + PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` + + // PathTemplateRewrite: If specified, the pattern rewrites the URL path + // (based on the :path header) using the HTTP template syntax. A + // corresponding path_template_match must be specified. Any template + // variables must exist in the path_template_match field. - -At least + // one variable must be specified in the path_template_match field - You + // can omit variables from the rewritten URL - The * and ** operators + // cannot be matched unless they have a corresponding variable name - + // e.g. {format=*} or {var=**}. For example, a path_template_match of + // /static/{format=**} could be rewritten as /static/content/{format} to + // prefix /content to the URL. Variables can also be re-ordered in a + // rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as + // /content/{format}/{country}/{suffix}. At least one non-empty + // routeRules[].matchRules[].path_template_match is required. Only one + // of path_prefix_rewrite or path_template_rewrite may be specified. + PathTemplateRewrite string `json:"pathTemplateRewrite,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostRewrite") 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. "HostRewrite") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlRewrite) MarshalJSON() ([]byte, error) { + type NoMethod UrlRewrite + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UsableSubnetwork: Subnetwork which the current user has +// compute.subnetworks.use permission on. +type UsableSubnetwork struct { + // ExternalIpv6Prefix: [Output Only] The external IPv6 address range + // that is assigned to this subnetwork. + ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` + + // InternalIpv6Prefix: [Output Only] The internal IPv6 address range + // that is assigned to this subnetwork. + InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` + + // IpCidrRange: The range of internal addresses that are owned by this + // subnetwork. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Ipv6AccessType: The access type of IPv6 address this subnet holds. + // It's immutable and can only be specified during creation or the first + // time the subnet is updated into IPV4_IPV6 dual stack. + // + // Possible values: + // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses + // that are accessible via the Internet, as well as the VPC network. + // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses + // that are only accessible over the VPC network. + Ipv6AccessType string `json:"ipv6AccessType,omitempty"` + + // Network: Network URL. + Network string `json:"network,omitempty"` + + // Purpose: The purpose of the resource. This field can be either + // PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or + // INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in + // auto mode networks. A subnet with purpose set to + // REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved + // for regional Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private + // Service Connect. A subnet with purpose set to + // INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used + // only by regional internal HTTP(S) load balancers. Note that + // REGIONAL_MANAGED_PROXY is the preferred setting for all regional + // Envoy load balancers. If unspecified, the subnet purpose defaults to + // PRIVATE. The enableFlowLogs field isn't supported if the subnet + // purpose field is set to REGIONAL_MANAGED_PROXY. + // + // Possible values: + // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal + // HTTP(S) Load Balancing. + // "PRIVATE" - Regular user created or automatically created subnet. + // "PRIVATE_RFC_1918" - Regular user created or automatically created + // subnet. + // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service + // Connect in the producer network. + // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional + // Internal/External HTTP(S) Load Balancing. + Purpose string `json:"purpose,omitempty"` + + // Role: The role of subnetwork. Currently, this field is only used when + // purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + // BACKUP. An ACTIVE subnetwork is one that is currently being used for + // Envoy-based load balancers in a region. A BACKUP subnetwork is one + // that is ready to be promoted to ACTIVE or is currently draining. This + // field can be updated with a patch request. + // + // Possible values: + // "ACTIVE" - The ACTIVE subnet that is currently used. + // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. + Role string `json:"role,omitempty"` + + // SecondaryIpRanges: Secondary IP ranges. + SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` + + // StackType: The stack type for the subnet. If set to IPV4_ONLY, new + // VMs in the subnet are assigned IPv4 addresses only. If set to + // IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 + // addresses. If not specified, IPV4_ONLY is used. This field can be + // both set at resource creation time and updated using patch. + // + // Possible values: + // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 + // addresses. + // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 + // addresses. + StackType string `json:"stackType,omitempty"` + + // Subnetwork: Subnetwork URL. + Subnetwork string `json:"subnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExternalIpv6Prefix") + // 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. "ExternalIpv6Prefix") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UsableSubnetwork) MarshalJSON() ([]byte, error) { + type NoMethod UsableSubnetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UsableSubnetworkSecondaryRange: Secondary IP range of a usable +// subnetwork. +type UsableSubnetworkSecondaryRange struct { + // IpCidrRange: The range of IP addresses belonging to this subnetwork + // secondary range. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // RangeName: The name associated with this subnetwork secondary range, + // used when adding an alias IP range to a VM instance. The name must be + // 1-63 characters long, and comply with RFC1035. The name must be + // unique within the subnetwork. + RangeName string `json:"rangeName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpCidrRange") 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. "IpCidrRange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { + type NoMethod UsableSubnetworkSecondaryRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UsableSubnetworksAggregatedList struct { + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` + + // Items: [Output] A list of usable subnetwork URLs. + Items []*UsableSubnetwork `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#usableSubnetworksAggregatedList for aggregated lists of + // usable subnetworks. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. In special cases listUsable may return 0 subnetworks and + // nextPageToken which still should be used to get the next page of + // results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *UsableSubnetworksAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -61976,38 +60914,6150 @@ type ZoneSetPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsableSubnetworksAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod UsableSubnetworksAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UsableSubnetworksAggregatedListWarning: [Output Only] Informational +// warning message. +type UsableSubnetworksAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*UsableSubnetworksAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsableSubnetworksAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod UsableSubnetworksAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UsableSubnetworksAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsableSubnetworksAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod UsableSubnetworksAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UsageExportLocation: The location in Cloud Storage and naming method +// of the daily usage report. Contains bucket_name and report_name +// prefix. +type UsageExportLocation struct { + // BucketName: The name of an existing bucket in Cloud Storage where the + // usage report object is stored. The Google Service Account is granted + // write access to this bucket. This can either be the bucket name by + // itself, such as example-bucket, or the bucket name with gs:// or + // https://storage.googleapis.com/ in front of it, such as + // gs://example-bucket. + BucketName string `json:"bucketName,omitempty"` + + // ReportNamePrefix: An optional prefix for the name of the usage report + // object stored in bucketName. If not supplied, defaults to usage_gce. + // The report is stored as a CSV file named + // report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the + // usage according to Pacific Time. If you supply a prefix, it should + // conform to Cloud Storage object naming conventions. + ReportNamePrefix string `json:"reportNamePrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BucketName") 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. "BucketName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UsageExportLocation) MarshalJSON() ([]byte, error) { + type NoMethod UsageExportLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmEndpointNatMappings: Contain information of Nat mapping for a VM +// endpoint (i.e., NIC). +type VmEndpointNatMappings struct { + // InstanceName: Name of the VM instance which the endpoint belongs to + InstanceName string `json:"instanceName,omitempty"` + + InterfaceNatMappings []*VmEndpointNatMappingsInterfaceNatMappings `json:"interfaceNatMappings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstanceName") 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. "InstanceName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmEndpointNatMappings) MarshalJSON() ([]byte, error) { + type NoMethod VmEndpointNatMappings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmEndpointNatMappingsInterfaceNatMappings: Contain information of Nat +// mapping for an interface of this endpoint. +type VmEndpointNatMappingsInterfaceNatMappings struct { + // DrainNatIpPortRanges: List of all drain IP:port-range mappings + // assigned to this interface. These ranges are inclusive, that is, both + // the first and the last ports can be used for NAT. Example: + // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` + + // NatIpPortRanges: A list of all IP:port-range mappings assigned to + // this interface. These ranges are inclusive, that is, both the first + // and the last ports can be used for NAT. Example: + // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` + + // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs + // allocated to this interface. It equals to the aggregated port number + // in the field drain_nat_ip_port_ranges. + NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` + + // NumTotalNatPorts: Total number of ports across all NAT IPs allocated + // to this interface. It equals to the aggregated port number in the + // field nat_ip_port_ranges. + NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` + + // RuleMappings: Information about mappings provided by rules in this + // NAT. + RuleMappings []*VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings `json:"ruleMappings,omitempty"` + + // SourceAliasIpRange: Alias IP range for this interface endpoint. It + // will be a private (RFC 1918) IP range. Examples: "10.33.4.55/32", or + // "192.168.5.0/24". + SourceAliasIpRange string `json:"sourceAliasIpRange,omitempty"` + + // SourceVirtualIp: Primary IP of the VM for this NIC. + SourceVirtualIp string `json:"sourceVirtualIp,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DrainNatIpPortRanges") 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. "DrainNatIpPortRanges") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VmEndpointNatMappingsInterfaceNatMappings) MarshalJSON() ([]byte, error) { + type NoMethod VmEndpointNatMappingsInterfaceNatMappings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings: Contains +// information of NAT Mappings provided by a NAT Rule. +type VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings struct { + // DrainNatIpPortRanges: List of all drain IP:port-range mappings + // assigned to this interface by this rule. These ranges are inclusive, + // that is, both the first and the last ports can be used for NAT. + // Example: ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` + + // NatIpPortRanges: A list of all IP:port-range mappings assigned to + // this interface by this rule. These ranges are inclusive, that is, + // both the first and the last ports can be used for NAT. Example: + // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` + + // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs + // allocated to this interface by this rule. It equals the aggregated + // port number in the field drain_nat_ip_port_ranges. + NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` + + // NumTotalNatPorts: Total number of ports across all NAT IPs allocated + // to this interface by this rule. It equals the aggregated port number + // in the field nat_ip_port_ranges. + NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` + + // RuleNumber: Rule number of the NAT Rule. + RuleNumber int64 `json:"ruleNumber,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DrainNatIpPortRanges") 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. "DrainNatIpPortRanges") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) MarshalJSON() ([]byte, error) { + type NoMethod VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmEndpointNatMappingsList: Contains a list of VmEndpointNatMappings. +type VmEndpointNatMappingsList struct { + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#vmEndpointNatMappingsList for lists of Nat mappings of VM + // endpoints. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Result: [Output Only] A list of Nat mapping information of VM + // endpoints. + Result []*VmEndpointNatMappings `json:"result,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VmEndpointNatMappingsListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmEndpointNatMappingsList) MarshalJSON() ([]byte, error) { + type NoMethod VmEndpointNatMappingsList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmEndpointNatMappingsListWarning: [Output Only] Informational warning +// message. +type VmEndpointNatMappingsListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*VmEndpointNatMappingsListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmEndpointNatMappingsListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VmEndpointNatMappingsListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VmEndpointNatMappingsListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VmEndpointNatMappingsListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGateway: Represents a HA VPN gateway. HA VPN is a +// high-availability (HA) Cloud VPN solution that lets you securely +// connect your on-premises network to your Google Cloud Virtual Private +// Cloud network through an IPsec VPN connection in a single region. For +// more information about Cloud HA VPN solutions, see Cloud VPN +// topologies . +type VpnGateway struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // GatewayIpVersion: The IP family of the gateway IPs for the HA-VPN + // gateway interfaces. If not specified, IPV4 will be used. + // + // Possible values: + // "IPV4" - Every HA-VPN gateway interface is configured with an IPv4 + // address. + // "IPV6" - Every HA-VPN gateway interface is configured with an IPv6 + // address. + GatewayIpVersion string `json:"gatewayIpVersion,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // VpnGateway, which is essentially a hash of the labels set used for + // optimistic locking. The fingerprint is initially generated by Compute + // Engine and changes after every request to modify or update labels. + // You must always provide an up-to-date fingerprint hash in order to + // update or change labels, otherwise the request will fail with error + // 412 conditionNotMet. To see the latest fingerprint, make a get() + // request to retrieve a VpnGateway. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels for this resource. These can only be added or modified + // by the setLabels method. Each label key/value pair must comply with + // RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: URL of the network to which this VPN gateway is attached. + // Provided by the client when the VPN gateway is created. + Network string `json:"network,omitempty"` + + // Region: [Output Only] URL of the region where the VPN gateway + // resides. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // StackType: The stack type for this VPN gateway to identify the IP + // protocols that are enabled. Possible values are: IPV4_ONLY, + // IPV4_IPV6. If not specified, IPV4_ONLY will be used. + // + // Possible values: + // "IPV4_IPV6" - Enable VPN gateway with both IPv4 and IPv6 protocols. + // "IPV4_ONLY" - Enable VPN gateway with only IPv4 protocol. + StackType string `json:"stackType,omitempty"` + + // VpnInterfaces: The list of VPN interfaces associated with this VPN + // gateway. + VpnInterfaces []*VpnGatewayVpnGatewayInterface `json:"vpnInterfaces,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGateway) MarshalJSON() ([]byte, error) { + type NoMethod VpnGateway + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnGateway resources. + Items map[string]VpnGatewaysScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnGatewayAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayAggregatedListWarning: [Output Only] Informational warning +// message. +type VpnGatewayAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*VpnGatewayAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayList: Contains a list of VpnGateway resources. +type VpnGatewayList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnGateway resources. + Items []*VpnGateway `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnGatewayListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayListWarning: [Output Only] Informational warning message. +type VpnGatewayListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*VpnGatewayListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayStatus struct { + // VpnConnections: List of VPN connection for this VpnGateway. + VpnConnections []*VpnGatewayStatusVpnConnection `json:"vpnConnections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpnConnections") 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. "VpnConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatus) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusHighAvailabilityRequirementState: Describes the high +// availability requirement state for the VPN connection between this +// Cloud VPN gateway and a peer gateway. +type VpnGatewayStatusHighAvailabilityRequirementState struct { + // State: Indicates the high availability requirement state for the VPN + // connection. Valid values are CONNECTION_REDUNDANCY_MET, + // CONNECTION_REDUNDANCY_NOT_MET. + // + // Possible values: + // "CONNECTION_REDUNDANCY_MET" - VPN tunnels are configured with + // adequate redundancy from Cloud VPN gateway to the peer VPN gateway. + // For both GCP-to-non-GCP and GCP-to-GCP connections, the adequate + // redundancy is a pre-requirement for users to get 99.99% availability + // on GCP side; please note that for any connection, end-to-end 99.99% + // availability is subject to proper configuration on the peer VPN + // gateway. + // "CONNECTION_REDUNDANCY_NOT_MET" - VPN tunnels are not configured + // with adequate redundancy from the Cloud VPN gateway to the peer + // gateway + State string `json:"state,omitempty"` + + // UnsatisfiedReason: Indicates the reason why the VPN connection does + // not meet the high availability redundancy criteria/requirement. Valid + // values is INCOMPLETE_TUNNELS_COVERAGE. + // + // Possible values: + // "INCOMPLETE_TUNNELS_COVERAGE" + UnsatisfiedReason string `json:"unsatisfiedReason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "State") 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. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusHighAvailabilityRequirementState) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusHighAvailabilityRequirementState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusTunnel: Contains some information about a VPN tunnel. +type VpnGatewayStatusTunnel struct { + // LocalGatewayInterface: The VPN gateway interface this VPN tunnel is + // associated with. + LocalGatewayInterface int64 `json:"localGatewayInterface,omitempty"` + + // PeerGatewayInterface: The peer gateway interface this VPN tunnel is + // connected to, the peer gateway could either be an external VPN + // gateway or a Google Cloud VPN gateway. + PeerGatewayInterface int64 `json:"peerGatewayInterface,omitempty"` + + // TunnelUrl: URL reference to the VPN tunnel. + TunnelUrl string `json:"tunnelUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LocalGatewayInterface") 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. "LocalGatewayInterface") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusTunnel) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusTunnel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusVpnConnection: A VPN connection contains all VPN +// tunnels connected from this VpnGateway to the same peer gateway. The +// peer gateway could either be an external VPN gateway or a Google +// Cloud VPN gateway. +type VpnGatewayStatusVpnConnection struct { + // PeerExternalGateway: URL reference to the peer external VPN gateways + // to which the VPN tunnels in this VPN connection are connected. This + // field is mutually exclusive with peer_gcp_gateway. + PeerExternalGateway string `json:"peerExternalGateway,omitempty"` + + // PeerGcpGateway: URL reference to the peer side VPN gateways to which + // the VPN tunnels in this VPN connection are connected. This field is + // mutually exclusive with peer_gcp_gateway. + PeerGcpGateway string `json:"peerGcpGateway,omitempty"` + + // State: HighAvailabilityRequirementState for the VPN connection. + State *VpnGatewayStatusHighAvailabilityRequirementState `json:"state,omitempty"` + + // Tunnels: List of VPN tunnels that are in this VPN connection. + Tunnels []*VpnGatewayStatusTunnel `json:"tunnels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PeerExternalGateway") + // 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. "PeerExternalGateway") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusVpnConnection) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusVpnConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayVpnGatewayInterface: A VPN gateway interface. +type VpnGatewayVpnGatewayInterface struct { + // Id: [Output Only] Numeric identifier for this VPN interface + // associated with the VPN gateway. + Id int64 `json:"id,omitempty"` + + // InterconnectAttachment: URL of the VLAN attachment + // (interconnectAttachment) resource for this VPN gateway interface. + // When the value of this field is present, the VPN gateway is used for + // HA VPN over Cloud Interconnect; all egress or ingress traffic for + // this VPN gateway interface goes through the specified VLAN attachment + // resource. + InterconnectAttachment string `json:"interconnectAttachment,omitempty"` + + // IpAddress: [Output Only] IP address for this VPN interface associated + // with the VPN gateway. The IP address could be either a regional + // external IP address or a regional internal IP address. The two IP + // addresses for a VPN gateway must be all regional external or regional + // internal IP addresses. There cannot be a mix of regional external IP + // addresses and regional internal IP addresses. For HA VPN over Cloud + // Interconnect, the IP addresses for both interfaces could either be + // regional internal IP addresses or regional external IP addresses. For + // regular (non HA VPN over Cloud Interconnect) HA VPN tunnels, the IP + // address must be a regional external IP address. + IpAddress string `json:"ipAddress,omitempty"` + + // Ipv6Address: [Output Only] IPv6 address for this VPN interface + // associated with the VPN gateway. The IPv6 address must be a regional + // external IPv6 address. The format is RFC 5952 format (e.g. + // 2001:db8::2d9:51:0:0). + Ipv6Address string `json:"ipv6Address,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayVpnGatewayInterface) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayVpnGatewayInterface + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysGetStatusResponse struct { + Result *VpnGatewayStatus `json:"result,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysGetStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysGetStatusResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysScopedList struct { + // VpnGateways: [Output Only] A list of VPN gateways contained in this + // scope. + VpnGateways []*VpnGateway `json:"vpnGateways,omitempty"` + + // Warning: [Output Only] Informational warning which replaces the list + // of addresses when the list is empty. + Warning *VpnGatewaysScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpnGateways") 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. "VpnGateways") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewaysScopedListWarning: [Output Only] Informational warning +// which replaces the list of addresses when the list is empty. +type VpnGatewaysScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*VpnGatewaysScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnTunnel: Represents a Cloud VPN Tunnel resource. For more +// information about VPN, read the the Cloud VPN Overview. +type VpnTunnel struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // DetailedStatus: [Output Only] Detailed status message for the VPN + // tunnel. + DetailedStatus string `json:"detailedStatus,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // IkeVersion: IKE protocol version to use when establishing the VPN + // tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. + // The default version is 2. + IkeVersion int64 `json:"ikeVersion,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for + // VPN tunnels. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // VpnTunnel, which is essentially a hash of the labels set used for + // optimistic locking. The fingerprint is initially generated by Compute + // Engine and changes after every request to modify or update labels. + // You must always provide an up-to-date fingerprint hash in order to + // update or change labels, otherwise the request will fail with error + // 412 conditionNotMet. To see the latest fingerprint, make a get() + // request to retrieve a VpnTunnel. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels for this resource. These can only be added or modified + // by the setLabels method. Each label key/value pair must comply with + // RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // LocalTrafficSelector: Local traffic selector to use when establishing + // the VPN tunnel with the peer VPN gateway. The value should be a CIDR + // formatted string, for example: 192.168.0.0/16. The ranges must be + // disjoint. Only IPv4 is supported. + LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // PeerExternalGateway: URL of the peer side external VPN gateway to + // which this VPN tunnel is connected. Provided by the client when the + // VPN tunnel is created. This field is exclusive with the field + // peerGcpGateway. + PeerExternalGateway string `json:"peerExternalGateway,omitempty"` + + // PeerExternalGatewayInterface: The interface ID of the external VPN + // gateway to which this VPN tunnel is connected. Provided by the client + // when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, + // `3`. The number of IDs in use depends on the external VPN gateway + // redundancy type. + PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` + + // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this + // VPN tunnel is connected. Provided by the client when the VPN tunnel + // is created. This field can be used when creating highly available VPN + // from VPC network to VPC network, the field is exclusive with the + // field peerExternalGateway. If provided, the VPN tunnel will + // automatically use the same vpnGatewayInterface ID in the peer GCP VPN + // gateway. + PeerGcpGateway string `json:"peerGcpGateway,omitempty"` + + // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. + PeerIp string `json:"peerIp,omitempty"` + + // Region: [Output Only] URL of the region where the VPN tunnel resides. + // You must specify this field as part of the HTTP request URL. It is + // not settable as a field in the request body. + Region string `json:"region,omitempty"` + + // RemoteTrafficSelector: Remote traffic selectors to use when + // establishing the VPN tunnel with the peer VPN gateway. The value + // should be a CIDR formatted string, for example: 192.168.0.0/16. The + // ranges should be disjoint. Only IPv4 is supported. + RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` + + // Router: URL of the router resource to be used for dynamic routing. + Router string `json:"router,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SharedSecret: Shared secret used to set the secure session between + // the Cloud VPN gateway and the peer VPN gateway. + SharedSecret string `json:"sharedSecret,omitempty"` + + // SharedSecretHash: Hash of the shared secret. + SharedSecretHash string `json:"sharedSecretHash,omitempty"` + + // Status: [Output Only] The status of the VPN tunnel, which can be one + // of the following: - PROVISIONING: Resource is being allocated for the + // VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all + // VPN-related configs from the user. Network, TargetVpnGateway, + // VpnTunnel, ForwardingRule, and Route resources are needed to setup + // the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with + // the peer VPN. - ESTABLISHED: Secure session is successfully + // established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced + // by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for + // example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. + // - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. + // - FAILED: Tunnel creation has failed and the tunnel is not ready to + // be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - + // REJECTED: Tunnel configuration was rejected, can be result of being + // denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of + // allocating all required resources. - STOPPED: Tunnel is stopped due + // to its Forwarding Rules being deleted for Classic VPN tunnels or the + // project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity + // does not match peer IP, probably behind NAT. - + // TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for + // an HA-VPN tunnel. + // + // Possible values: + // "ALLOCATING_RESOURCES" - Cloud VPN is in the process of allocating + // all required resources (specifically, a borg task). + // "AUTHORIZATION_ERROR" - Auth error (e.g. bad shared secret). + // "DEPROVISIONING" - Resources is being deallocated for the VPN + // tunnel. + // "ESTABLISHED" - Secure session is successfully established with + // peer VPN. + // "FAILED" - Tunnel creation has failed and the tunnel is not ready + // to be used. + // "FIRST_HANDSHAKE" - Successful first handshake with peer VPN. + // "NEGOTIATION_FAILURE" - Handshake failed. + // "NETWORK_ERROR" - Deprecated, replaced by NO_INCOMING_PACKETS + // "NO_INCOMING_PACKETS" - No incoming packets from peer + // "PROVISIONING" - Resource is being allocated for the VPN tunnel. + // "REJECTED" - Tunnel configuration was rejected, can be result of + // being denylisted. + // "STOPPED" - Tunnel is stopped due to its Forwarding Rules being + // deleted. + // "WAITING_FOR_FULL_CONFIG" - Waiting to receive all VPN-related + // configs from user. Network, TargetVpnGateway, VpnTunnel, + // ForwardingRule and Route resources are needed to setup VPN tunnel. + Status string `json:"status,omitempty"` + + // TargetVpnGateway: URL of the Target VPN gateway with which this VPN + // tunnel is associated. Provided by the client when the VPN tunnel is + // created. + TargetVpnGateway string `json:"targetVpnGateway,omitempty"` + + // VpnGateway: URL of the VPN gateway with which this VPN tunnel is + // associated. Provided by the client when the VPN tunnel is created. + // This must be used (instead of target_vpn_gateway) if a High + // Availability VPN gateway resource is created. + VpnGateway string `json:"vpnGateway,omitempty"` + + // VpnGatewayInterface: The interface ID of the VPN gateway with which + // this VPN tunnel is associated. Possible values are: `0`, `1`. + VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty 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. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnel) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnTunnelAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnTunnelsScopedList resources. + Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for + // VPN tunnels. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnTunnelAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnTunnelAggregatedListWarning: [Output Only] Informational warning +// message. +type VpnTunnelAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*VpnTunnelAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnTunnelAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnTunnelList: Contains a list of VpnTunnel resources. +type VpnTunnelList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnTunnel resources. + Items []*VpnTunnel `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for + // VPN tunnels. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnTunnelListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelList) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnTunnelListWarning: [Output Only] Informational warning message. +type VpnTunnelListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*VpnTunnelListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnTunnelListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnTunnelsScopedList struct { + // VpnTunnels: A list of VPN tunnels contained in this scope. + VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` + + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpnTunnels") 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. "VpnTunnels") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnTunnelsScopedListWarning: Informational warning which replaces the +// list of addresses when the list is empty. +type VpnTunnelsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelsScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnTunnelsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnTunnelsScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type WafExpressionSet struct { + // Aliases: A list of alternate IDs. The format should be: - E.g. + // XSS-stable Generic suffix like "stable" is particularly useful if a + // policy likes to avail newer set of expressions without having to + // change the policy. A given alias name can't be used for more than one + // entity set. + Aliases []string `json:"aliases,omitempty"` + + // Expressions: List of available expressions. + Expressions []*WafExpressionSetExpression `json:"expressions,omitempty"` + + // Id: Google specified expression set ID. The format should be: - E.g. + // XSS-20170329 required + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Aliases") 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. "Aliases") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WafExpressionSet) MarshalJSON() ([]byte, error) { + type NoMethod WafExpressionSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type WafExpressionSetExpression struct { + // Id: Expression ID should uniquely identify the origin of the + // expression. E.g. owasp-crs-v020901-id973337 identifies Owasp core + // rule set version 2.9.1 rule id 973337. The ID could be used to + // determine the individual attack definition that has been detected. It + // could also be used to exclude it from the policy in case of false + // positive. required + Id string `json:"id,omitempty"` + + // Sensitivity: The sensitivity value associated with the WAF rule ID. + // This corresponds to the ModSecurity paranoia level, ranging from 1 to + // 4. 0 is reserved for opt-in only rules. + Sensitivity int64 `json:"sensitivity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WafExpressionSetExpression) MarshalJSON() ([]byte, error) { + type NoMethod WafExpressionSetExpression + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WeightedBackendService: In contrast to a single BackendService in +// HttpRouteAction to which all matching traffic is directed to, +// WeightedBackendService allows traffic to be split across multiple +// backend services. The volume of traffic for each backend service is +// proportional to the weight specified in each WeightedBackendService +type WeightedBackendService struct { + // BackendService: The full or partial URL to the default BackendService + // resource. Before forwarding the request to backendService, the load + // balancer applies any relevant headerActions specified as part of this + // backendServiceWeight. + BackendService string `json:"backendService,omitempty"` + + // HeaderAction: Specifies changes to request and response headers that + // need to take effect for the selected backendService. headerAction + // specified here take effect before headerAction in the enclosing + // HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported + // for load balancers that have their loadBalancingScheme set to + // EXTERNAL. Not supported when the URL map is bound to a target gRPC + // proxy that has validateForProxyless field set to true. + HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + + // Weight: Specifies the fraction of traffic sent to a backend service, + // computed as weight / (sum of all weightedBackendService weights in + // routeAction) . The selection of a backend service is determined only + // for new traffic. Once a user's request has been directed to a backend + // service, subsequent requests are sent to the same backend service as + // determined by the backend service's session affinity policy. The + // value must be from 0 to 1000. + Weight int64 `json:"weight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackendService") 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. "BackendService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WeightedBackendService) MarshalJSON() ([]byte, error) { + type NoMethod WeightedBackendService + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type XpnHostList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: [Output Only] A list of shared VPC host project URLs. + Items []*Project `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#xpnHostList for + // lists of shared VPC hosts. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *XpnHostListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *XpnHostList) MarshalJSON() ([]byte, error) { + type NoMethod XpnHostList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// XpnHostListWarning: [Output Only] Informational warning message. +type XpnHostListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*XpnHostListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *XpnHostListWarning) MarshalJSON() ([]byte, error) { + type NoMethod XpnHostListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type XpnHostListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *XpnHostListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod XpnHostListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// XpnResourceId: Service resource (a.k.a service project) ID. +type XpnResourceId struct { + // Id: The ID of the service resource. In the case of projects, this + // field supports project id (e.g., my-project-123) and project number + // (e.g. 12345678). + Id string `json:"id,omitempty"` + + // Type: The type of the service resource. + // + // Possible values: + // "PROJECT" + // "XPN_RESOURCE_TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *XpnResourceId) MarshalJSON() ([]byte, error) { + type NoMethod XpnResourceId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Zone: Represents a Zone resource. A zone is a deployment area. These +// deployment areas are subsets of a region. For example the zone +// us-east1-a is located in the us-east1 region. For more information, +// read Regions and Zones. +type Zone struct { + // AvailableCpuPlatforms: [Output Only] Available cpu/platform + // selections for the zone. + AvailableCpuPlatforms []string `json:"availableCpuPlatforms,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Deprecated -- [Output Only] The deprecation status associated with + // this zone. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: [Output Only] Textual description of the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always compute#zone for + // zones. + Kind string `json:"kind,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // Region: [Output Only] Full URL reference to the region which hosts + // the zone. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: [Output Only] Status of the zone, either UP or DOWN. + // + // Possible values: + // "DOWN" + // "UP" + Status string `json:"status,omitempty"` + + // SupportsPzs: [Output Only] Reserved for future use. + SupportsPzs bool `json:"supportsPzs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AvailableCpuPlatforms") 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. "AvailableCpuPlatforms") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Zone) MarshalJSON() ([]byte, error) { + type NoMethod Zone + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ZoneList: Contains a list of zone resources. +type ZoneList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of Zone resources. + Items []*Zone `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *ZoneListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ZoneList) MarshalJSON() ([]byte, error) { + type NoMethod ZoneList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ZoneListWarning: [Output Only] Informational warning message. +type ZoneListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*ZoneListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ZoneListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ZoneListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ZoneListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ZoneListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ZoneListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ZoneSetLabelsRequest struct { + // LabelFingerprint: The fingerprint of the previous set of labels for + // this resource, used to detect conflicts. The fingerprint is initially + // generated by Compute Engine and changes after every request to modify + // or update labels. You must always provide an up-to-date fingerprint + // hash in order to update or change labels. Make a get() request to the + // resource to get the latest fingerprint. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: The labels to set for this resource. + Labels map[string]string `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LabelFingerprint") 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. "LabelFingerprint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ZoneSetLabelsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ZoneSetPolicyRequest struct { + // Bindings: Flatten Policy to create a backwacd compatible wire-format. + // Deprecated. Use 'policy' to specify bindings. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: Flatten Policy to create a backward compatible wire-format. + // Deprecated. Use 'policy' to specify the etag. + Etag string `json:"etag,omitempty"` + + // Policy: REQUIRED: The complete policy to be applied to the + // 'resource'. The size of the policy is limited to a few 10s of KB. An + // empty policy is in general a valid policy but certain services (like + // Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bindings") 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. "Bindings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ZoneSetPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod ZoneSetPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "compute.acceleratorTypes.aggregatedList": + +type AcceleratorTypesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of accelerator types. +// +// - project: Project ID for this request. +func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { + c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/aggregated/acceleratorTypes") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.aggregatedList" call. +// Exactly one of *AcceleratorTypeAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AcceleratorTypeAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AcceleratorTypeAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of accelerator types.", + // "flatPath": "projects/{project}/aggregated/acceleratorTypes", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/acceleratorTypes", + // "response": { + // "$ref": "AcceleratorTypeAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) 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 "compute.acceleratorTypes.get": + +type AcceleratorTypesGetCall struct { + s *Service + project string + zone string + acceleratorType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified accelerator type. +// +// - acceleratorType: Name of the accelerator type to return. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { + c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.acceleratorType = acceleratorType + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AcceleratorTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") + 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{ + "project": c.project, + "zone": c.zone, + "acceleratorType": c.acceleratorType, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.get" call. +// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AcceleratorType.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AcceleratorType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified accelerator type.", + // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.get", + // "parameterOrder": [ + // "project", + // "zone", + // "acceleratorType" + // ], + // "parameters": { + // "acceleratorType": { + // "description": "Name of the accelerator type to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "response": { + // "$ref": "AcceleratorType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.acceleratorTypes.list": + +type AcceleratorTypesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of accelerator types that are available to the +// specified project. +// +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { + c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *AcceleratorTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AcceleratorTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/acceleratorTypes") + 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{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.list" call. +// Exactly one of *AcceleratorTypeList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AcceleratorTypeList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AcceleratorTypeList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of accelerator types that are available to the specified project.", + // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/acceleratorTypes", + // "response": { + // "$ref": "AcceleratorTypeList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) 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 "compute.addresses.aggregatedList": + +type AddressesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of addresses. +// +// - project: Project ID for this request. +func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { + c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *AddressesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AddressesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *AddressesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/aggregated/addresses") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.aggregatedList" call. +// Exactly one of *AddressAggregatedList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AddressAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AddressAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of addresses.", + // "flatPath": "projects/{project}/aggregated/addresses", + // "httpMethod": "GET", + // "id": "compute.addresses.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/addresses", + // "response": { + // "$ref": "AddressAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) 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 "compute.addresses.delete": + +type AddressesDeleteCall struct { + s *Service + project string + region string + address string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified address resource. +// +// - address: Name of the address resource to delete. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { + c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.address = address + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { + 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 *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/addresses/{address}") + 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{ + "project": c.project, + "region": c.region, + "address": c.address, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified address resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", + // "httpMethod": "DELETE", + // "id": "compute.addresses.delete", + // "parameterOrder": [ + // "project", + // "region", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses/{address}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.addresses.get": + +type AddressesGetCall struct { + s *Service + project string + region string + address string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified address resource. +// +// - address: Name of the address resource to return. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { + c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.address = address + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesGetCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/addresses/{address}") + 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{ + "project": c.project, + "region": c.region, + "address": c.address, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.get" call. +// Exactly one of *Address or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Address.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Address{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified address resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", + // "httpMethod": "GET", + // "id": "compute.addresses.get", + // "parameterOrder": [ + // "project", + // "region", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses/{address}", + // "response": { + // "$ref": "Address" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.addresses.insert": + +type AddressesInsertCall struct { + s *Service + project string + region string + address *Address + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates an address resource in the specified project by using +// the data included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { + c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.address = address + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { + 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 *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, 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.address) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an address resource in the specified project by using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/addresses", + // "httpMethod": "POST", + // "id": "compute.addresses.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses", + // "request": { + // "$ref": "Address" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.addresses.list": + +type AddressesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of addresses contained within the specified +// region. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *AddressesService) List(project string, region string) *AddressesListCall { + c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *AddressesListCall) Filter(filter string) *AddressesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/addresses") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.list" call. +// Exactly one of *AddressList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AddressList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AddressList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of addresses contained within the specified region.", + // "flatPath": "projects/{project}/regions/{region}/addresses", + // "httpMethod": "GET", + // "id": "compute.addresses.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses", + // "response": { + // "$ref": "AddressList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) 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 "compute.addresses.move": + +type AddressesMoveCall struct { + s *Service + project string + region string + address string + regionaddressesmoverequest *RegionAddressesMoveRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Move: Moves the specified address resource. +// +// - address: Name of the address resource to move. +// - project: Source project ID which the Address is moved from. +// - region: Name of the region for this request. +func (r *AddressesService) Move(project string, region string, address string, regionaddressesmoverequest *RegionAddressesMoveRequest) *AddressesMoveCall { + c := &AddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.address = address + c.regionaddressesmoverequest = regionaddressesmoverequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { + 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 *AddressesMoveCall) Context(ctx context.Context) *AddressesMoveCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesMoveCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, 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.regionaddressesmoverequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}/move") + 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{ + "project": c.project, + "region": c.region, + "address": c.address, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.move" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Moves the specified address resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", + // "httpMethod": "POST", + // "id": "compute.addresses.move", + // "parameterOrder": [ + // "project", + // "region", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to move.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Source project ID which the Address is moved from.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses/{address}/move", + // "request": { + // "$ref": "RegionAddressesMoveRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.addresses.setLabels": + +type AddressesSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on an Address. To learn more about labels, +// read the Labeling Resources documentation. +// +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { + c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { + 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 *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, 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.regionsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/setLabels") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.addresses.setLabels", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", + // "request": { + // "$ref": "RegionSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.addresses.testIamPermissions": + +type AddressesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { + c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { + 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 *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AddressesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.addresses.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.autoscalers.aggregatedList": + +type AutoscalersAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of autoscalers. +// +// - project: Project ID for this request. +func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { + c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *AutoscalersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AutoscalersAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *AutoscalersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AutoscalersAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/aggregated/autoscalers") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.autoscalers.aggregatedList" call. +// Exactly one of *AutoscalerAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AutoscalerAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of autoscalers.", + // "flatPath": "projects/{project}/aggregated/autoscalers", + // "httpMethod": "GET", + // "id": "compute.autoscalers.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/autoscalers", + // "response": { + // "$ref": "AutoscalerAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) 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 "compute.autoscalers.delete": + +type AutoscalersDeleteCall struct { + s *Service + project string + zone string + autoscaler string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified autoscaler. +// +// - autoscaler: Name of the autoscaler to delete. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { + c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.autoscaler = autoscaler + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { + 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 *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AutoscalersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") + 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{ + "project": c.project, + "zone": c.zone, + "autoscaler": c.autoscaler, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.autoscalers.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified autoscaler.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "httpMethod": "DELETE", + // "id": "compute.autoscalers.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "autoscaler" + // ], + // "parameters": { + // "autoscaler": { + // "description": "Name of the autoscaler to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.autoscalers.get": + +type AutoscalersGetCall struct { + s *Service + project string + zone string + autoscaler string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified autoscaler resource. +// +// - autoscaler: Name of the autoscaler to return. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { + c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.autoscaler = autoscaler + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AutoscalersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") + 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{ + "project": c.project, + "zone": c.zone, + "autoscaler": c.autoscaler, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.autoscalers.get" call. +// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Autoscaler.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Autoscaler{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified autoscaler resource.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "httpMethod": "GET", + // "id": "compute.autoscalers.get", + // "parameterOrder": [ + // "project", + // "zone", + // "autoscaler" + // ], + // "parameters": { + // "autoscaler": { + // "description": "Name of the autoscaler to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "response": { + // "$ref": "Autoscaler" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.autoscalers.insert": + +type AutoscalersInsertCall struct { + s *Service + project string + zone string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates an autoscaler in the specified project using the data +// included in the request. +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { + c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.autoscaler = autoscaler + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { + 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 *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AutoscalersInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, 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.autoscaler) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + 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{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -func (s *ZoneSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetPolicyRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Do executes the "compute.autoscalers.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers", + // "httpMethod": "POST", + // "id": "compute.autoscalers.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/autoscalers", + // "request": { + // "$ref": "Autoscaler" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + } -// method id "compute.acceleratorTypes.aggregatedList": +// method id "compute.autoscalers.list": -type AcceleratorTypesAggregatedListCall struct { +type AutoscalersListCall struct { s *Service project string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of accelerator types. +// List: Retrieves a list of autoscalers contained within the specified +// zone. // // - project: Project ID for this request. -func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { - c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { + c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone return c } @@ -62046,31 +67096,18 @@ func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTyp // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -62084,7 +67121,7 @@ func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *Accel // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -62092,7 +67129,7 @@ func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *Accelerato // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -62101,7 +67138,7 @@ func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *Accele // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -62109,7 +67146,7 @@ func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62119,7 +67156,7 @@ func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *Accel // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { c.ifNoneMatch_ = entityTag return c } @@ -62127,21 +67164,21 @@ func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *Acce // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { +func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { +func (c *AutoscalersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -62154,7 +67191,7 @@ func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/acceleratorTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -62163,18 +67200,19 @@ func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Respon req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.acceleratorTypes.aggregatedList" call. -// Exactly one of *AcceleratorTypeAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AcceleratorTypeAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.autoscalers.list" call. +// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AutoscalerList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) { +func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62193,7 +67231,7 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AcceleratorTypeAggregatedList{ + ret := &AutoscalerList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62205,12 +67243,13 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of accelerator types.", - // "flatPath": "projects/{project}/aggregated/acceleratorTypes", + // "description": "Retrieves a list of autoscalers contained within the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers", // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.aggregatedList", + // "id": "compute.autoscalers.list", // "parameterOrder": [ - // "project" + // "project", + // "zone" // ], // "parameters": { // "filter": { @@ -62218,11 +67257,6 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -62252,11 +67286,18 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/acceleratorTypes", + // "path": "projects/{project}/zones/{zone}/autoscalers", // "response": { - // "$ref": "AcceleratorTypeAggregatedList" + // "$ref": "AutoscalerList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -62270,7 +67311,7 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error { +func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -62288,103 +67329,288 @@ func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(* } } -// method id "compute.acceleratorTypes.get": +// method id "compute.autoscalers.patch": -type AcceleratorTypesGetCall struct { - s *Service - project string - zone string - acceleratorType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AutoscalersPatchCall struct { + s *Service + project string + zone string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified accelerator type. +// Patch: Updates an autoscaler in the specified project using the data +// included in the request. This method supports PATCH semantics and +// uses the JSON merge patch format and processing rules. // -// - acceleratorType: Name of the accelerator type to return. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { - c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { + c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.acceleratorType = acceleratorType + c.autoscaler = autoscaler + return c +} + +// Autoscaler sets the optional parameter "autoscaler": Name of the +// autoscaler to patch. +func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { + c.urlParams_.Set("autoscaler", autoscaler) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { +func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AutoscalersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, 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.autoscaler) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + 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{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.autoscalers.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers", + // "httpMethod": "PATCH", + // "id": "compute.autoscalers.patch", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "autoscaler": { + // "description": "Name of the autoscaler to patch.", + // "location": "query", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/autoscalers", + // "request": { + // "$ref": "Autoscaler" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.autoscalers.testIamPermissions": + +type AutoscalersTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { + c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { + 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 *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { +func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AcceleratorTypesGetCall) Header() http.Header { +func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "acceleratorType": c.acceleratorType, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.acceleratorTypes.get" call. -// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AcceleratorType.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.autoscalers.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { +func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62403,7 +67629,7 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AcceleratorType{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62415,27 +67641,27 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator } return ret, nil // { - // "description": "Returns the specified accelerator type.", - // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.autoscalers.testIamPermissions", // "parameterOrder": [ // "project", // "zone", - // "acceleratorType" + // "resource" // ], // "parameters": { - // "acceleratorType": { - // "description": "Name of the accelerator type to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -62447,9 +67673,12 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "path": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "AcceleratorType" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -62460,182 +67689,468 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator } -// method id "compute.acceleratorTypes.list": +// method id "compute.autoscalers.update": -type AcceleratorTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AutoscalersUpdateCall struct { + s *Service + project string + zone string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of accelerator types that are available to the -// specified project. +// Update: Updates an autoscaler in the specified project using the data +// included in the request. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { - c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { + c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.autoscaler = autoscaler return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) +// Autoscaler sets the optional parameter "autoscaler": Name of the +// autoscaler to update. +func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { + c.urlParams_.Set("autoscaler", autoscaler) return c } -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { + c.urlParams_.Set("requestId", requestId) return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { + c.ctx_ = ctx return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *AcceleratorTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AutoscalersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, 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.autoscaler) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.autoscalers.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an autoscaler in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers", + // "httpMethod": "PUT", + // "id": "compute.autoscalers.update", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "autoscaler": { + // "description": "Name of the autoscaler to update.", + // "location": "query", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/autoscalers", + // "request": { + // "$ref": "Autoscaler" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendBuckets.addSignedUrlKey": + +type BackendBucketsAddSignedUrlKeyCall struct { + s *Service + project string + backendBucket string + signedurlkey *SignedUrlKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddSignedUrlKey: Adds a key for validating requests with signed URLs +// for this backend bucket. +// +// - backendBucket: Name of the BackendBucket resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. +// - project: Project ID for this request. +func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { + c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendBucket = backendBucket + c.signedurlkey = signedurlkey + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsAddSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsAddSignedUrlKeyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { +func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsAddSignedUrlKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BackendBucketsAddSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsAddSignedUrlKeyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, 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.signedurlkey) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") + 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{ + "project": c.project, + "backendBucket": c.backendBucket, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendBuckets.addSignedUrlKey" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.addSignedUrlKey", + // "parameterOrder": [ + // "project", + // "backendBucket" + // ], + // "parameters": { + // "backendBucket": { + // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", + // "request": { + // "$ref": "SignedUrlKey" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendBuckets.delete": + +type BackendBucketsDeleteCall struct { + s *Service + project string + backendBucket string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified BackendBucket resource. +// +// - backendBucket: Name of the BackendBucket resource to delete. +// - project: Project ID for this request. +func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { + c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendBucket = backendBucket + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { + 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 *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { +func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AcceleratorTypesListCall) Header() http.Header { +func (c *BackendBucketsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/acceleratorTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.acceleratorTypes.list" call. -// Exactly one of *AcceleratorTypeList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) { +// Do executes the "compute.backendBuckets.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62654,7 +68169,7 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AcceleratorTypeList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62666,36 +68181,20 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato } return ret, nil // { - // "description": "Retrieves a list of accelerator types that are available to the specified project.", - // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.list", + // "description": "Deletes the specified BackendBucket resource.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", + // "httpMethod": "DELETE", + // "id": "compute.backendBuckets.delete", // "parameterOrder": [ // "project", - // "zone" + // "backendBucket" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -62705,237 +68204,123 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/acceleratorTypes", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}", // "response": { - // "$ref": "AcceleratorTypeList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) 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 "compute.addresses.aggregatedList": +// method id "compute.backendBuckets.deleteSignedUrlKey": -type AddressesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendBucketsDeleteSignedUrlKeyCall struct { + s *Service + project string + backendBucket string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves an aggregated list of addresses. +// DeleteSignedUrlKey: Deletes a key for validating requests with signed +// URLs for this backend bucket. // -// - project: Project ID for this request. -func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { - c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendBucket: Name of the BackendBucket resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. +// - keyName: The name of the Signed URL Key to delete. +// - project: Project ID for this request. +func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { + c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.backendBucket = backendBucket + c.urlParams_.Set("keyName", keyName) return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *AddressesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AddressesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *AddressesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsDeleteSignedUrlKeyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { +func (c *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteSignedUrlKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { +func (c *BackendBucketsDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsDeleteSignedUrlKeyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AddressesAggregatedListCall) Header() http.Header { +func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/aggregated/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") 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{ - "project": c.project, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.aggregatedList" call. -// Exactly one of *AddressAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AddressAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) { +// Do executes the "compute.backendBuckets.deleteSignedUrlKey" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62954,7 +68339,7 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AddressAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62966,40 +68351,26 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address } return ret, nil // { - // "description": "Retrieves an aggregated list of addresses.", - // "flatPath": "projects/{project}/aggregated/addresses", - // "httpMethod": "GET", - // "id": "compute.addresses.aggregatedList", + // "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.deleteSignedUrlKey", // "parameterOrder": [ - // "project" + // "project", + // "backendBucket", + // "keyName" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "location": "path", + // "required": true, // "type": "string" // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "keyName": { + // "description": "The name of the Signed URL Key to delete.", // "location": "query", + // "required": true, // "type": "string" // }, // "project": { @@ -63009,145 +68380,117 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/addresses", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", // "response": { - // "$ref": "AddressAggregatedList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) 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 "compute.addresses.delete": +// method id "compute.backendBuckets.get": -type AddressesDeleteCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsGetCall struct { + s *Service + project string + backendBucket string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified address resource. +// Get: Returns the specified BackendBucket resource. // -// - address: Name of the address resource to delete. +// - backendBucket: Name of the BackendBucket resource to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { - c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { + c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.backendBucket = backendBucket return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { +func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { +func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AddressesDeleteCall) Header() http.Header { +func (c *BackendBucketsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/addresses/{address}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") 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{ - "project": c.project, - "region": c.region, - "address": c.address, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.backendBuckets.get" call. +// Exactly one of *BackendBucket or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *BackendBucket.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63166,7 +68509,7 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &BackendBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -63178,18 +68521,17 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified address resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", - // "httpMethod": "DELETE", - // "id": "compute.addresses.delete", + // "description": "Returns the specified BackendBucket resource.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", + // "httpMethod": "GET", + // "id": "compute.backendBuckets.get", // "parameterOrder": [ // "project", - // "region", - // "address" + // "backendBucket" // ], // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -63201,62 +68543,56 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{address}", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}", // "response": { - // "$ref": "Operation" + // "$ref": "BackendBucket" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.addresses.get": +// method id "compute.backendBuckets.getIamPolicy": -type AddressesGetCall struct { +type BackendBucketsGetIamPolicyCall struct { s *Service project string - region string - address string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified address resource. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - address: Name of the address resource to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { - c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { + c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.address = address + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { +func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63266,7 +68602,7 @@ func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { +func (c *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -63274,21 +68610,21 @@ func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { +func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AddressesGetCall) Header() http.Header { +func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63301,7 +68637,7 @@ func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -63309,21 +68645,20 @@ func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status +// Do executes the "compute.backendBuckets.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) +// *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { +func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63342,7 +68677,7 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Address{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -63354,22 +68689,20 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { } return ret, nil // { - // "description": "Returns the specified address resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", // "httpMethod": "GET", - // "id": "compute.addresses.get", + // "id": "compute.backendBuckets.getIamPolicy", // "parameterOrder": [ // "project", - // "region", - // "address" + // "resource" // ], // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, // "project": { // "description": "Project ID for this request.", @@ -63378,17 +68711,17 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{address}", + // "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", // "response": { - // "$ref": "Address" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -63399,28 +68732,25 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { } -// method id "compute.addresses.insert": +// method id "compute.backendBuckets.insert": -type AddressesInsertCall struct { - s *Service - project string - region string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsInsertCall struct { + s *Service + project string + backendbucket *BackendBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an address resource in the specified project by using -// the data included in the request. +// Insert: Creates a BackendBucket resource in the specified project +// using the data included in the request. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { - c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { + c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.address = address + c.backendbucket = backendbucket return c } @@ -63435,7 +68765,7 @@ func (r *AddressesService) Insert(project string, region string, address *Addres // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { +func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -63443,7 +68773,7 @@ func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { +func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63451,21 +68781,21 @@ func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { +func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AddressesInsertCall) Header() http.Header { +func (c *BackendBucketsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63473,14 +68803,14 @@ func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -63489,19 +68819,18 @@ func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.insert" call. +// Do executes the "compute.backendBuckets.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63532,13 +68861,12 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an address resource in the specified project by using the data included in the request.", - // "flatPath": "projects/{project}/regions/{region}/addresses", + // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/backendBuckets", // "httpMethod": "POST", - // "id": "compute.addresses.insert", + // "id": "compute.backendBuckets.insert", // "parameterOrder": [ - // "project", - // "region" + // "project" // ], // "parameters": { // "project": { @@ -63548,22 +68876,15 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses", + // "path": "projects/{project}/global/backendBuckets", // "request": { - // "$ref": "Address" + // "$ref": "BackendBucket" // }, // "response": { // "$ref": "Operation" @@ -63576,27 +68897,24 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.addresses.list": +// method id "compute.backendBuckets.list": -type AddressesListCall struct { +type BackendBucketsListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of addresses contained within the specified -// region. +// List: Retrieves the list of BackendBucket resources available to the +// specified project. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) List(project string, region string) *AddressesListCall { - c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { + c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -63635,7 +68953,7 @@ func (r *AddressesService) List(project string, region string) *AddressesListCal // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *AddressesListCall) Filter(filter string) *AddressesListCall { +func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { c.urlParams_.Set("filter", filter) return c } @@ -63646,7 +68964,7 @@ func (c *AddressesListCall) Filter(filter string) *AddressesListCall { // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { +func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -63660,7 +68978,7 @@ func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { +func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -63668,7 +68986,7 @@ func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { +func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -63677,7 +68995,7 @@ func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesListCall { +func (c *BackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -63685,7 +69003,7 @@ func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *Add // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { +func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63695,7 +69013,7 @@ func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { +func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { c.ifNoneMatch_ = entityTag return c } @@ -63703,21 +69021,21 @@ func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { +func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AddressesListCall) Header() http.Header { +func (c *BackendBucketsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63730,7 +69048,7 @@ func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -63739,19 +69057,18 @@ func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { +// Do executes the "compute.backendBuckets.list" call. +// Exactly one of *BackendBucketList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BackendBucketList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63770,7 +69087,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AddressList{ + ret := &BackendBucketList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -63782,13 +69099,12 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro } return ret, nil // { - // "description": "Retrieves a list of addresses contained within the specified region.", - // "flatPath": "projects/{project}/regions/{region}/addresses", + // "description": "Retrieves the list of BackendBucket resources available to the specified project.", + // "flatPath": "projects/{project}/global/backendBuckets", // "httpMethod": "GET", - // "id": "compute.addresses.list", + // "id": "compute.backendBuckets.list", // "parameterOrder": [ - // "project", - // "region" + // "project" // ], // "parameters": { // "filter": { @@ -63821,22 +69137,15 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "returnPartialSuccess": { // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/addresses", + // "path": "projects/{project}/global/backendBuckets", // "response": { - // "$ref": "AddressList" + // "$ref": "BackendBucketList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -63850,7 +69159,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro // 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 *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { +func (c *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -63868,30 +69177,29 @@ func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) erro } } -// method id "compute.addresses.move": +// method id "compute.backendBuckets.patch": -type AddressesMoveCall struct { - s *Service - project string - region string - address string - regionaddressesmoverequest *RegionAddressesMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsPatchCall struct { + s *Service + project string + backendBucket string + backendbucket *BackendBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Move: Moves the specified address resource. +// Patch: Updates the specified BackendBucket resource with the data +// included in the request. This method supports PATCH semantics and +// uses the JSON merge patch format and processing rules. // -// - address: Name of the address resource to move. -// - project: Source project ID which the Address is moved from. -// - region: Name of the region for this request. -func (r *AddressesService) Move(project string, region string, address string, regionaddressesmoverequest *RegionAddressesMoveRequest) *AddressesMoveCall { - c := &AddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendBucket: Name of the BackendBucket resource to patch. +// - project: Project ID for this request. +func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { + c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.address = address - c.regionaddressesmoverequest = regionaddressesmoverequest + c.backendBucket = backendBucket + c.backendbucket = backendbucket return c } @@ -63906,7 +69214,7 @@ func (r *AddressesService) Move(project string, region string, address string, r // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { +func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -63914,7 +69222,7 @@ func (c *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { +func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63922,21 +69230,21 @@ func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AddressesMoveCall) Context(ctx context.Context) *AddressesMoveCall { +func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AddressesMoveCall) Header() http.Header { +func (c *BackendBucketsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -63944,36 +69252,35 @@ func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionaddressesmoverequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}/move") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.move" call. +// Do executes the "compute.backendBuckets.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64004,46 +69311,38 @@ func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Moves the specified address resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", - // "httpMethod": "POST", - // "id": "compute.addresses.move", + // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", + // "httpMethod": "PATCH", + // "id": "compute.backendBuckets.patch", // "parameterOrder": [ // "project", - // "region", - // "address" + // "backendBucket" // ], // "parameters": { - // "address": { - // "description": "Name of the address resource to move.", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "Source project ID which the Address is moved from.", + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{address}/move", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}", // "request": { - // "$ref": "RegionAddressesMoveRequest" + // "$ref": "BackendBucket" // }, // "response": { // "$ref": "Operation" @@ -64056,31 +69355,29 @@ func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) } -// method id "compute.addresses.setLabels": +// method id "compute.backendBuckets.setEdgeSecurityPolicy": -type AddressesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsSetEdgeSecurityPolicyCall struct { + s *Service + project string + backendBucket string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on an Address. To learn more about labels, -// read the Labeling Resources documentation. +// SetEdgeSecurityPolicy: Sets the edge security policy for the +// specified backend bucket. // -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { - c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendBucket: Name of the BackendService resource to which the +// security policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBucket string, securitypolicyreference *SecurityPolicyReference) *BackendBucketsSetEdgeSecurityPolicyCall { + c := &BackendBucketsSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest + c.backendBucket = backendBucket + c.securitypolicyreference = securitypolicyreference return c } @@ -64095,7 +69392,7 @@ func (r *AddressesService) SetLabels(project string, region string, resource str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendBucketsSetEdgeSecurityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -64103,7 +69400,7 @@ func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabels // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetEdgeSecurityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -64111,21 +69408,21 @@ func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendBucketsSetEdgeSecurityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AddressesSetLabelsCall) Header() http.Header { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -64133,14 +69430,14 @@ func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64148,21 +69445,20 @@ func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.setLabels" call. +// Do executes the "compute.backendBuckets.setEdgeSecurityPolicy" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64193,411 +69489,136 @@ func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - // "httpMethod": "POST", - // "id": "compute.addresses.setLabels", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.addresses.testIamPermissions": - -type AddressesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { - c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { - 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 *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", + // "description": "Sets the edge security policy for the specified backend bucket.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", // "httpMethod": "POST", - // "id": "compute.addresses.testIamPermissions", + // "id": "compute.backendBuckets.setEdgeSecurityPolicy", // "parameterOrder": [ // "project", - // "region", - // "resource" + // "backendBucket" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", + // "backendBucket": { + // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "SecurityPolicyReference" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.autoscalers.aggregatedList": +// method id "compute.backendBuckets.setIamPolicy": -type AutoscalersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendBucketsSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves an aggregated list of autoscalers. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // // - project: Project ID for this request. -func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { - c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { + c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *AutoscalersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AutoscalersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *AutoscalersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { +func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { +func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersAggregatedListCall) Header() http.Header { +func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.globalsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/setIamPolicy") 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{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.aggregatedList" call. -// Exactly one of *AutoscalerAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) { +// Do executes the "compute.backendBuckets.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64616,7 +69637,7 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AutoscalerAggregatedList{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64628,42 +69649,15 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos } return ret, nil // { - // "description": "Retrieves an aggregated list of autoscalers.", - // "flatPath": "projects/{project}/aggregated/autoscalers", - // "httpMethod": "GET", - // "id": "compute.autoscalers.aggregatedList", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.setIamPolicy", // "parameterOrder": [ - // "project" + // "project", + // "resource" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -64671,91 +69665,58 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/autoscalers", + // "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", + // "request": { + // "$ref": "GlobalSetPolicyRequest" + // }, // "response": { - // "$ref": "AutoscalerAggregatedList" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) 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 "compute.autoscalers.delete": +// method id "compute.backendBuckets.testIamPermissions": -type AutoscalersDeleteCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified autoscaler. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - autoscaler: Name of the autoscaler to delete. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { - c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { + c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { +func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -64763,21 +69724,21 @@ func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { +func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersDeleteCall) Header() http.Header { +func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -64785,31 +69746,35 @@ func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/testIamPermissions") 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{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendBuckets.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64828,7 +69793,7 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64840,23 +69805,15 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified autoscaler.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - // "httpMethod": "DELETE", - // "id": "compute.autoscalers.delete", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.testIamPermissions", // "parameterOrder": [ // "project", - // "zone", - // "autoscaler" + // "resource" // ], // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -64864,128 +69821,133 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.autoscalers.get": +// method id "compute.backendBuckets.update": -type AutoscalersGetCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendBucketsUpdateCall struct { + s *Service + project string + backendBucket string + backendbucket *BackendBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified autoscaler resource. +// Update: Updates the specified BackendBucket resource with the data +// included in the request. // -// - autoscaler: Name of the autoscaler to return. +// - backendBucket: Name of the BackendBucket resource to update. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { - c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { + c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.autoscaler = autoscaler + c.backendBucket = backendBucket + c.backendbucket = backendbucket + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { +func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { +func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersGetCall) Header() http.Header { +func (c *BackendBucketsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, 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.backendbucket) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") 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{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx +// Do executes the "compute.backendBuckets.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { +func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65004,7 +69966,7 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Autoscaler{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65016,18 +69978,17 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro } return ret, nil // { - // "description": "Returns the specified autoscaler resource.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - // "httpMethod": "GET", - // "id": "compute.autoscalers.get", + // "description": "Updates the specified BackendBucket resource with the data included in the request.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", + // "httpMethod": "PUT", + // "id": "compute.backendBuckets.update", // "parameterOrder": [ // "project", - // "zone", - // "autoscaler" + // "backendBucket" // ], // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to update.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -65040,49 +70001,50 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro // "required": true, // "type": "string" // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}", + // "request": { + // "$ref": "BackendBucket" + // }, // "response": { - // "$ref": "Autoscaler" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.autoscalers.insert": +// method id "compute.backendServices.addSignedUrlKey": -type AutoscalersInsertCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesAddSignedUrlKeyCall struct { + s *Service + project string + backendService string + signedurlkey *SignedUrlKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// AddSignedUrlKey: Adds a key for validating requests with signed URLs +// for this backend service. // -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { - c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. +// - project: Project ID for this request. +func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { + c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.autoscaler = autoscaler + c.backendService = backendService + c.signedurlkey = signedurlkey return c } @@ -65097,7 +70059,7 @@ func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Aut // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { +func (c *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *BackendServicesAddSignedUrlKeyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -65105,7 +70067,7 @@ func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { +func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesAddSignedUrlKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -65113,21 +70075,21 @@ func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { +func (c *BackendServicesAddSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesAddSignedUrlKeyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersInsertCall) Header() http.Header { +func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -65135,14 +70097,14 @@ func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -65150,20 +70112,20 @@ func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.insert" call. +// Do executes the "compute.backendServices.addSignedUrlKey" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65194,15 +70156,21 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers", + // "description": "Adds a key for validating requests with signed URLs for this backend service.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", // "httpMethod": "POST", - // "id": "compute.autoscalers.insert", + // "id": "compute.backendServices.addSignedUrlKey", // "parameterOrder": [ // "project", - // "zone" + // "backendService" // ], // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -65214,18 +70182,11 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers", + // "path": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", // "request": { - // "$ref": "Autoscaler" + // "$ref": "SignedUrlKey" // }, // "response": { // "$ref": "Operation" @@ -65238,27 +70199,24 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } -// method id "compute.autoscalers.list": +// method id "compute.backendServices.aggregatedList": -type AutoscalersListCall struct { +type BackendServicesAggregatedListCall struct { s *Service project string - zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of autoscalers contained within the specified -// zone. +// AggregatedList: Retrieves the list of all BackendService resources, +// regional and global, available to the specified project. // -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { - c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { + c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone return c } @@ -65297,18 +70255,31 @@ func (r *AutoscalersService) List(project string, zone string) *AutoscalersListC // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *BackendServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendServicesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -65322,7 +70293,7 @@ func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -65330,7 +70301,7 @@ func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -65339,7 +70310,7 @@ func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *AutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -65347,7 +70318,7 @@ func (c *AutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *A // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -65357,7 +70328,7 @@ func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -65365,21 +70336,21 @@ func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { +func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersListCall) Header() http.Header { +func (c *BackendServicesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -65392,7 +70363,7 @@ func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -65401,19 +70372,18 @@ func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.list" call. -// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AutoscalerList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.backendServices.aggregatedList" call. +// Exactly one of *BackendServiceAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *BackendServiceAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) { +func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65432,7 +70402,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AutoscalerList{ + ret := &BackendServiceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65444,13 +70414,12 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers", + // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/backendServices", // "httpMethod": "GET", - // "id": "compute.autoscalers.list", + // "id": "compute.backendServices.aggregatedList", // "parameterOrder": [ - // "project", - // "zone" + // "project" // ], // "parameters": { // "filter": { @@ -65458,6 +70427,11 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, // "location": "query", // "type": "string" // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -65477,7 +70451,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", + // "description": "Name of the project scoping this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -65487,18 +70461,11 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers", + // "path": "projects/{project}/aggregated/backendServices", // "response": { - // "$ref": "AutoscalerList" + // "$ref": "BackendServiceAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -65512,7 +70479,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, // 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 *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { +func (c *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -65530,36 +70497,25 @@ func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) } } -// method id "compute.autoscalers.patch": +// method id "compute.backendServices.delete": -type AutoscalersPatchCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesDeleteCall struct { + s *Service + project string + backendService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// Delete: Deletes the specified BackendService resource. // +// - backendService: Name of the BackendService resource to delete. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { - c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { + c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) + c.backendService = backendService return c } @@ -65574,7 +70530,7 @@ func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCa // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { +func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -65582,7 +70538,7 @@ func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { +func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -65590,21 +70546,21 @@ func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { +func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersPatchCall) Header() http.Header { +func (c *BackendServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -65612,35 +70568,30 @@ func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.patch" call. +// Do executes the "compute.backendServices.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65671,19 +70622,20 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers", - // "httpMethod": "PATCH", - // "id": "compute.autoscalers.patch", + // "description": "Deletes the specified BackendService resource.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "DELETE", + // "id": "compute.backendServices.delete", // "parameterOrder": [ // "project", - // "zone" + // "backendService" // ], // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", + // "backendService": { + // "description": "Name of the BackendService resource to delete.", + // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -65697,19 +70649,9 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, + // "path": "projects/{project}/global/backendServices/{backendService}", // "response": { // "$ref": "Operation" // }, @@ -65721,38 +70663,52 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } -// method id "compute.autoscalers.testIamPermissions": +// method id "compute.backendServices.deleteSignedUrlKey": -type AutoscalersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesDeleteSignedUrlKeyCall struct { + s *Service + project string + backendService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// DeleteSignedUrlKey: Deletes a key for validating requests with signed +// URLs for this backend service. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { - c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. +// - keyName: The name of the Signed URL Key to delete. +// - project: Project ID for this request. +func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { + c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.backendService = backendService + c.urlParams_.Set("keyName", keyName) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendServicesDeleteSignedUrlKeyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { +func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesDeleteSignedUrlKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -65760,21 +70716,21 @@ func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *Autosc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { +func (c *BackendServicesDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesDeleteSignedUrlKeyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { +func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -65782,14 +70738,9 @@ func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -65797,21 +70748,20 @@ func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.backendServices.deleteSignedUrlKey" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65830,7 +70780,7 @@ func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65842,164 +70792,146 @@ func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", + // "description": "Deletes a key for validating requests with signed URLs for this backend service.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", // "httpMethod": "POST", - // "id": "compute.autoscalers.testIamPermissions", + // "id": "compute.backendServices.deleteSignedUrlKey", // "parameterOrder": [ // "project", - // "zone", - // "resource" + // "backendService", + // "keyName" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "backendService": { + // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "keyName": { + // "description": "The name of the Signed URL Key to delete.", + // "location": "query", // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.autoscalers.update": +// method id "compute.backendServices.get": -type AutoscalersUpdateCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesGetCall struct { + s *Service + project string + backendService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an autoscaler in the specified project using the data -// included in the request. +// Get: Returns the specified BackendService resource. // +// - backendService: Name of the BackendService resource to return. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { - c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { + c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { - c.urlParams_.Set("requestId", requestId) + c.backendService = backendService return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { +func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { +func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AutoscalersUpdateCall) Header() http.Header { +func (c *BackendServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, 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.autoscaler) - 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, "projects/{project}/zones/{zone}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.backendServices.get" call. +// Exactly one of *BackendService or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *BackendService.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66018,7 +70950,7 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &BackendService{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66030,19 +70962,20 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers", - // "httpMethod": "PUT", - // "id": "compute.autoscalers.update", + // "description": "Returns the specified BackendService resource.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "GET", + // "id": "compute.backendServices.get", // "parameterOrder": [ // "project", - // "zone" + // "backendService" // ], // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", + // "backendService": { + // "description": "Name of the BackendService resource to return.", + // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -66051,81 +70984,52 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, + // "path": "projects/{project}/global/backendServices/{backendService}", // "response": { - // "$ref": "Operation" + // "$ref": "BackendService" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.addSignedUrlKey": +// method id "compute.backendServices.getHealth": -type BackendBucketsAddSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesGetHealthCall struct { + s *Service + project string + backendService string + resourcegroupreference *ResourceGroupReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend bucket. +// GetHealth: Gets the most recent health check results for this +// BackendService. Example request body: { "group": +// "/zones/us-east1-b/instanceGroups/lb-backend-example" } // -// - backendBucket: Name of the BackendBucket resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { - c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to which the +// queried instance belongs. +// - project: . +func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { + c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.signedurlkey = signedurlkey - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsAddSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsAddSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) + c.backendService = backendService + c.resourcegroupreference = resourcegroupreference return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsAddSignedUrlKeyCall { +func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -66133,21 +71037,21 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *Backen // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsAddSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsAddSignedUrlKeyCall { +func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { +func (c *BackendServicesGetHealthCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -66155,14 +71059,14 @@ func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getHealth") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66170,20 +71074,20 @@ func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.addSignedUrlKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendServices.getHealth" call. +// Exactly one of *BackendServiceGroupHealth or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceGroupHealth.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66202,7 +71106,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &BackendServiceGroupHealth{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66214,144 +71118,146 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend bucket.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", + // "description": "Gets the most recent health check results for this BackendService. Example request body: { \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\" }", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", // "httpMethod": "POST", - // "id": "compute.backendBuckets.addSignedUrlKey", + // "id": "compute.backendServices.getHealth", // "parameterOrder": [ // "project", - // "backendBucket" + // "backendService" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "backendService": { + // "description": "Name of the BackendService resource to which the queried instance belongs.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", + // "path": "projects/{project}/global/backendServices/{backendService}/getHealth", // "request": { - // "$ref": "SignedUrlKey" + // "$ref": "ResourceGroupReference" // }, // "response": { - // "$ref": "Operation" + // "$ref": "BackendServiceGroupHealth" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.delete": +// method id "compute.backendServices.getIamPolicy": -type BackendBucketsDeleteCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified BackendBucket resource. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - backendBucket: Name of the BackendBucket resource to delete. // - project: Project ID for this request. -func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { - c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendServicesService) GetIamPolicy(project string, resource string) *BackendServicesGetIamPolicyCall { + c := &BackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *BackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendServicesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { +func (c *BackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendServicesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { +func (c *BackendServicesGetIamPolicyCall) Context(ctx context.Context) *BackendServicesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsDeleteCall) Header() http.Header { +func (c *BackendServicesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/backendBuckets/{backendBucket}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/getIamPolicy") 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{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendServices.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66370,7 +71276,7 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66382,21 +71288,20 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified BackendBucket resource.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - // "httpMethod": "DELETE", - // "id": "compute.backendBuckets.delete", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/global/backendServices/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.backendServices.getIamPolicy", // "parameterOrder": [ // "project", - // "backendBucket" + // "resource" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, // "project": { // "description": "Project ID for this request.", @@ -66405,47 +71310,47 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}", + // "path": "projects/{project}/global/backendServices/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.deleteSignedUrlKey": +// method id "compute.backendServices.insert": -type BackendBucketsDeleteSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesInsertCall struct { + s *Service + project string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend bucket. +// Insert: Creates a BackendService resource in the specified project +// using the data included in the request. For more information, see +// Backend services overview . // -// - backendBucket: Name of the BackendBucket resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { - c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { + c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.urlParams_.Set("keyName", keyName) + c.backendservice = backendservice return c } @@ -66460,7 +71365,7 @@ func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsDeleteSignedUrlKeyCall { +func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -66468,7 +71373,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *Back // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteSignedUrlKeyCall { +func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -66476,21 +71381,21 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *Bac // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsDeleteSignedUrlKeyCall { +func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { +func (c *BackendServicesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -66498,9 +71403,14 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66508,20 +71418,19 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.deleteSignedUrlKey" call. +// Do executes the "compute.backendServices.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66552,28 +71461,14 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", + // "description": "Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .", + // "flatPath": "projects/{project}/global/backendServices", // "httpMethod": "POST", - // "id": "compute.backendBuckets.deleteSignedUrlKey", + // "id": "compute.backendServices.insert", // "parameterOrder": [ - // "project", - // "backendBucket", - // "keyName" + // "project" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "keyName": { - // "description": "The name of the Signed URL Key to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -66587,7 +71482,10 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", + // "path": "projects/{project}/global/backendServices", + // "request": { + // "$ref": "BackendService" + // }, // "response": { // "$ref": "Operation" // }, @@ -66599,33 +71497,113 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } -// method id "compute.backendBuckets.get": +// method id "compute.backendServices.list": -type BackendBucketsGetCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendServicesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified BackendBucket resource. +// List: Retrieves the list of BackendService resources available to the +// specified project. // -// - backendBucket: Name of the BackendBucket resource to return. // - project: Project ID for this request. -func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { - c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendServicesService) List(project string) *BackendServicesListCall { + c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *BackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { +func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -66635,7 +71613,7 @@ func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetC // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { +func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { c.ifNoneMatch_ = entityTag return c } @@ -66643,21 +71621,21 @@ func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGet // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { +func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsGetCall) Header() http.Header { +func (c *BackendServicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -66670,7 +71648,7 @@ func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -66678,20 +71656,19 @@ func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.get" call. -// Exactly one of *BackendBucket or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendBucket.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.backendServices.list" call. +// Exactly one of *BackendServiceList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BackendServiceList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) { +func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66710,7 +71687,7 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendBucket{ + ret := &BackendServiceList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66722,20 +71699,35 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket } return ret, nil // { - // "description": "Returns the specified BackendBucket resource.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", + // "description": "Retrieves the list of BackendService resources available to the specified project.", + // "flatPath": "projects/{project}/global/backendServices", // "httpMethod": "GET", - // "id": "compute.backendBuckets.get", + // "id": "compute.backendServices.list", // "parameterOrder": [ - // "project", - // "backendBucket" + // "project" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -66744,11 +71736,16 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}", + // "path": "projects/{project}/global/backendServices", // "response": { - // "$ref": "BackendBucket" + // "$ref": "BackendServiceList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -66759,107 +71756,132 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket } -// method id "compute.backendBuckets.getIamPolicy": +// 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 *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) 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 BackendBucketsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "compute.backendServices.patch": + +type BackendServicesPatchCall struct { + s *Service + project string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// Patch: Patches the specified BackendService resource with the data +// included in the request. For more information, see Backend services +// overview. This method supports PATCH semantics and uses the JSON +// merge patch format and processing rules. // +// - backendService: Name of the BackendService resource to patch. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { - c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { + c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource + c.backendService = backendService + c.backendservice = backendservice return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { +func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { +func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { +func (c *BackendServicesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, 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.backendservice) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.backendServices.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66878,7 +71900,7 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66890,20 +71912,21 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.getIamPolicy", + // "description": "Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "PATCH", + // "id": "compute.backendServices.patch", // "parameterOrder": [ // "project", - // "resource" + // "backendService" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "backendService": { + // "description": "Name of the BackendService resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -66912,46 +71935,51 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + // "path": "projects/{project}/global/backendServices/{backendService}", + // "request": { + // "$ref": "BackendService" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendBuckets.insert": +// method id "compute.backendServices.setEdgeSecurityPolicy": -type BackendBucketsInsertCall struct { - s *Service - project string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesSetEdgeSecurityPolicyCall struct { + s *Service + project string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. +// SetEdgeSecurityPolicy: Sets the edge security policy for the +// specified backend service. // -// - project: Project ID for this request. -func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { - c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to which the +// edge security policy should be set. The name should conform to +// RFC1035. +// - project: Project ID for this request. +func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetEdgeSecurityPolicyCall { + c := &BackendServicesSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendbucket = backendbucket + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference return c } @@ -66966,7 +71994,7 @@ func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBuc // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { +func (c *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetEdgeSecurityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -66974,7 +72002,7 @@ func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsIn // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { +func (c *BackendServicesSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetEdgeSecurityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -66982,21 +72010,21 @@ func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsI // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { +func (c *BackendServicesSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetEdgeSecurityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsInsertCall) Header() http.Header { +func (c *BackendServicesSetEdgeSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -67004,14 +72032,14 @@ func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -67019,19 +72047,20 @@ func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.insert" call. +// Do executes the "compute.backendServices.setEdgeSecurityPolicy" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67062,14 +72091,21 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/backendBuckets", + // "description": "Sets the edge security policy for the specified backend service.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", // "httpMethod": "POST", - // "id": "compute.backendBuckets.insert", + // "id": "compute.backendServices.setEdgeSecurityPolicy", // "parameterOrder": [ - // "project" + // "project", + // "backendService" // ], // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -67083,9 +72119,9 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets", + // "path": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", // "request": { - // "$ref": "BackendBucket" + // "$ref": "SecurityPolicyReference" // }, // "response": { // "$ref": "Operation" @@ -67098,178 +72134,267 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.backendBuckets.list": +// method id "compute.backendServices.setIamPolicy": -type BackendBucketsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendServicesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of BackendBucket resources available to the -// specified project. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // // - project: Project ID for this request. -func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { - c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendServicesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendServicesSetIamPolicyCall { + c := &BackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BackendServicesSetIamPolicyCall) Context(ctx context.Context) *BackendServicesSetIamPolicyCall { + c.ctx_ = ctx return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackendServicesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) +func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.globalsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendServices.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/global/backendServices/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.backendServices.setIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/backendServices/{resource}/setIamPolicy", + // "request": { + // "$ref": "GlobalSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendServices.setSecurityPolicy": + +type BackendServicesSetSecurityPolicyCall struct { + s *Service + project string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified backend service. For more information, see Google Cloud +// Armor Overview +// +// - backendService: Name of the BackendService resource to which the +// security policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { + c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *BackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { +func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { +func (c *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsListCall) Header() http.Header { +func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, 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.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy") 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{ - "project": c.project, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.list" call. -// Exactly one of *BackendBucketList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendBucketList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) { +// Do executes the "compute.backendServices.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67288,7 +72413,7 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendBucketList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67300,35 +72425,19 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke } return ret, nil // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", - // "flatPath": "projects/{project}/global/backendBuckets", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.list", + // "description": "Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.backendServices.setSecurityPolicy", // "parameterOrder": [ - // "project" + // "project", + // "backendService" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "backendService": { + // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, // "type": "string" // }, // "project": { @@ -67338,92 +72447,56 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets", + // "path": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, // "response": { - // "$ref": "BackendBucketList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) 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 "compute.backendBuckets.patch": +// method id "compute.backendServices.testIamPermissions": -type BackendBucketsPatchCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified BackendBucket resource with the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - backendBucket: Name of the BackendBucket resource to patch. // - project: Project ID for this request. -func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { - c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { + c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { +func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67431,21 +72504,21 @@ func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { +func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsPatchCall) Header() http.Header { +func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -67453,35 +72526,35 @@ func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/testIamPermissions") 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{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendServices.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67500,7 +72573,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67512,22 +72585,15 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - // "httpMethod": "PATCH", - // "id": "compute.backendBuckets.patch", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.backendServices.testIamPermissions", // "parameterOrder": [ // "project", - // "backendBucket" + // "resource" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -67535,50 +72601,53 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}", + // "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", // "request": { - // "$ref": "BackendBucket" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.setEdgeSecurityPolicy": +// method id "compute.backendServices.update": -type BackendBucketsSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendBucket string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesUpdateCall struct { + s *Service + project string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetEdgeSecurityPolicy: Sets the edge security policy for the -// specified backend bucket. +// Update: Updates the specified BackendService resource with the data +// included in the request. For more information, see Backend services +// overview. // -// - backendBucket: Name of the BackendService resource to which the -// security policy should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBucket string, securitypolicyreference *SecurityPolicyReference) *BackendBucketsSetEdgeSecurityPolicyCall { - c := &BackendBucketsSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to update. +// - project: Project ID for this request. +func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { + c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.securitypolicyreference = securitypolicyreference + c.backendService = backendService + c.backendservice = backendservice return c } @@ -67593,7 +72662,7 @@ func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBuc // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendBucketsSetEdgeSecurityPolicyCall { +func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -67601,7 +72670,7 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *B // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetEdgeSecurityPolicyCall { +func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67609,21 +72678,21 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) 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 *BackendBucketsSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendBucketsSetEdgeSecurityPolicyCall { +func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Header() http.Header { +func (c *BackendServicesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -67631,35 +72700,35 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") 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{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.setEdgeSecurityPolicy" call. +// Do executes the "compute.backendServices.update" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67690,18 +72759,19 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the edge security policy for the specified backend bucket.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.setEdgeSecurityPolicy", + // "description": "Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "PUT", + // "id": "compute.backendServices.update", // "parameterOrder": [ // "project", - // "backendBucket" + // "backendService" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "backendService": { + // "description": "Name of the BackendService resource to update.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -67718,9 +72788,9 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", + // "path": "projects/{project}/global/backendServices/{backendService}", // "request": { - // "$ref": "SecurityPolicyReference" + // "$ref": "BackendService" // }, // "response": { // "$ref": "Operation" @@ -67733,93 +72803,190 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio } -// method id "compute.backendBuckets.setIamPolicy": +// method id "compute.diskTypes.aggregatedList": -type BackendBucketsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DiskTypesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// AggregatedList: Retrieves an aggregated list of disk types. // // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { - c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { + c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *DiskTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DiskTypesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *DiskTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { +func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { +func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { +func (c *DiskTypesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, 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.globalsetpolicyrequest) - 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, "projects/{project}/global/backendBuckets/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/diskTypes") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.diskTypes.aggregatedList" call. +// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67838,7 +73005,7 @@ func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &DiskTypeAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67850,15 +73017,42 @@ func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.setIamPolicy", + // "description": "Retrieves an aggregated list of disk types.", + // "flatPath": "projects/{project}/aggregated/diskTypes", + // "httpMethod": "GET", + // "id": "compute.diskTypes.aggregatedList", // "parameterOrder": [ - // "project", - // "resource" + // "project" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -67866,116 +73060,143 @@ func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - // "request": { - // "$ref": "GlobalSetPolicyRequest" - // }, + // "path": "projects/{project}/aggregated/diskTypes", // "response": { - // "$ref": "Policy" + // "$ref": "DiskTypeAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.testIamPermissions": +// 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 *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) 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 BackendBucketsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.diskTypes.get": + +type DiskTypesGetCall struct { + s *Service + project string + zone string + diskType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Get: Returns the specified disk type. // +// - diskType: Name of the disk type to return. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { - c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { + c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.zone = zone + c.diskType = diskType return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { +func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { +func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { +func (c *DiskTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - 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, "projects/{project}/global/backendBuckets/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes/{diskType}") 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{ "project": c.project, - "resource": c.resource, + "zone": c.zone, + "diskType": c.diskType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.diskTypes.get" call. +// Exactly one of *DiskType or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *DiskType.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67994,7 +73215,7 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &DiskType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68006,15 +73227,23 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.testIamPermissions", + // "description": "Returns the specified disk type.", + // "flatPath": "projects/{project}/zones/{zone}/diskTypes/{diskType}", + // "httpMethod": "GET", + // "id": "compute.diskTypes.get", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "diskType" // ], // "parameters": { + // "diskType": { + // "description": "Name of the disk type to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -68022,20 +73251,17 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "The name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/diskTypes/{diskType}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "DiskType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -68046,109 +73272,182 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } -// method id "compute.backendBuckets.update": +// method id "compute.diskTypes.list": -type BackendBucketsUpdateCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DiskTypesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified BackendBucket resource with the data -// included in the request. +// List: Retrieves a list of disk types available to the specified +// project. // -// - backendBucket: Name of the BackendBucket resource to update. // - project: Project ID for this request. -func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { - c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { + c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket + c.zone = zone return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *DiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { +func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { +func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendBucketsUpdateCall) Header() http.Header { +func (c *DiskTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, 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.backendbucket) - 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, "projects/{project}/global/backendBuckets/{backendBucket}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.diskTypes.list" call. +// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at +// *DiskTypeList.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68167,7 +73466,7 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &DiskTypeList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68179,20 +73478,36 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - // "httpMethod": "PUT", - // "id": "compute.backendBuckets.update", + // "description": "Retrieves a list of disk types available to the specified project.", + // "flatPath": "projects/{project}/zones/{zone}/diskTypes", + // "httpMethod": "GET", + // "id": "compute.diskTypes.list", // "parameterOrder": [ // "project", - // "backendBucket" + // "zone" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -68202,50 +73517,79 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, + // "path": "projects/{project}/zones/{zone}/diskTypes", // "response": { - // "$ref": "Operation" + // "$ref": "DiskTypeList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendServices.addSignedUrlKey": +// 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 *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) 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 BackendServicesAddSignedUrlKeyCall struct { - s *Service - project string - backendService string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.disks.addResourcePolicies": + +type DisksAddResourcePoliciesCall struct { + s *Service + project string + zone string + disk string + disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend service. +// AddResourcePolicies: Adds existing resource policies to a disk. You +// can only add one policy which will be applied to this disk for +// scheduling snapshot creation. // -// - backendService: Name of the BackendService resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { - c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: The disk name for this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { + c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.signedurlkey = signedurlkey + c.zone = zone + c.disk = disk + c.disksaddresourcepoliciesrequest = disksaddresourcepoliciesrequest return c } @@ -68260,7 +73604,7 @@ func (r *BackendServicesService) AddSignedUrlKey(project string, backendService // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *BackendServicesAddSignedUrlKeyCall { +func (c *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -68268,7 +73612,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *Backen // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesAddSignedUrlKeyCall { +func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68276,21 +73620,21 @@ func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *Backe // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesAddSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesAddSignedUrlKeyCall { +func (c *DisksAddResourcePoliciesCall) Context(ctx context.Context) *DisksAddResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { +func (c *DisksAddResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68298,14 +73642,14 @@ func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksaddresourcepoliciesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -68313,20 +73657,21 @@ func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.addSignedUrlKey" call. +// Do executes the "compute.disks.addResourcePolicies" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68357,18 +73702,20 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend service.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", + // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", // "httpMethod": "POST", - // "id": "compute.backendServices.addSignedUrlKey", + // "id": "compute.disks.addResourcePolicies", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "disk" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "disk": { + // "description": "The disk name for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -68383,11 +73730,18 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", // "request": { - // "$ref": "SignedUrlKey" + // "$ref": "DisksAddResourcePoliciesRequest" // }, // "response": { // "$ref": "Operation" @@ -68400,9 +73754,9 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* } -// method id "compute.backendServices.aggregatedList": +// method id "compute.disks.aggregatedList": -type BackendServicesAggregatedListCall struct { +type DisksAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -68411,12 +73765,11 @@ type BackendServicesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. +// AggregatedList: Retrieves an aggregated list of persistent disks. // -// - project: Name of the project scoping this request. -func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { - c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { + c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -68456,7 +73809,7 @@ func (r *BackendServicesService) AggregatedList(project string) *BackendServices // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { c.urlParams_.Set("filter", filter) return c } @@ -68469,7 +73822,7 @@ func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServic // response. For resource types which predate this field, if this flag // is omitted or false, only scopes of the scope types where the // resource type is expected to be found will be included. -func (c *BackendServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DisksAggregatedListCall { c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } @@ -68480,7 +73833,7 @@ func (c *BackendServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bo // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -68494,7 +73847,7 @@ func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *Backen // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -68502,7 +73855,7 @@ func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServ // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -68511,7 +73864,7 @@ func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *Backend // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *BackendServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -68519,7 +73872,7 @@ func (c *BackendServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSu // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68529,7 +73882,7 @@ func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *Backen // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -68537,21 +73890,21 @@ func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *Backe // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { +func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesAggregatedListCall) Header() http.Header { +func (c *DisksAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68564,7 +73917,7 @@ func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -68577,14 +73930,14 @@ func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.aggregatedList" call. -// Exactly one of *BackendServiceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *BackendServiceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.disks.aggregatedList" call. +// Exactly one of *DiskAggregatedList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DiskAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) { +func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68603,7 +73956,7 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceAggregatedList{ + ret := &DiskAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68615,10 +73968,10 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B } return ret, nil // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - // "flatPath": "projects/{project}/aggregated/backendServices", + // "description": "Retrieves an aggregated list of persistent disks.", + // "flatPath": "projects/{project}/aggregated/disks", // "httpMethod": "GET", - // "id": "compute.backendServices.aggregatedList", + // "id": "compute.disks.aggregatedList", // "parameterOrder": [ // "project" // ], @@ -68652,7 +74005,7 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B // "type": "string" // }, // "project": { - // "description": "Name of the project scoping this request.", + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -68664,9 +74017,9 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/backendServices", + // "path": "projects/{project}/aggregated/disks", // "response": { - // "$ref": "BackendServiceAggregatedList" + // "$ref": "DiskAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -68680,7 +74033,7 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B // 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 *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error { +func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -68698,25 +74051,27 @@ func (c *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*B } } -// method id "compute.backendServices.delete": +// method id "compute.disks.bulkInsert": -type BackendServicesDeleteCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksBulkInsertCall struct { + s *Service + project string + zone string + bulkinsertdiskresource *BulkInsertDiskResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified BackendService resource. +// BulkInsert: Bulk create a set of disks. // -// - backendService: Name of the BackendService resource to delete. // - project: Project ID for this request. -func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { - c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskresource *BulkInsertDiskResource) *DisksBulkInsertCall { + c := &DisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService + c.zone = zone + c.bulkinsertdiskresource = bulkinsertdiskresource return c } @@ -68731,7 +74086,7 @@ func (r *BackendServicesService) Delete(project string, backendService string) * // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { +func (c *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -68739,7 +74094,7 @@ func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServices // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { +func (c *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68747,21 +74102,21 @@ func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendService // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { +func (c *DisksBulkInsertCall) Context(ctx context.Context) *DisksBulkInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesDeleteCall) Header() http.Header { +func (c *DisksBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68769,30 +74124,35 @@ func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertdiskresource) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkInsert") 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{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.delete" call. +// Do executes the "compute.disks.bulkInsert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68823,22 +74183,15 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified BackendService resource.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", - // "httpMethod": "DELETE", - // "id": "compute.backendServices.delete", + // "description": "Bulk create a set of disks.", + // "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", + // "httpMethod": "POST", + // "id": "compute.disks.bulkInsert", // "parameterOrder": [ // "project", - // "backendService" + // "zone" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -68850,9 +74203,19 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/zones/{zone}/disks/bulkInsert", + // "request": { + // "$ref": "BulkInsertDiskResource" + // }, // "response": { // "$ref": "Operation" // }, @@ -68864,29 +74227,41 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.backendServices.deleteSignedUrlKey": +// method id "compute.disks.createSnapshot": -type BackendServicesDeleteSignedUrlKeyCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksCreateSnapshotCall struct { + s *Service + project string + zone string + disk string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend service. +// CreateSnapshot: Creates a snapshot of a specified persistent disk. +// For regular snapshot creation, consider using snapshots.insert +// instead, as that method supports more features, such as creating +// snapshots in a project different from the source disk project. // -// - backendService: Name of the BackendService resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { - c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: Name of the persistent disk to snapshot. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { + c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.urlParams_.Set("keyName", keyName) + c.zone = zone + c.disk = disk + c.snapshot = snapshot + return c +} + +// GuestFlush sets the optional parameter "guestFlush": [Input Only] +// Whether to attempt an application consistent snapshot by informing +// the OS to prepare for the snapshot process. +func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { + c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) return c } @@ -68901,7 +74276,7 @@ func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendServi // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendServicesDeleteSignedUrlKeyCall { +func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { c.urlParams_.Set("requestId", requestId) return c } @@ -68909,7 +74284,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *Bac // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesDeleteSignedUrlKeyCall { +func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68917,21 +74292,21 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *Ba // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesDeleteSignedUrlKeyCall { +func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { +func (c *DisksCreateSnapshotCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68939,9 +74314,14 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -68949,20 +74329,21 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.deleteSignedUrlKey" call. +// Do executes the "compute.disks.createSnapshot" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68993,27 +74374,27 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend service.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", + // "description": "Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", // "httpMethod": "POST", - // "id": "compute.backendServices.deleteSignedUrlKey", + // "id": "compute.disks.createSnapshot", // "parameterOrder": [ // "project", - // "backendService", - // "keyName" + // "zone", + // "disk" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "disk": { + // "description": "Name of the persistent disk to snapshot.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "keyName": { - // "description": "The name of the Signed URL Key to delete.", + // "guestFlush": { + // "description": "[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.", // "location": "query", - // "required": true, - // "type": "string" + // "type": "boolean" // }, // "project": { // "description": "Project ID for this request.", @@ -69026,9 +74407,19 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", + // "request": { + // "$ref": "Snapshot" + // }, // "response": { // "$ref": "Operation" // }, @@ -69040,99 +74431,108 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } -// method id "compute.backendServices.get": +// method id "compute.disks.delete": -type BackendServicesGetCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksDeleteCall struct { + s *Service + project string + zone string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified BackendService resource. +// Delete: Deletes the specified persistent disk. Deleting a disk +// removes its data permanently and is irreversible. However, deleting a +// disk does not delete any snapshots previously made from the disk. You +// must separately delete snapshots. // -// - backendService: Name of the BackendService resource to return. +// - disk: Name of the persistent disk to delete. // - project: Project ID for this request. -func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { - c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { + c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService + c.zone = zone + c.disk = disk + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { +func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { +func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesGetCall) Header() http.Header { +func (c *DisksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") 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{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx +// Do executes the "compute.disks.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69151,7 +74551,7 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendService{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69163,19 +74563,19 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi } return ret, nil // { - // "description": "Returns the specified BackendService resource.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", - // "httpMethod": "GET", - // "id": "compute.backendServices.get", + // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", + // "httpMethod": "DELETE", + // "id": "compute.disks.delete", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "disk" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", + // "disk": { + // "description": "Name of the persistent disk to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -69185,110 +74585,129 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/zones/{zone}/disks/{disk}", // "response": { - // "$ref": "BackendService" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendServices.getHealth": +// method id "compute.disks.get": -type BackendServicesGetHealthCall struct { - s *Service - project string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksGetCall struct { + s *Service + project string + zone string + disk string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GetHealth: Gets the most recent health check results for this -// BackendService. Example request body: { "group": -// "/zones/us-east1-b/instanceGroups/lb-backend-example" } +// Get: Returns the specified persistent disk. // -// - backendService: Name of the BackendService resource to which the -// queried instance belongs. -// - project: . -func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { - c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: Name of the persistent disk to return. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { + c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference + c.zone = zone + c.disk = disk return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { +func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { +func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesGetHealthCall) Header() http.Header { +func (c *DisksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksGetCall) doRequest(alt string) (*http.Response, 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.resourcegroupreference) - 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, "projects/{project}/global/backendServices/{backendService}/getHealth") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") 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{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { +// Do executes the "compute.disks.get" call. +// Exactly one of *Disk or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Disk.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69307,7 +74726,7 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceGroupHealth{ + ret := &Disk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69319,35 +74738,41 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Gets the most recent health check results for this BackendService. Example request body: { \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\" }", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", - // "httpMethod": "POST", - // "id": "compute.backendServices.getHealth", + // "description": "Returns the specified persistent disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", + // "httpMethod": "GET", + // "id": "compute.disks.get", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "disk" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", + // "disk": { + // "description": "Name of the persistent disk to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/getHealth", - // "request": { - // "$ref": "ResourceGroupReference" - // }, + // "path": "projects/{project}/zones/{zone}/disks/{disk}", // "response": { - // "$ref": "BackendServiceGroupHealth" + // "$ref": "Disk" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -69358,11 +74783,12 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen } -// method id "compute.backendServices.getIamPolicy": +// method id "compute.disks.getIamPolicy": -type BackendServicesGetIamPolicyCall struct { +type DisksGetIamPolicyCall struct { s *Service project string + zone string resource string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -69375,16 +74801,18 @@ type BackendServicesGetIamPolicyCall struct { // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *BackendServicesService) GetIamPolicy(project string, resource string) *BackendServicesGetIamPolicyCall { - c := &BackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { + c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone c.resource = resource return c } // OptionsRequestedPolicyVersion sets the optional parameter // "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendServicesGetIamPolicyCall { +func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -69392,7 +74820,7 @@ func (c *BackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsR // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesGetIamPolicyCall { +func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69402,7 +74830,7 @@ func (c *BackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendS // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendServicesGetIamPolicyCall { +func (c *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -69410,21 +74838,21 @@ func (c *BackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *Backend // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesGetIamPolicyCall) Context(ctx context.Context) *BackendServicesGetIamPolicyCall { +func (c *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesGetIamPolicyCall) Header() http.Header { +func (c *DisksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -69437,7 +74865,7 @@ func (c *BackendServicesGetIamPolicyCall) 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, "projects/{project}/global/backendServices/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -69446,19 +74874,20 @@ func (c *BackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.getIamPolicy" call. +// Do executes the "compute.disks.getIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69490,11 +74919,12 @@ func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol return ret, nil // { // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/global/backendServices/{resource}/getIamPolicy", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", // "httpMethod": "GET", - // "id": "compute.backendServices.getIamPolicy", + // "id": "compute.disks.getIamPolicy", // "parameterOrder": [ // "project", + // "zone", // "resource" // ], // "parameters": { @@ -69514,12 +74944,19 @@ func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol // "resource": { // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{resource}/getIamPolicy", + // "path": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", // "response": { // "$ref": "Policy" // }, @@ -69532,26 +74969,32 @@ func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol } -// method id "compute.backendServices.insert": +// method id "compute.disks.insert": -type BackendServicesInsertCall struct { - s *Service - project string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksInsertCall struct { + s *Service + project string + zone string + disk *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a BackendService resource in the specified project -// using the data included in the request. For more information, see -// Backend services overview . +// Insert: Creates a persistent disk in the specified project using the +// data in the request. You can create a disk from a source +// (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 +// GB data disk by omitting all properties. You can also create a disk +// that is larger than the default size by specifying the sizeGb +// property. // // - project: Project ID for this request. -func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { - c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { + c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendservice = backendservice + c.zone = zone + c.disk = disk return c } @@ -69566,15 +75009,22 @@ func (r *BackendServicesService) Insert(project string, backendservice *BackendS // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { +func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { c.urlParams_.Set("requestId", requestId) return c } +// SourceImage sets the optional parameter "sourceImage": Source image +// to restore onto a disk. This field is optional. +func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { + c.urlParams_.Set("sourceImage", sourceImage) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { +func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69582,21 +75032,21 @@ func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendService // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { +func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesInsertCall) Header() http.Header { +func (c *DisksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -69604,14 +75054,14 @@ func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -69620,18 +75070,19 @@ func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.insert" call. +// Do executes the "compute.disks.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69662,12 +75113,13 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .", - // "flatPath": "projects/{project}/global/backendServices", + // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + // "flatPath": "projects/{project}/zones/{zone}/disks", // "httpMethod": "POST", - // "id": "compute.backendServices.insert", + // "id": "compute.disks.insert", // "parameterOrder": [ - // "project" + // "project", + // "zone" // ], // "parameters": { // "project": { @@ -69681,11 +75133,23 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "sourceImage": { + // "description": "Source image to restore onto a disk. This field is optional.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices", + // "path": "projects/{project}/zones/{zone}/disks", // "request": { - // "$ref": "BackendService" + // "$ref": "Disk" // }, // "response": { // "$ref": "Operation" @@ -69698,24 +75162,27 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.backendServices.list": +// method id "compute.disks.list": -type BackendServicesListCall struct { +type DisksListCall struct { s *Service project string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of BackendService resources available to the -// specified project. +// List: Retrieves a list of persistent disks contained within the +// specified zone. // // - project: Project ID for this request. -func (r *BackendServicesService) List(project string) *BackendServicesListCall { - c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) List(project string, zone string) *DisksListCall { + c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone return c } @@ -69754,7 +75221,7 @@ func (r *BackendServicesService) List(project string) *BackendServicesListCall { // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { +func (c *DisksListCall) Filter(filter string) *DisksListCall { c.urlParams_.Set("filter", filter) return c } @@ -69765,7 +75232,7 @@ func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { +func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -69779,7 +75246,7 @@ func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesL // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { +func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -69787,7 +75254,7 @@ func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCa // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { +func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -69796,7 +75263,7 @@ func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesLi // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *BackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListCall { +func (c *DisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -69804,7 +75271,7 @@ func (c *BackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { +func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69814,7 +75281,7 @@ func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesL // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { +func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { c.ifNoneMatch_ = entityTag return c } @@ -69822,21 +75289,21 @@ func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServices // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { +func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesListCall) Header() http.Header { +func (c *DisksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -69849,7 +75316,7 @@ func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -69858,18 +75325,19 @@ func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { +// Do executes the "compute.disks.list" call. +// Exactly one of *DiskList or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *DiskList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69888,7 +75356,7 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceList{ + ret := &DiskList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69900,12 +75368,13 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ } return ret, nil // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", - // "flatPath": "projects/{project}/global/backendServices", + // "description": "Retrieves a list of persistent disks contained within the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/disks", // "httpMethod": "GET", - // "id": "compute.backendServices.list", + // "id": "compute.disks.list", // "parameterOrder": [ - // "project" + // "project", + // "zone" // ], // "parameters": { // "filter": { @@ -69942,11 +75411,18 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices", + // "path": "projects/{project}/zones/{zone}/disks", // "response": { - // "$ref": "BackendServiceList" + // "$ref": "DiskList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -69960,7 +75436,7 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ // 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 *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { +func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -69978,30 +75454,30 @@ func (c *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServ } } -// method id "compute.backendServices.patch": +// method id "compute.disks.removeResourcePolicies": -type BackendServicesPatchCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksRemoveResourcePoliciesCall struct { + s *Service + project string + zone string + disk string + disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified BackendService resource with the data -// included in the request. For more information, see Backend services -// overview. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// RemoveResourcePolicies: Removes resource policies from a disk. // -// - backendService: Name of the BackendService resource to patch. +// - disk: The disk name for this request. // - project: Project ID for this request. -func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { - c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { + c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.backendservice = backendservice + c.zone = zone + c.disk = disk + c.disksremoveresourcepoliciesrequest = disksremoveresourcepoliciesrequest return c } @@ -70016,7 +75492,7 @@ func (r *BackendServicesService) Patch(project string, backendService string, ba // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { +func (c *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemoveResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -70024,7 +75500,7 @@ func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesP // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { +func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRemoveResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70032,21 +75508,21 @@ func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServices // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { +func (c *DisksRemoveResourcePoliciesCall) Context(ctx context.Context) *DisksRemoveResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesPatchCall) Header() http.Header { +func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -70054,35 +75530,36 @@ func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksremoveresourcepoliciesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") 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{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.patch" call. +// Do executes the "compute.disks.removeResourcePolicies" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70113,17 +75590,18 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", - // "httpMethod": "PATCH", - // "id": "compute.backendServices.patch", + // "description": "Removes resource policies from a disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "httpMethod": "POST", + // "id": "compute.disks.removeResourcePolicies", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "disk" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", + // "disk": { + // "description": "The disk name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -70140,11 +75618,18 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", // "request": { - // "$ref": "BackendService" + // "$ref": "DisksRemoveResourcePoliciesRequest" // }, // "response": { // "$ref": "Operation" @@ -70157,30 +75642,31 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.backendServices.setEdgeSecurityPolicy": +// method id "compute.disks.resize": -type BackendServicesSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksResizeCall struct { + s *Service + project string + zone string + disk string + disksresizerequest *DisksResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetEdgeSecurityPolicy: Sets the edge security policy for the -// specified backend service. +// Resize: Resizes the specified persistent disk. You can only increase +// the size of the disk. // -// - backendService: Name of the BackendService resource to which the -// edge security policy should be set. The name should conform to -// RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetEdgeSecurityPolicyCall { - c := &BackendServicesSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: The name of the persistent disk. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { + c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference + c.zone = zone + c.disk = disk + c.disksresizerequest = disksresizerequest return c } @@ -70195,7 +75681,7 @@ func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendSe // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetEdgeSecurityPolicyCall { +func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { c.urlParams_.Set("requestId", requestId) return c } @@ -70203,7 +75689,7 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetEdgeSecurityPolicyCall { +func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70211,21 +75697,21 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) 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 *BackendServicesSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetEdgeSecurityPolicyCall { +func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Header() http.Header { +func (c *DisksResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -70233,14 +75719,14 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70248,20 +75734,21 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.setEdgeSecurityPolicy" call. +// Do executes the "compute.disks.resize" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70292,18 +75779,20 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Sets the edge security policy for the specified backend service.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", + // "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/resize", // "httpMethod": "POST", - // "id": "compute.backendServices.setEdgeSecurityPolicy", + // "id": "compute.disks.resize", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "disk" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035.", + // "disk": { + // "description": "The name of the persistent disk.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -70318,11 +75807,18 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOpti // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/resize", // "request": { - // "$ref": "SecurityPolicyReference" + // "$ref": "DisksResizeRequest" // }, // "response": { // "$ref": "Operation" @@ -70335,16 +75831,17 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOpti } -// method id "compute.backendServices.setIamPolicy": +// method id "compute.disks.setIamPolicy": -type BackendServicesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // SetIamPolicy: Sets the access control policy on the specified @@ -70352,18 +75849,20 @@ type BackendServicesSetIamPolicyCall struct { // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *BackendServicesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendServicesSetIamPolicyCall { - c := &BackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { + c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + c.zonesetpolicyrequest = zonesetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetIamPolicyCall { +func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70371,21 +75870,21 @@ func (c *BackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendS // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesSetIamPolicyCall) Context(ctx context.Context) *BackendServicesSetIamPolicyCall { +func (c *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesSetIamPolicyCall) Header() http.Header { +func (c *DisksSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -70393,14 +75892,14 @@ func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70409,19 +75908,20 @@ func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.setIamPolicy" call. +// Do executes the "compute.disks.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70453,11 +75953,12 @@ func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/global/backendServices/{resource}/setIamPolicy", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", // "httpMethod": "POST", - // "id": "compute.backendServices.setIamPolicy", + // "id": "compute.disks.setIamPolicy", // "parameterOrder": [ // "project", + // "zone", // "resource" // ], // "parameters": { @@ -70471,384 +75972,58 @@ func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol // "resource": { // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/backendServices/{resource}/setIamPolicy", - // "request": { - // "$ref": "GlobalSetPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.setSecurityPolicy": - -type BackendServicesSetSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for -// the specified backend service. For more information, see Google Cloud -// Armor Overview -// -// - backendService: Name of the BackendService resource to which the -// security policy should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { - c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { - 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 *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, 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.securitypolicyreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setSecurityPolicy" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - // "httpMethod": "POST", - // "id": "compute.backendServices.setSecurityPolicy", - // "parameterOrder": [ - // "project", - // "backendService" - // ], - // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - // "request": { - // "$ref": "SecurityPolicyReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.backendServices.testIamPermissions": - -type BackendServicesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { - c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { - 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 *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.backendServices.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "The name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", + // "path": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "ZoneSetPolicyRequest" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Policy" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendServices.update": +// method id "compute.disks.setLabels": -type BackendServicesUpdateCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksSetLabelsCall struct { + s *Service + project string + zone string + resource string + zonesetlabelsrequest *ZoneSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified BackendService resource with the data -// included in the request. For more information, see Backend services -// overview. +// SetLabels: Sets the labels on a disk. To learn more about labels, +// read the Labeling Resources documentation. // -// - backendService: Name of the BackendService resource to update. // - project: Project ID for this request. -func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { - c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { + c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.backendservice = backendservice + c.zone = zone + c.resource = resource + c.zonesetlabelsrequest = zonesetlabelsrequest return c } @@ -70863,7 +76038,7 @@ func (r *BackendServicesService) Update(project string, backendService string, b // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { +func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -70871,7 +76046,7 @@ func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServices // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { +func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70879,21 +76054,21 @@ func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendService // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { +func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *BackendServicesUpdateCall) Header() http.Header { +func (c *DisksSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -70901,35 +76076,36 @@ func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setLabels") 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{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.update" call. +// Do executes the "compute.disks.setLabels" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70960,22 +76136,16 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", - // "httpMethod": "PUT", - // "id": "compute.backendServices.update", + // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.disks.setLabels", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "resource" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -70987,11 +76157,25 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", // "request": { - // "$ref": "BackendService" + // "$ref": "ZoneSetLabelsRequest" // }, // "response": { // "$ref": "Operation" @@ -71004,190 +76188,113 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.diskTypes.aggregatedList": +// method id "compute.disks.startAsyncReplication": -type DiskTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksStartAsyncReplicationCall struct { + s *Service + project string + zone string + disk string + disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves an aggregated list of disk types. +// StartAsyncReplication: Starts asynchronous replication. Must be +// invoked on the primary disk. // +// - disk: The name of the persistent disk. // - project: Project ID for this request. -func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { - c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) StartAsyncReplication(project string, zone string, disk string, disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest) *DisksStartAsyncReplicationCall { + c := &DisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.disk = disk + c.disksstartasyncreplicationrequest = disksstartasyncreplicationrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *DiskTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DiskTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *DiskTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksStartAsyncReplicationCall) RequestId(requestId string) *DisksStartAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { +func (c *DisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStartAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { +func (c *DisksStartAsyncReplicationCall) Context(ctx context.Context) *DisksStartAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DiskTypesAggregatedListCall) Header() http.Header { +func (c *DisksStartAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, 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.disksstartasyncreplicationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/diskTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication") 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{ "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.diskTypes.aggregatedList" call. -// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) { +// Do executes the "compute.disks.startAsyncReplication" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71206,7 +76313,7 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskTypeAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71218,40 +76325,21 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of disk types.", - // "flatPath": "projects/{project}/aggregated/diskTypes", - // "httpMethod": "GET", - // "id": "compute.diskTypes.aggregatedList", + // "description": "Starts asynchronous replication. Must be invoked on the primary disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", + // "httpMethod": "POST", + // "id": "compute.disks.startAsyncReplication", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "disk" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "disk": { + // "description": "The name of the persistent disk.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -71261,143 +76349,134 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/diskTypes", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", + // "request": { + // "$ref": "DisksStartAsyncReplicationRequest" + // }, // "response": { - // "$ref": "DiskTypeAggregatedList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) 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 "compute.diskTypes.get": +// method id "compute.disks.stopAsyncReplication": -type DiskTypesGetCall struct { - s *Service - project string - zone string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksStopAsyncReplicationCall struct { + s *Service + project string + zone string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified disk type. +// StopAsyncReplication: Stops asynchronous replication. Can be invoked +// either on the primary or on the secondary disk. // -// - diskType: Name of the disk type to return. +// - disk: The name of the persistent disk. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { - c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) StopAsyncReplication(project string, zone string, disk string) *DisksStopAsyncReplicationCall { + c := &DisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.diskType = diskType + c.disk = disk + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksStopAsyncReplicationCall) RequestId(requestId string) *DisksStopAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { +func (c *DisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { +func (c *DisksStopAsyncReplicationCall) Context(ctx context.Context) *DisksStopAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DiskTypesGetCall) Header() http.Header { +func (c *DisksStopAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/diskTypes/{diskType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication") 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{ - "project": c.project, - "zone": c.zone, - "diskType": c.diskType, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.diskTypes.get" call. -// Exactly one of *DiskType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at +// Do executes the "compute.disks.stopAsyncReplication" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { +func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71416,7 +76495,7 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskType{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71428,18 +76507,18 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { } return ret, nil // { - // "description": "Returns the specified disk type.", - // "flatPath": "projects/{project}/zones/{zone}/diskTypes/{diskType}", - // "httpMethod": "GET", - // "id": "compute.diskTypes.get", + // "description": "Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", + // "httpMethod": "POST", + // "id": "compute.disks.stopAsyncReplication", // "parameterOrder": [ // "project", // "zone", - // "diskType" + // "disk" // ], // "parameters": { - // "diskType": { - // "description": "Name of the disk type to return.", + // "disk": { + // "description": "The name of the persistent disk.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -71452,6 +76531,11 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -71460,176 +76544,104 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/diskTypes/{diskType}", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", // "response": { - // "$ref": "DiskType" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.diskTypes.list": +// method id "compute.disks.stopGroupAsyncReplication": -type DiskTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksStopGroupAsyncReplicationCall struct { + s *Service + project string + zone string + disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of disk types available to the specified -// project. +// StopGroupAsyncReplication: Stops asynchronous replication for a +// consistency group of disks. Can be invoked either in the primary or +// secondary scope. // -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { - c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone for this request. This must be the zone +// of the primary or secondary disks in the consistency group. +func (r *DisksService) StopGroupAsyncReplication(project string, zone string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *DisksStopGroupAsyncReplicationCall { + c := &DisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *DiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksStopGroupAsyncReplicationCall) RequestId(requestId string) *DisksStopGroupAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { +func (c *DisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopGroupAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { +func (c *DisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *DisksStopGroupAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DiskTypesListCall) Header() http.Header { +func (c *DisksStopGroupAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, 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.disksstopgroupasyncreplicationresource) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -71641,14 +76653,14 @@ func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.diskTypes.list" call. -// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx +// Do executes the "compute.disks.stopGroupAsyncReplication" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *DiskTypeList.ServerResponse.Header or (if a response was returned at +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) { +func (c *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71667,7 +76679,7 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskTypeList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71679,38 +76691,15 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err } return ret, nil // { - // "description": "Retrieves a list of disk types available to the specified project.", - // "flatPath": "projects/{project}/zones/{zone}/diskTypes", - // "httpMethod": "GET", - // "id": "compute.diskTypes.list", + // "description": "Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.", + // "flatPath": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", + // "httpMethod": "POST", + // "id": "compute.disks.stopGroupAsyncReplication", // "parameterOrder": [ // "project", // "zone" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -71718,102 +76707,66 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { - // "description": "The name of the zone for this request.", + // "description": "The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/diskTypes", + // "path": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", + // "request": { + // "$ref": "DisksStopGroupAsyncReplicationResource" + // }, // "response": { - // "$ref": "DiskTypeList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) 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 "compute.disks.addResourcePolicies": +// method id "compute.disks.testIamPermissions": -type DisksAddResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddResourcePolicies: Adds existing resource policies to a disk. You -// can only add one policy which will be applied to this disk for -// scheduling snapshot creation. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - disk: The disk name for this request. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { - c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { + c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.disk = disk - c.disksaddresourcepoliciesrequest = disksaddresourcepoliciesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddResourcePoliciesCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddResourcePoliciesCall { +func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71821,21 +76774,21 @@ func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddRes // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksAddResourcePoliciesCall) Context(ctx context.Context) *DisksAddResourcePoliciesCall { +func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksAddResourcePoliciesCall) Header() http.Header { +func (c *DisksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -71843,14 +76796,14 @@ func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksaddresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -71858,21 +76811,21 @@ func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.addResourcePolicies" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.disks.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71891,7 +76844,7 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71903,23 +76856,16 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.disks.addResourcePolicies", + // "id": "compute.disks.testIamPermissions", // "parameterOrder": [ // "project", // "zone", - // "disk" + // "resource" // ], // "parameters": { - // "disk": { - // "description": "The disk name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -71927,9 +76873,11 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { @@ -71940,205 +76888,144 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", + // "path": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", // "request": { - // "$ref": "DisksAddResourcePoliciesRequest" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.aggregatedList": +// method id "compute.disks.update": -type DisksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksUpdateCall struct { + s *Service + project string + zone string + disk string + disk2 *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves an aggregated list of persistent disks. +// Update: Updates the specified disk with the data included in the +// request. The update is performed only on selected fields included as +// part of update-mask. Only the following fields can be modified: +// user_license. // +// - disk: The disk name for this request. // - project: Project ID for this request. -func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { - c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) Update(project string, zone string, disk string, disk2 *Disk) *DisksUpdateCall { + c := &DisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.disk = disk + c.disk2 = disk2 return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *DisksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DisksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) +// Paths sets the optional parameter "paths": +func (c *DisksUpdateCall) Paths(paths ...string) *DisksUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksUpdateCall) RequestId(requestId string) *DisksUpdateCall { + c.urlParams_.Set("requestId", requestId) return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *DisksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// UpdateMask sets the optional parameter "updateMask": update_mask +// indicates fields to be updated as part of this request. +func (c *DisksUpdateCall) UpdateMask(updateMask string) *DisksUpdateCall { + 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 *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { +func (c *DisksUpdateCall) Fields(s ...googleapi.Field) *DisksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { +func (c *DisksUpdateCall) Context(ctx context.Context) *DisksUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksAggregatedListCall) Header() http.Header { +func (c *DisksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksUpdateCall) doRequest(alt string) (*http.Response, 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.disk2) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.aggregatedList" call. -// Exactly one of *DiskAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) { +// Do executes the "compute.disks.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72157,7 +77044,7 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72169,110 +77056,88 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } return ret, nil // { - // "description": "Retrieves an aggregated list of persistent disks.", - // "flatPath": "projects/{project}/aggregated/disks", - // "httpMethod": "GET", - // "id": "compute.disks.aggregatedList", + // "description": "Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", + // "httpMethod": "PATCH", + // "id": "compute.disks.update", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "disk" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", + // "disk": { + // "description": "The disk name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "paths": { // "location": "query", - // "type": "boolean" + // "repeated": true, + // "type": "string" // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "updateMask": { + // "description": "update_mask indicates fields to be updated as part of this request.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "zone": { + // "description": "The name of the zone for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" - // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/disks", + // "path": "projects/{project}/zones/{zone}/disks/{disk}", + // "request": { + // "$ref": "Disk" + // }, // "response": { - // "$ref": "DiskAggregatedList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) 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 "compute.disks.bulkInsert": +// method id "compute.externalVpnGateways.delete": -type DisksBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysDeleteCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BulkInsert: Bulk create a set of disks. +// Delete: Deletes the specified externalVpnGateway. // +// - externalVpnGateway: Name of the externalVpnGateways to delete. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskresource *BulkInsertDiskResource) *DisksBulkInsertCall { - c := &DisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { + c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.bulkinsertdiskresource = bulkinsertdiskresource + c.externalVpnGateway = externalVpnGateway return c } @@ -72287,7 +77152,7 @@ func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskres // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { +func (c *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -72295,7 +77160,7 @@ func (c *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall { +func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72303,21 +77168,21 @@ func (c *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksBulkInsertCall) Context(ctx context.Context) *DisksBulkInsertCall { +func (c *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksBulkInsertCall) Header() http.Header { +func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -72325,35 +77190,30 @@ func (c *DisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertdiskresource) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkInsert") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.bulkInsert" call. +// Do executes the "compute.externalVpnGateways.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72384,15 +77244,22 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Bulk create a set of disks.", - // "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", - // "httpMethod": "POST", - // "id": "compute.disks.bulkInsert", + // "description": "Deletes the specified externalVpnGateway.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "httpMethod": "DELETE", + // "id": "compute.externalVpnGateways.delete", // "parameterOrder": [ // "project", - // "zone" + // "externalVpnGateway" // ], // "parameters": { + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateways to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -72404,19 +77271,9 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/bulkInsert", - // "request": { - // "$ref": "BulkInsertDiskResource" - // }, + // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", // "response": { // "$ref": "Operation" // }, @@ -72428,123 +77285,100 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.disks.createSnapshot": +// method id "compute.externalVpnGateways.get": -type DisksCreateSnapshotCall struct { - s *Service - project string - zone string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysGetCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CreateSnapshot: Creates a snapshot of a specified persistent disk. -// For regular snapshot creation, consider using snapshots.insert -// instead, as that method supports more features, such as creating -// snapshots in a project different from the source disk project. +// Get: Returns the specified externalVpnGateway. Get a list of +// available externalVpnGateways by making a list() request. // -// - disk: Name of the persistent disk to snapshot. +// - externalVpnGateway: Name of the externalVpnGateway to return. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { - c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { + c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": [Input Only] -// Whether to attempt an application consistent snapshot by informing -// the OS to prepare for the snapshot process. -func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { - c.urlParams_.Set("requestId", requestId) + c.externalVpnGateway = externalVpnGateway return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { +func (c *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { +func (c *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksCreateSnapshotCall) Header() http.Header { +func (c *ExternalVpnGatewaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, 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.snapshot) - 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, "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.createSnapshot" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.externalVpnGateways.get" call. +// Exactly one of *ExternalVpnGateway or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGateway.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72563,7 +77397,7 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ExternalVpnGateway{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72575,88 +77409,62 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", - // "httpMethod": "POST", - // "id": "compute.disks.createSnapshot", + // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "httpMethod": "GET", + // "id": "compute.externalVpnGateways.get", // "parameterOrder": [ // "project", - // "zone", - // "disk" + // "externalVpnGateway" // ], // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to snapshot.", + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateway to return.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, - // "guestFlush": { - // "description": "[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.", - // "location": "query", - // "type": "boolean" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", - // "request": { - // "$ref": "Snapshot" - // }, + // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", // "response": { - // "$ref": "Operation" + // "$ref": "ExternalVpnGateway" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.delete": +// method id "compute.externalVpnGateways.insert": -type DisksDeleteCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysInsertCall struct { + s *Service + project string + externalvpngateway *ExternalVpnGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified persistent disk. Deleting a disk -// removes its data permanently and is irreversible. However, deleting a -// disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. +// Insert: Creates a ExternalVpnGateway in the specified project using +// the data included in the request. // -// - disk: Name of the persistent disk to delete. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { - c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { + c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.disk = disk + c.externalvpngateway = externalvpngateway return c } @@ -72671,7 +77479,7 @@ func (r *DisksService) Delete(project string, zone string, disk string) *DisksDe // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { +func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -72679,7 +77487,7 @@ func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { +func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72687,21 +77495,21 @@ func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { +func (c *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksDeleteCall) Header() http.Header { +func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -72709,31 +77517,34 @@ func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.externalvpngateway) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") 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{ "project": c.project, - "zone": c.zone, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.delete" call. +// Do executes the "compute.externalVpnGateways.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72764,22 +77575,14 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - // "httpMethod": "DELETE", - // "id": "compute.disks.delete", + // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/externalVpnGateways", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.insert", // "parameterOrder": [ - // "project", - // "zone", - // "disk" + // "project" // ], // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -72791,16 +77594,12 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}", + // "path": "projects/{project}/global/externalVpnGateways", + // "request": { + // "$ref": "ExternalVpnGateway" + // }, // "response": { // "$ref": "Operation" // }, @@ -72812,36 +77611,113 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } -// method id "compute.disks.get": +// method id "compute.externalVpnGateways.list": -type DisksGetCall struct { +type ExternalVpnGatewaysListCall struct { s *Service project string - zone string - disk string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified persistent disk. +// List: Retrieves the list of ExternalVpnGateway available to the +// specified project. // -// - disk: Name of the persistent disk to return. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { - c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { + c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.disk = disk + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *ExternalVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { +func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72851,7 +77727,7 @@ func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { +func (c *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { c.ifNoneMatch_ = entityTag return c } @@ -72859,21 +77735,21 @@ func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { +func (c *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksGetCall) Header() http.Header { +func (c *ExternalVpnGatewaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -72886,7 +77762,7 @@ func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -72895,20 +77771,18 @@ func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.get" call. -// Exactly one of *Disk or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { +// Do executes the "compute.externalVpnGateways.list" call. +// Exactly one of *ExternalVpnGatewayList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGatewayList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72927,7 +77801,7 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Disk{ + ret := &ExternalVpnGatewayList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72939,21 +77813,35 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns the specified persistent disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", + // "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + // "flatPath": "projects/{project}/global/externalVpnGateways", // "httpMethod": "GET", - // "id": "compute.disks.get", + // "id": "compute.externalVpnGateways.list", // "parameterOrder": [ - // "project", - // "zone", - // "disk" + // "project" // ], // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -72963,17 +77851,15 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}", + // "path": "projects/{project}/global/externalVpnGateways", // "response": { - // "$ref": "Disk" + // "$ref": "ExternalVpnGatewayList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -72984,111 +77870,114 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } -// method id "compute.disks.getIamPolicy": +// 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 *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) 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 DisksGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "compute.externalVpnGateways.setLabels": + +type ExternalVpnGatewaysSetLabelsCall struct { + s *Service + project string + resource string + globalsetlabelsrequest *GlobalSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more +// about labels, read the Labeling Resources documentation. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { - c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { + c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.globalsetlabelsrequest = globalsetlabelsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall { +func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall { +func (c *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksGetIamPolicyCall) Header() http.Header { +func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, 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.globalsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/setLabels") 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{ "project": c.project, - "zone": c.zone, "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.externalVpnGateways.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73107,7 +77996,7 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73119,22 +78008,15 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", - // "httpMethod": "GET", - // "id": "compute.disks.getIamPolicy", + // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.setLabels", // "parameterOrder": [ // "project", - // "zone", // "resource" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -73145,87 +78027,55 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error // "resource": { // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", + // "path": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", + // "request": { + // "$ref": "GlobalSetLabelsRequest" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.disks.insert": +// method id "compute.externalVpnGateways.testIamPermissions": -type DisksInsertCall struct { - s *Service - project string - zone string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a persistent disk in the specified project using the -// data in the request. You can create a disk from a source -// (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 -// GB data disk by omitting all properties. You can also create a disk -// that is larger than the default size by specifying the sizeGb -// property. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { - c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { + c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image -// to restore onto a disk. This field is optional. -func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73233,21 +78083,21 @@ func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksInsertCall) Header() http.Header { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -73255,14 +78105,14 @@ func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -73270,20 +78120,20 @@ func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.externalVpnGateways.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73302,7 +78152,7 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73314,13 +78164,13 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - // "flatPath": "projects/{project}/zones/{zone}/disks", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.disks.insert", + // "id": "compute.externalVpnGateways.testIamPermissions", // "parameterOrder": [ // "project", - // "zone" + // "resource" // ], // "parameters": { // "project": { @@ -73330,215 +78180,139 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sourceImage": { - // "description": "Source image to restore onto a disk. This field is optional.", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks", + // "path": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", // "request": { - // "$ref": "Disk" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.list": +// method id "compute.firewallPolicies.addAssociation": -type DisksListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallPoliciesAddAssociationCall struct { + s *Service + firewallPolicy string + firewallpolicyassociation *FirewallPolicyAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of persistent disks contained within the -// specified zone. +// AddAssociation: Inserts an association for the specified firewall +// policy. // -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) List(project string, zone string) *DisksListCall { - c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *DisksListCall) Filter(filter string) *DisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { - c.urlParams_.Set("orderBy", orderBy) +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) AddAssociation(firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *FirewallPoliciesAddAssociationCall { + c := &FirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + c.firewallpolicyassociation = firewallpolicyassociation return c } -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { - c.urlParams_.Set("pageToken", pageToken) +// ReplaceExistingAssociation sets the optional parameter +// "replaceExistingAssociation": Indicates whether or not to replace it +// if an association of the attachment already exists. This is false by +// default, in which case an error will be returned if an association +// already exists. +func (c *FirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *FirewallPoliciesAddAssociationCall { + c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *DisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesAddAssociationCall) RequestId(requestId string) *FirewallPoliciesAddAssociationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { +func (c *FirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddAssociationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { +func (c *FirewallPoliciesAddAssociationCall) Context(ctx context.Context) *FirewallPoliciesAddAssociationCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksListCall) Header() http.Header { +func (c *FirewallPoliciesAddAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, 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.firewallpolicyassociation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addAssociation") 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{ - "project": c.project, - "zone": c.zone, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.list" call. -// Exactly one of *DiskList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at +// Do executes the "compute.firewallPolicies.addAssociation" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { +func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73557,7 +78331,7 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73569,116 +78343,65 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { } return ret, nil // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", - // "flatPath": "projects/{project}/zones/{zone}/disks", - // "httpMethod": "GET", - // "id": "compute.disks.list", + // "description": "Inserts an association for the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.addAssociation", // "parameterOrder": [ - // "project", - // "zone" + // "firewallPolicy" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "replaceExistingAssociation": { + // "description": "Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists.", // "location": "query", // "type": "boolean" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", + // "request": { + // "$ref": "FirewallPolicyAssociation" + // }, // "response": { - // "$ref": "DiskList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) 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 "compute.disks.removeResourcePolicies": +// method id "compute.firewallPolicies.addRule": -type DisksRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesAddRuleCall struct { + s *Service + firewallPolicy string + firewallpolicyrule *FirewallPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from a disk. +// AddRule: Inserts a rule into a firewall policy. // -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { - c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksremoveresourcepoliciesrequest = disksremoveresourcepoliciesrequest +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) AddRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddRuleCall { + c := &FirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + c.firewallpolicyrule = firewallpolicyrule return c } @@ -73693,7 +78416,7 @@ func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemoveResourcePoliciesCall { +func (c *FirewallPoliciesAddRuleCall) RequestId(requestId string) *FirewallPoliciesAddRuleCall { c.urlParams_.Set("requestId", requestId) return c } @@ -73701,7 +78424,7 @@ func (c *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRemoveResourcePoliciesCall { +func (c *FirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73709,21 +78432,21 @@ func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRem // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksRemoveResourcePoliciesCall) Context(ctx context.Context) *DisksRemoveResourcePoliciesCall { +func (c *FirewallPoliciesAddRuleCall) Context(ctx context.Context) *FirewallPoliciesAddRuleCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { +func (c *FirewallPoliciesAddRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -73731,14 +78454,14 @@ func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksremoveresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addRule") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -73746,21 +78469,19 @@ func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.removeResourcePolicies" call. +// Do executes the "compute.firewallPolicies.addRule" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73791,27 +78512,18 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Removes resource policies from a disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "description": "Inserts a rule into a firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addRule", // "httpMethod": "POST", - // "id": "compute.disks.removeResourcePolicies", + // "id": "compute.firewallPolicies.addRule", // "parameterOrder": [ - // "project", - // "zone", - // "disk" + // "firewallPolicy" // ], // "parameters": { - // "disk": { - // "description": "The disk name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, @@ -73819,18 +78531,11 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/addRule", // "request": { - // "$ref": "DisksRemoveResourcePoliciesRequest" + // "$ref": "FirewallPolicyRule" // }, // "response": { // "$ref": "Operation" @@ -73843,31 +78548,22 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.disks.resize": +// method id "compute.firewallPolicies.cloneRules": -type DisksResizeCall struct { - s *Service - project string - zone string - disk string - disksresizerequest *DisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesCloneRulesCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resize: Resizes the specified persistent disk. You can only increase -// the size of the disk. +// CloneRules: Copies rules to the specified firewall policy. // -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { - c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksresizerequest = disksresizerequest +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) CloneRules(firewallPolicy string) *FirewallPoliciesCloneRulesCall { + c := &FirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy return c } @@ -73882,15 +78578,22 @@ func (r *DisksService) Resize(project string, zone string, disk string, disksres // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { +func (c *FirewallPoliciesCloneRulesCall) RequestId(requestId string) *FirewallPoliciesCloneRulesCall { c.urlParams_.Set("requestId", requestId) return c } +// SourceFirewallPolicy sets the optional parameter +// "sourceFirewallPolicy": The firewall policy from which to copy rules. +func (c *FirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *FirewallPoliciesCloneRulesCall { + c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { +func (c *FirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *FirewallPoliciesCloneRulesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73898,21 +78601,21 @@ func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { +func (c *FirewallPoliciesCloneRulesCall) Context(ctx context.Context) *FirewallPoliciesCloneRulesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksResizeCall) Header() http.Header { +func (c *FirewallPoliciesCloneRulesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -73920,14 +78623,9 @@ func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/resize") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/cloneRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -73935,21 +78633,19 @@ func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.resize" call. +// Do executes the "compute.firewallPolicies.cloneRules" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73980,27 +78676,18 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/resize", + // "description": "Copies rules to the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", // "httpMethod": "POST", - // "id": "compute.disks.resize", + // "id": "compute.firewallPolicies.cloneRules", // "parameterOrder": [ - // "project", - // "zone", - // "disk" + // "firewallPolicy" // ], // "parameters": { - // "disk": { - // "description": "The name of the persistent disk.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, @@ -74009,18 +78696,13 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "location": "query", // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "sourceFirewallPolicy": { + // "description": "The firewall policy from which to copy rules.", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/resize", - // "request": { - // "$ref": "DisksResizeRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", // "response": { // "$ref": "Operation" // }, @@ -74032,38 +78714,45 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } -// method id "compute.disks.setIamPolicy": +// method id "compute.firewallPolicies.delete": -type DisksSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesDeleteCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// Delete: Deletes the specified policy. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { - c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest +// - firewallPolicy: Name of the firewall policy to delete. +func (r *FirewallPoliciesService) Delete(firewallPolicy string) *FirewallPoliciesDeleteCall { + c := &FirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesDeleteCall) RequestId(requestId string) *FirewallPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall { +func (c *FirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *FirewallPoliciesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74071,21 +78760,21 @@ func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall { +func (c *FirewallPoliciesDeleteCall) Context(ctx context.Context) *FirewallPoliciesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksSetIamPolicyCall) Header() http.Header { +func (c *FirewallPoliciesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -74093,36 +78782,29 @@ func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.firewallPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74141,7 +78823,7 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74153,44 +78835,30 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", - // "httpMethod": "POST", - // "id": "compute.disks.setIamPolicy", + // "description": "Deletes the specified policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", + // "httpMethod": "DELETE", + // "id": "compute.firewallPolicies.delete", // "parameterOrder": [ - // "project", - // "zone", - // "resource" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", - // "request": { - // "$ref": "ZoneSetPolicyRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}", // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -74200,113 +78868,95 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } -// method id "compute.disks.setLabels": +// method id "compute.firewallPolicies.get": -type DisksSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesGetCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. +// Get: Returns the specified firewall policy. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { - c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { - c.urlParams_.Set("requestId", requestId) +// - firewallPolicy: Name of the firewall policy to get. +func (r *FirewallPoliciesService) Get(firewallPolicy string) *FirewallPoliciesGetCall { + c := &FirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { +func (c *FirewallPoliciesGetCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FirewallPoliciesGetCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { +func (c *FirewallPoliciesGetCall) Context(ctx context.Context) *FirewallPoliciesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksSetLabelsCall) Header() http.Header { +func (c *FirewallPoliciesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetCall) doRequest(alt string) (*http.Response, 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.zonesetlabelsrequest) - 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, "projects/{project}/zones/{zone}/disks/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.firewallPolicies.get" call. +// Exactly one of *FirewallPolicy or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *FirewallPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74325,7 +78975,7 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74337,165 +78987,132 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", - // "httpMethod": "POST", - // "id": "compute.disks.setLabels", + // "description": "Returns the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.get", // "parameterOrder": [ - // "project", - // "zone", - // "resource" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to get.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", - // "request": { - // "$ref": "ZoneSetLabelsRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPolicy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.startAsyncReplication": +// method id "compute.firewallPolicies.getAssociation": -type DisksStartAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesGetAssociationCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StartAsyncReplication: Starts asynchronous replication. Must be -// invoked on the primary disk. +// GetAssociation: Gets an association with the specified name. // -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) StartAsyncReplication(project string, zone string, disk string, disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest) *DisksStartAsyncReplicationCall { - c := &DisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksstartasyncreplicationrequest = disksstartasyncreplicationrequest +// - firewallPolicy: Name of the firewall policy to which the queried +// rule belongs. +func (r *FirewallPoliciesService) GetAssociation(firewallPolicy string) *FirewallPoliciesGetAssociationCall { + c := &FirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksStartAsyncReplicationCall) RequestId(requestId string) *DisksStartAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) +// Name sets the optional parameter "name": The name of the association +// to get from the firewall policy. +func (c *FirewallPoliciesGetAssociationCall) Name(name string) *FirewallPoliciesGetAssociationCall { + 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 *DisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStartAsyncReplicationCall { +func (c *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetAssociationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetAssociationCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksStartAsyncReplicationCall) Context(ctx context.Context) *DisksStartAsyncReplicationCall { +func (c *FirewallPoliciesGetAssociationCall) Context(ctx context.Context) *FirewallPoliciesGetAssociationCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksStartAsyncReplicationCall) Header() http.Header { +func (c *FirewallPoliciesGetAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, 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.disksstartasyncreplicationrequest) - 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, "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getAssociation") 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.startAsyncReplication" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.getAssociation" call. +// Exactly one of *FirewallPolicyAssociation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *FirewallPolicyAssociation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74514,7 +79131,7 @@ func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Oper if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicyAssociation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74526,158 +79143,137 @@ func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Starts asynchronous replication. Must be invoked on the primary disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", - // "httpMethod": "POST", - // "id": "compute.disks.startAsyncReplication", + // "description": "Gets an association with the specified name.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.getAssociation", // "parameterOrder": [ - // "project", - // "zone", - // "disk" + // "firewallPolicy" // ], // "parameters": { - // "disk": { - // "description": "The name of the persistent disk.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to which the queried rule belongs.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "name": { + // "description": "The name of the association to get from the firewall policy.", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", - // "request": { - // "$ref": "DisksStartAsyncReplicationRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPolicyAssociation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.stopAsyncReplication": +// method id "compute.firewallPolicies.getIamPolicy": -type DisksStopAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StopAsyncReplication: Stops asynchronous replication. Can be invoked -// either on the primary or on the secondary disk. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) StopAsyncReplication(project string, zone string, disk string) *DisksStopAsyncReplicationCall { - c := &DisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk +// - resource: Name or id of the resource for this request. +func (r *FirewallPoliciesService) GetIamPolicy(resource string) *FirewallPoliciesGetIamPolicyCall { + c := &FirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksStopAsyncReplicationCall) RequestId(requestId string) *DisksStopAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *FirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *FirewallPoliciesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopAsyncReplicationCall { +func (c *FirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksStopAsyncReplicationCall) Context(ctx context.Context) *DisksStopAsyncReplicationCall { +func (c *FirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksStopAsyncReplicationCall) Header() http.Header { +func (c *FirewallPoliciesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/getIamPolicy") 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.stopAsyncReplication" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74696,7 +79292,7 @@ func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74708,160 +79304,138 @@ func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", - // "httpMethod": "POST", - // "id": "compute.disks.stopAsyncReplication", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "locations/global/firewallPolicies/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.getIamPolicy", // "parameterOrder": [ - // "project", - // "zone", - // "disk" + // "resource" // ], // "parameters": { - // "disk": { - // "description": "The name of the persistent disk.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", + // "path": "locations/global/firewallPolicies/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.stopGroupAsyncReplication": +// method id "compute.firewallPolicies.getRule": -type DisksStopGroupAsyncReplicationCall struct { - s *Service - project string - zone string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesGetRuleCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StopGroupAsyncReplication: Stops asynchronous replication for a -// consistency group of disks. Can be invoked either in the primary or -// secondary scope. +// GetRule: Gets a rule of the specified priority. // -// - project: Project ID for this request. -// - zone: The name of the zone for this request. This must be the zone -// of the primary or secondary disks in the consistency group. -func (r *DisksService) StopGroupAsyncReplication(project string, zone string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *DisksStopGroupAsyncReplicationCall { - c := &DisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource +// - firewallPolicy: Name of the firewall policy to which the queried +// rule belongs. +func (r *FirewallPoliciesService) GetRule(firewallPolicy string) *FirewallPoliciesGetRuleCall { + c := &FirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksStopGroupAsyncReplicationCall) RequestId(requestId string) *DisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) +// Priority sets the optional parameter "priority": The priority of the +// rule to get from the firewall policy. +func (c *FirewallPoliciesGetRuleCall) Priority(priority int64) *FirewallPoliciesGetRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopGroupAsyncReplicationCall { +func (c *FirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetRuleCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *DisksStopGroupAsyncReplicationCall { +func (c *FirewallPoliciesGetRuleCall) Context(ctx context.Context) *FirewallPoliciesGetRuleCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksStopGroupAsyncReplicationCall) Header() http.Header { +func (c *FirewallPoliciesGetRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, 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.disksstopgroupasyncreplicationresource) - 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, "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getRule") 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{ - "project": c.project, - "zone": c.zone, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.stopGroupAsyncReplication" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.getRule" call. +// Exactly one of *FirewallPolicyRule or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *FirewallPolicyRule.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74880,7 +79454,7 @@ func (c *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicyRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74892,82 +79466,88 @@ func (c *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.", - // "flatPath": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - // "httpMethod": "POST", - // "id": "compute.disks.stopGroupAsyncReplication", + // "description": "Gets a rule of the specified priority.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getRule", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.getRule", // "parameterOrder": [ - // "project", - // "zone" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to which the queried rule belongs.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "priority": { + // "description": "The priority of the rule to get from the firewall policy.", + // "format": "int32", // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" + // "type": "integer" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - // "request": { - // "$ref": "DisksStopGroupAsyncReplicationResource" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}/getRule", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPolicyRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.testIamPermissions": +// method id "compute.firewallPolicies.insert": -type DisksTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesInsertCall struct { + s *Service + firewallpolicy *FirewallPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new policy in the specified project using the data +// included in the request. +func (r *FirewallPoliciesService) Insert(firewallpolicy *FirewallPolicy) *FirewallPoliciesInsertCall { + c := &FirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallpolicy = firewallpolicy + return c } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { - c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest +// ParentId sets the optional parameter "parentId": Parent ID for this +// request. The ID can be either be "folders/[FOLDER_ID]" if the parent +// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an +// organization. +func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPoliciesInsertCall { + c.urlParams_.Set("parentId", parentId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { +func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPoliciesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74975,21 +79555,21 @@ func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIam // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { +func (c *FirewallPoliciesInsertCall) Context(ctx context.Context) *FirewallPoliciesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksTestIamPermissionsCall) Header() http.Header { +func (c *FirewallPoliciesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -74997,36 +79577,31 @@ func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.firewallPolicies.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75045,7 +79620,7 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75057,176 +79632,211 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", + // "description": "Creates a new policy in the specified project using the data included in the request.", + // "flatPath": "locations/global/firewallPolicies", // "httpMethod": "POST", - // "id": "compute.disks.testIamPermissions", - // "parameterOrder": [ - // "project", - // "zone", - // "resource" - // ], + // "id": "compute.firewallPolicies.insert", // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "parentId": { + // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", + // "location": "query", // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", + // "path": "locations/global/firewallPolicies", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "FirewallPolicy" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.disks.update": +// method id "compute.firewallPolicies.list": -type DisksUpdateCall struct { - s *Service - project string - zone string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified disk with the data included in the -// request. The update is performed only on selected fields included as -// part of update-mask. Only the following fields can be modified: -// user_license. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Update(project string, zone string, disk string, disk2 *Disk) *DisksUpdateCall { - c := &DisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disk2 = disk2 +// List: Lists all the policies that have been configured for the +// specified folder or organization. +func (r *FirewallPoliciesService) List() *FirewallPoliciesListCall { + c := &FirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// Paths sets the optional parameter "paths": -func (c *DisksUpdateCall) Paths(paths ...string) *DisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *FirewallPoliciesListCall) Filter(filter string) *FirewallPoliciesListCall { + c.urlParams_.Set("filter", filter) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksUpdateCall) RequestId(requestId string) *DisksUpdateCall { - c.urlParams_.Set("requestId", requestId) +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *FirewallPoliciesListCall) MaxResults(maxResults int64) *FirewallPoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// UpdateMask sets the optional parameter "updateMask": update_mask -// indicates fields to be updated as part of this request. -func (c *DisksUpdateCall) UpdateMask(updateMask string) *DisksUpdateCall { - c.urlParams_.Set("updateMask", updateMask) +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *FirewallPoliciesListCall) OrderBy(orderBy string) *FirewallPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *FirewallPoliciesListCall) PageToken(pageToken string) *FirewallPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ParentId sets the optional parameter "parentId": Parent ID for this +// request. The ID can be either be "folders/[FOLDER_ID]" if the parent +// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an +// organization. +func (c *FirewallPoliciesListCall) ParentId(parentId string) *FirewallPoliciesListCall { + c.urlParams_.Set("parentId", parentId) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *FirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallPoliciesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksUpdateCall) Fields(s ...googleapi.Field) *DisksUpdateCall { +func (c *FirewallPoliciesListCall) Fields(s ...googleapi.Field) *FirewallPoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FirewallPoliciesListCall) IfNoneMatch(entityTag string) *FirewallPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *DisksUpdateCall) Context(ctx context.Context) *DisksUpdateCall { +func (c *FirewallPoliciesListCall) Context(ctx context.Context) *FirewallPoliciesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *DisksUpdateCall) Header() http.Header { +func (c *FirewallPoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesListCall) doRequest(alt string) (*http.Response, 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.disk2) - 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, "projects/{project}/zones/{zone}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.list" call. +// Exactly one of *FirewallPolicyList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *FirewallPolicyList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75245,7 +79855,7 @@ func (c *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicyList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75257,164 +79867,172 @@ func (c *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - // "httpMethod": "PATCH", - // "id": "compute.disks.update", - // "parameterOrder": [ - // "project", - // "zone", - // "disk" - // ], + // "description": "Lists all the policies that have been configured for the specified folder or organization.", + // "flatPath": "locations/global/firewallPolicies", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.list", // "parameters": { - // "disk": { - // "description": "The disk name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", // "type": "string" // }, - // "paths": { + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", // "location": "query", - // "repeated": true, - // "type": "string" + // "minimum": "0", + // "type": "integer" // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", // "location": "query", // "type": "string" // }, - // "updateMask": { - // "description": "update_mask indicates fields to be updated as part of this request.", - // "format": "google-fieldmask", + // "parentId": { + // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", // "location": "query", // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}", - // "request": { - // "$ref": "Disk" - // }, + // "path": "locations/global/firewallPolicies", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPolicyList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.externalVpnGateways.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) 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 ExternalVpnGatewaysDeleteCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.firewallPolicies.listAssociations": + +type FirewallPoliciesListAssociationsCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified externalVpnGateway. -// -// - externalVpnGateway: Name of the externalVpnGateways to delete. -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { - c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalVpnGateway = externalVpnGateway +// ListAssociations: Lists associations of a specified target, i.e., +// organization or folder. +func (r *FirewallPoliciesService) ListAssociations() *FirewallPoliciesListAssociationsCall { + c := &FirewallPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) +// TargetResource sets the optional parameter "targetResource": The +// target resource to list associations. It is an organization, or a +// folder. +func (c *FirewallPoliciesListAssociationsCall) TargetResource(targetResource string) *FirewallPoliciesListAssociationsCall { + c.urlParams_.Set("targetResource", targetResource) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { +func (c *FirewallPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *FirewallPoliciesListAssociationsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FirewallPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *FirewallPoliciesListAssociationsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { +func (c *FirewallPoliciesListAssociationsCall) Context(ctx context.Context) *FirewallPoliciesListAssociationsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { +func (c *FirewallPoliciesListAssociationsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/listAssociations") 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{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.listAssociations" call. +// Exactly one of *FirewallPoliciesListAssociationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *FirewallPoliciesListAssociationsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*FirewallPoliciesListAssociationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75433,7 +80051,7 @@ func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPoliciesListAssociationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75445,141 +80063,130 @@ func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Deletes the specified externalVpnGateway.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - // "httpMethod": "DELETE", - // "id": "compute.externalVpnGateways.delete", - // "parameterOrder": [ - // "project", - // "externalVpnGateway" - // ], + // "description": "Lists associations of a specified target, i.e., organization or folder.", + // "flatPath": "locations/global/firewallPolicies/listAssociations", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.listAssociations", // "parameters": { - // "externalVpnGateway": { - // "description": "Name of the externalVpnGateways to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "targetResource": { + // "description": "The target resource to list associations. It is an organization, or a folder.", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "path": "locations/global/firewallPolicies/listAssociations", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPoliciesListAssociationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.externalVpnGateways.get": +// method id "compute.firewallPolicies.move": -type ExternalVpnGatewaysGetCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallPoliciesMoveCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified externalVpnGateway. Get a list of -// available externalVpnGateways by making a list() request. +// Move: Moves the specified firewall policy. // -// - externalVpnGateway: Name of the externalVpnGateway to return. -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { - c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalVpnGateway = externalVpnGateway +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) Move(firewallPolicy string) *FirewallPoliciesMoveCall { + c := &FirewallPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + return c +} + +// ParentId sets the optional parameter "parentId": The new parent of +// the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if +// the parent is a folder or "organizations/[ORGANIZATION_ID]" if the +// parent is an organization. +func (c *FirewallPoliciesMoveCall) ParentId(parentId string) *FirewallPoliciesMoveCall { + c.urlParams_.Set("parentId", parentId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesMoveCall) RequestId(requestId string) *FirewallPoliciesMoveCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { +func (c *FirewallPoliciesMoveCall) Fields(s ...googleapi.Field) *FirewallPoliciesMoveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { +func (c *FirewallPoliciesMoveCall) Context(ctx context.Context) *FirewallPoliciesMoveCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ExternalVpnGatewaysGetCall) Header() http.Header { +func (c *FirewallPoliciesMoveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/move") 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{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.get" call. -// Exactly one of *ExternalVpnGateway or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ExternalVpnGateway.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, error) { +// Do executes the "compute.firewallPolicies.move" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75598,7 +80205,7 @@ func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*External if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ExternalVpnGateway{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75610,62 +80217,63 @@ func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*External } return ret, nil // { - // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - // "httpMethod": "GET", - // "id": "compute.externalVpnGateways.get", + // "description": "Moves the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/move", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.move", // "parameterOrder": [ - // "project", - // "externalVpnGateway" + // "firewallPolicy" // ], // "parameters": { - // "externalVpnGateway": { - // "description": "Name of the externalVpnGateway to return.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, + // "parentId": { + // "description": "The new parent of the firewall policy. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/move", // "response": { - // "$ref": "ExternalVpnGateway" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.externalVpnGateways.insert": +// method id "compute.firewallPolicies.patch": -type ExternalVpnGatewaysInsertCall struct { - s *Service - project string - externalvpngateway *ExternalVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesPatchCall struct { + s *Service + firewallPolicy string + firewallpolicy *FirewallPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a ExternalVpnGateway in the specified project using -// the data included in the request. +// Patch: Patches the specified policy with the data included in the +// request. // -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { - c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalvpngateway = externalvpngateway +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) Patch(firewallPolicy string, firewallpolicy *FirewallPolicy) *FirewallPoliciesPatchCall { + c := &FirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + c.firewallpolicy = firewallpolicy return c } @@ -75680,7 +80288,7 @@ func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway * // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { +func (c *FirewallPoliciesPatchCall) RequestId(requestId string) *FirewallPoliciesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -75688,7 +80296,7 @@ func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpn // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { +func (c *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -75696,21 +80304,21 @@ func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVp // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { +func (c *FirewallPoliciesPatchCall) Context(ctx context.Context) *FirewallPoliciesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { +func (c *FirewallPoliciesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -75718,34 +80326,34 @@ func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.externalvpngateway) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.insert" call. +// Do executes the "compute.firewallPolicies.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75776,18 +80384,18 @@ func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/externalVpnGateways", - // "httpMethod": "POST", - // "id": "compute.externalVpnGateways.insert", + // "description": "Patches the specified policy with the data included in the request.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", + // "httpMethod": "PATCH", + // "id": "compute.firewallPolicies.patch", // "parameterOrder": [ - // "project" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, @@ -75797,9 +80405,9 @@ func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Opera // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways", + // "path": "locations/global/firewallPolicies/{firewallPolicy}", // "request": { - // "$ref": "ExternalVpnGateway" + // "$ref": "FirewallPolicy" // }, // "response": { // "$ref": "Operation" @@ -75812,178 +80420,111 @@ func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Opera } -// method id "compute.externalVpnGateways.list": +// method id "compute.firewallPolicies.patchRule": -type ExternalVpnGatewaysListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallPoliciesPatchRuleCall struct { + s *Service + firewallPolicy string + firewallpolicyrule *FirewallPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of ExternalVpnGateway available to the -// specified project. +// PatchRule: Patches a rule of the specified priority. // -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { - c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) PatchRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchRuleCall { + c := &FirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + c.firewallpolicyrule = firewallpolicyrule return c } -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) +// Priority sets the optional parameter "priority": The priority of the +// rule to patch. +func (c *FirewallPoliciesPatchRuleCall) Priority(priority int64) *FirewallPoliciesPatchRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *ExternalVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesPatchRuleCall) RequestId(requestId string) *FirewallPoliciesPatchRuleCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { +func (c *FirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { +func (c *FirewallPoliciesPatchRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchRuleCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ExternalVpnGatewaysListCall) Header() http.Header { +func (c *FirewallPoliciesPatchRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, 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.firewallpolicyrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/patchRule") 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{ - "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.list" call. -// Exactly one of *ExternalVpnGatewayList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ExternalVpnGatewayList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, error) { +// Do executes the "compute.firewallPolicies.patchRule" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76002,7 +80543,7 @@ func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*Externa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ExternalVpnGatewayList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76014,113 +80555,95 @@ func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*Externa } return ret, nil // { - // "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", - // "flatPath": "projects/{project}/global/externalVpnGateways", - // "httpMethod": "GET", - // "id": "compute.externalVpnGateways.list", + // "description": "Patches a rule of the specified priority.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.patchRule", // "parameterOrder": [ - // "project" + // "firewallPolicy" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", + // "location": "path", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "required": true, // "type": "string" // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", + // "priority": { + // "description": "The priority of the rule to patch.", + // "format": "int32", // "location": "query", - // "minimum": "0", // "type": "integer" // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "projects/{project}/global/externalVpnGateways", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", + // "request": { + // "$ref": "FirewallPolicyRule" + // }, // "response": { - // "$ref": "ExternalVpnGatewayList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) 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 "compute.externalVpnGateways.setLabels": +// method id "compute.firewallPolicies.removeAssociation": -type ExternalVpnGatewaysSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesRemoveAssociationCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more -// about labels, read the Labeling Resources documentation. +// RemoveAssociation: Removes an association for the specified firewall +// policy. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { - c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) RemoveAssociation(firewallPolicy string) *FirewallPoliciesRemoveAssociationCall { + c := &FirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + return c +} + +// Name sets the optional parameter "name": Name for the attachment that +// will be removed. +func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPoliciesRemoveAssociationCall { + c.urlParams_.Set("name", name) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *FirewallPoliciesRemoveAssociationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { +func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveAssociationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76128,21 +80651,21 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *Externa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { +func (c *FirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *FirewallPoliciesRemoveAssociationCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { +func (c *FirewallPoliciesRemoveAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -76150,14 +80673,9 @@ func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76165,20 +80683,19 @@ func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.setLabels" call. +// Do executes the "compute.firewallPolicies.removeAssociation" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76209,34 +80726,33 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", + // "description": "Removes an association for the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", // "httpMethod": "POST", - // "id": "compute.externalVpnGateways.setLabels", + // "id": "compute.firewallPolicies.removeAssociation", // "parameterOrder": [ - // "project", - // "resource" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "name": { + // "description": "Name for the attachment that will be removed.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", // "response": { // "$ref": "Operation" // }, @@ -76248,35 +80764,52 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Op } -// method id "compute.externalVpnGateways.testIamPermissions": +// method id "compute.firewallPolicies.removeRule": -type ExternalVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesRemoveRuleCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// RemoveRule: Deletes a rule of the specified priority. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { - c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) RemoveRule(firewallPolicy string) *FirewallPoliciesRemoveRuleCall { + c := &FirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + return c +} + +// Priority sets the optional parameter "priority": The priority of the +// rule to remove from the firewall policy. +func (c *FirewallPoliciesRemoveRuleCall) Priority(priority int64) *FirewallPoliciesRemoveRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesRemoveRuleCall) RequestId(requestId string) *FirewallPoliciesRemoveRuleCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { +func (c *FirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76284,21 +80817,21 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) 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 *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { +func (c *FirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *FirewallPoliciesRemoveRuleCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { +func (c *FirewallPoliciesRemoveRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -76306,14 +80839,9 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeRule") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76321,20 +80849,19 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.firewallPolicies.removeRule" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76353,7 +80880,7 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76365,98 +80892,71 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", + // "description": "Deletes a rule of the specified priority.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", // "httpMethod": "POST", - // "id": "compute.externalVpnGateways.testIamPermissions", + // "id": "compute.firewallPolicies.removeRule", // "parameterOrder": [ - // "project", - // "resource" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "priority": { + // "description": "The priority of the rule to remove from the firewall policy.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.addAssociation": +// method id "compute.firewallPolicies.setIamPolicy": -type FirewallPoliciesAddAssociationCall struct { - s *Service - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesSetIamPolicyCall struct { + s *Service + resource string + globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddAssociation: Inserts an association for the specified firewall -// policy. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddAssociation(firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *FirewallPoliciesAddAssociationCall { - c := &FirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it -// if an association of the attachment already exists. This is false by -// default, in which case an error will be returned if an association -// already exists. -func (c *FirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesAddAssociationCall) RequestId(requestId string) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("requestId", requestId) +// - resource: Name or id of the resource for this request. +func (r *FirewallPoliciesService) SetIamPolicy(resource string, globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest) *FirewallPoliciesSetIamPolicyCall { + c := &FirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.globalorganizationsetpolicyrequest = globalorganizationsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddAssociationCall { +func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76464,21 +80964,21 @@ func (c *FirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *Firew // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesAddAssociationCall) Context(ctx context.Context) *FirewallPoliciesAddAssociationCall { +func (c *FirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesAddAssociationCall) Header() http.Header { +func (c *FirewallPoliciesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -76486,14 +80986,14 @@ func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyassociation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalorganizationsetpolicyrequest) 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, "locations/global/firewallPolicies/{firewallPolicy}/addAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76501,19 +81001,19 @@ func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.addAssociation" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76532,7 +81032,7 @@ func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76544,38 +81044,28 @@ func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Inserts an association for the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "locations/global/firewallPolicies/{resource}/setIamPolicy", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.addAssociation", + // "id": "compute.firewallPolicies.setIamPolicy", // "parameterOrder": [ - // "firewallPolicy" + // "resource" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" - // }, - // "replaceExistingAssociation": { - // "description": "Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists.", - // "location": "query", - // "type": "boolean" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", + // "path": "locations/global/firewallPolicies/{resource}/setIamPolicy", // "request": { - // "$ref": "FirewallPolicyAssociation" + // "$ref": "GlobalOrganizationSetPolicyRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -76585,47 +81075,32 @@ func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (* } -// method id "compute.firewallPolicies.addRule": +// method id "compute.firewallPolicies.testIamPermissions": -type FirewallPoliciesAddRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesTestIamPermissionsCall struct { + s *Service + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddRule: Inserts a rule into a firewall policy. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddRuleCall { - c := &FirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesAddRuleCall) RequestId(requestId string) *FirewallPoliciesAddRuleCall { - c.urlParams_.Set("requestId", requestId) +// - resource: Name or id of the resource for this request. +func (r *FirewallPoliciesService) TestIamPermissions(resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallPoliciesTestIamPermissionsCall { + c := &FirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddRuleCall { +func (c *FirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallPoliciesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76633,21 +81108,21 @@ func (c *FirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *FirewallPoli // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesAddRuleCall) Context(ctx context.Context) *FirewallPoliciesAddRuleCall { +func (c *FirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *FirewallPoliciesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesAddRuleCall) Header() http.Header { +func (c *FirewallPoliciesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -76655,14 +81130,14 @@ func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) 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, "locations/global/firewallPolicies/{firewallPolicy}/addRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76670,19 +81145,19 @@ func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.addRule" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76701,7 +81176,7 @@ func (c *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76713,58 +81188,57 @@ func (c *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Inserts a rule into a firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addRule", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "locations/global/firewallPolicies/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.addRule", + // "id": "compute.firewallPolicies.testIamPermissions", // "parameterOrder": [ - // "firewallPolicy" + // "resource" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/addRule", + // "path": "locations/global/firewallPolicies/{resource}/testIamPermissions", // "request": { - // "$ref": "FirewallPolicyRule" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.cloneRules": +// method id "compute.firewalls.delete": -type FirewallPoliciesCloneRulesCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallsDeleteCall struct { + s *Service + project string + firewall string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CloneRules: Copies rules to the specified firewall policy. +// Delete: Deletes the specified firewall. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) CloneRules(firewallPolicy string) *FirewallPoliciesCloneRulesCall { - c := &FirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy +// - firewall: Name of the firewall rule to delete. +// - project: Project ID for this request. +func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { + c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall return c } @@ -76779,22 +81253,15 @@ func (r *FirewallPoliciesService) CloneRules(firewallPolicy string) *FirewallPol // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesCloneRulesCall) RequestId(requestId string) *FirewallPoliciesCloneRulesCall { +func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } -// SourceFirewallPolicy sets the optional parameter -// "sourceFirewallPolicy": The firewall policy from which to copy rules. -func (c *FirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *FirewallPoliciesCloneRulesCall { +func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76802,21 +81269,21 @@ func (c *FirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *FirewallP // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesCloneRulesCall) Context(ctx context.Context) *FirewallPoliciesCloneRulesCall { +func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesCloneRulesCall) Header() http.Header { +func (c *FirewallsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -76826,27 +81293,28 @@ func (c *FirewallPoliciesCloneRulesCall) 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, "locations/global/firewallPolicies/{firewallPolicy}/cloneRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") 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{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "firewall": c.firewall, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.cloneRules" call. +// Do executes the "compute.firewalls.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76877,33 +81345,36 @@ func (c *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Copies rules to the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.cloneRules", + // "description": "Deletes the specified firewall.", + // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "httpMethod": "DELETE", + // "id": "compute.firewalls.delete", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "firewall" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "firewall": { + // "description": "Name of the firewall rule to delete.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // }, - // "sourceFirewallPolicy": { - // "description": "The firewall policy from which to copy rules.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", + // "path": "projects/{project}/global/firewalls/{firewall}", // "response": { // "$ref": "Operation" // }, @@ -76915,97 +81386,99 @@ func (c *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.firewallPolicies.delete": +// method id "compute.firewalls.get": -type FirewallPoliciesDeleteCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallsGetCall struct { + s *Service + project string + firewall string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified policy. +// Get: Returns the specified firewall. // -// - firewallPolicy: Name of the firewall policy to delete. -func (r *FirewallPoliciesService) Delete(firewallPolicy string) *FirewallPoliciesDeleteCall { - c := &FirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesDeleteCall) RequestId(requestId string) *FirewallPoliciesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// - firewall: Name of the firewall rule to return. +// - project: Project ID for this request. +func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { + c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *FirewallPoliciesDeleteCall { +func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesDeleteCall) Context(ctx context.Context) *FirewallPoliciesDeleteCall { +func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesDeleteCall) Header() http.Header { +func (c *FirewallsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, 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, "locations/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") 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{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "firewall": c.firewall, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at +// Do executes the "compute.firewalls.get" call. +// Exactly one of *Firewall or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Firewall.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77024,7 +81497,7 @@ func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Firewall{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77036,128 +81509,142 @@ func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - // "httpMethod": "DELETE", - // "id": "compute.firewallPolicies.delete", + // "description": "Returns the specified firewall.", + // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "httpMethod": "GET", + // "id": "compute.firewalls.get", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "firewall" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to delete.", + // "firewall": { + // "description": "Name of the firewall rule to return.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}", + // "path": "projects/{project}/global/firewalls/{firewall}", // "response": { - // "$ref": "Operation" + // "$ref": "Firewall" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.get": +// method id "compute.firewalls.insert": -type FirewallPoliciesGetCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallsInsertCall struct { + s *Service + project string + firewall *Firewall + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified firewall policy. +// Insert: Creates a firewall rule in the specified project using the +// data included in the request. // -// - firewallPolicy: Name of the firewall policy to get. -func (r *FirewallPoliciesService) Get(firewallPolicy string) *FirewallPoliciesGetCall { - c := &FirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy +// - project: Project ID for this request. +func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { + c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesGetCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetCall { +func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallPoliciesGetCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesGetCall) Context(ctx context.Context) *FirewallPoliciesGetCall { +func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesGetCall) Header() http.Header { +func (c *FirewallsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, 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.firewall) + 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, "locations/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") 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{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.get" call. -// Exactly one of *FirewallPolicy or error will be non-nil. Any non-2xx +// Do executes the "compute.firewalls.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *FirewallPolicy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, error) { +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77176,7 +81663,7 @@ func (c *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPol if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77188,67 +81675,149 @@ func (c *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPol } return ret, nil // { - // "description": "Returns the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.get", + // "description": "Creates a firewall rule in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/firewalls", + // "httpMethod": "POST", + // "id": "compute.firewalls.insert", // "parameterOrder": [ - // "firewallPolicy" + // "project" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to get.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}", + // "path": "projects/{project}/global/firewalls", + // "request": { + // "$ref": "Firewall" + // }, // "response": { - // "$ref": "FirewallPolicy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.getAssociation": +// method id "compute.firewalls.list": -type FirewallPoliciesGetAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GetAssociation: Gets an association with the specified name. +// List: Retrieves the list of firewall rules available to the specified +// project. // -// - firewallPolicy: Name of the firewall policy to which the queried -// rule belongs. -func (r *FirewallPoliciesService) GetAssociation(firewallPolicy string) *FirewallPoliciesGetAssociationCall { - c := &FirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy +// - project: Project ID for this request. +func (r *FirewallsService) List(project string) *FirewallsListCall { + c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project return c } -// Name sets the optional parameter "name": The name of the association -// to get from the firewall policy. -func (c *FirewallPoliciesGetAssociationCall) Name(name string) *FirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetAssociationCall { +func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77258,7 +81827,7 @@ func (c *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *Firew // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetAssociationCall { +func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { c.ifNoneMatch_ = entityTag return c } @@ -77266,21 +81835,21 @@ func (c *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *Fire // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesGetAssociationCall) Context(ctx context.Context) *FirewallPoliciesGetAssociationCall { +func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesGetAssociationCall) Header() http.Header { +func (c *FirewallsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -77293,7 +81862,7 @@ func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -77301,19 +81870,19 @@ func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.getAssociation" call. -// Exactly one of *FirewallPolicyAssociation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, error) { +// Do executes the "compute.firewalls.list" call. +// Exactly one of *FirewallList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *FirewallList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77332,7 +81901,7 @@ func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyAssociation{ + ret := &FirewallList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77344,30 +81913,53 @@ func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets an association with the specified name.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", + // "description": "Retrieves the list of firewall rules available to the specified project.", + // "flatPath": "projects/{project}/global/firewalls", // "httpMethod": "GET", - // "id": "compute.firewallPolicies.getAssociation", + // "id": "compute.firewalls.list", // "parameterOrder": [ - // "firewallPolicy" + // "project" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to which the queried rule belongs.", + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "name": { - // "description": "The name of the association to get from the firewall policy.", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", + // "path": "projects/{project}/global/firewalls", // "response": { - // "$ref": "FirewallPolicyAssociation" + // "$ref": "FirewallList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -77378,103 +81970,131 @@ func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (* } -// method id "compute.firewallPolicies.getIamPolicy": +// 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 *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) 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 FirewallPoliciesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "compute.firewalls.patch": + +type FirewallsPatchCall struct { + s *Service + project string + firewall string + firewall2 *Firewall + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// Patch: Updates the specified firewall rule with the data included in +// the request. This method supports PATCH semantics and uses the JSON +// merge patch format and processing rules. // -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) GetIamPolicy(resource string) *FirewallPoliciesGetIamPolicyCall { - c := &FirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - firewall: Name of the firewall rule to patch. +// - project: Project ID for this request. +func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { + c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall + c.firewall2 = firewall2 return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *FirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *FirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetIamPolicyCall { +func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesGetIamPolicyCall { +func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesGetIamPolicyCall) Header() http.Header { +func (c *FirewallsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, 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_) - } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) + 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, "locations/global/firewallPolicies/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "project": c.project, + "firewall": c.firewall, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.firewalls.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77493,7 +82113,7 @@ func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77505,138 +82125,137 @@ func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "locations/global/firewallPolicies/{resource}/getIamPolicy", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.getIamPolicy", + // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "httpMethod": "PATCH", + // "id": "compute.firewalls.patch", // "parameterOrder": [ - // "resource" + // "project", + // "firewall" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "firewall": { + // "description": "Name of the firewall rule to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{resource}/getIamPolicy", + // "path": "projects/{project}/global/firewalls/{firewall}", + // "request": { + // "$ref": "Firewall" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.getRule": +// method id "compute.firewalls.testIamPermissions": -type FirewallPoliciesGetRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallsTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetRule: Gets a rule of the specified priority. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - firewallPolicy: Name of the firewall policy to which the queried -// rule belongs. -func (r *FirewallPoliciesService) GetRule(firewallPolicy string) *FirewallPoliciesGetRuleCall { - c := &FirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the -// rule to get from the firewall policy. -func (c *FirewallPoliciesGetRuleCall) Priority(priority int64) *FirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { + c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetRuleCall { +func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesGetRuleCall) Context(ctx context.Context) *FirewallPoliciesGetRuleCall { +func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesGetRuleCall) Header() http.Header { +func (c *FirewallsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + 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, "locations/global/firewallPolicies/{firewallPolicy}/getRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.getRule" call. -// Exactly one of *FirewallPolicyRule or error will be non-nil. Any +// Do executes the "compute.firewalls.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.ServerResponse.Header or (if a response was +// *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, error) { +func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77655,7 +82274,7 @@ func (c *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Firewal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyRule{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77667,31 +82286,36 @@ func (c *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Firewal } return ret, nil // { - // "description": "Gets a rule of the specified priority.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getRule", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.getRule", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/firewalls/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.firewalls.testIamPermissions", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "resource" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to which the queried rule belongs.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "priority": { - // "description": "The priority of the rule to get from the firewall policy.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/getRule", + // "path": "projects/{project}/global/firewalls/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "FirewallPolicyRule" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -77702,30 +82326,30 @@ func (c *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Firewal } -// method id "compute.firewallPolicies.insert": - -type FirewallPoliciesInsertCall struct { - s *Service - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// method id "compute.firewalls.update": -// Insert: Creates a new policy in the specified project using the data -// included in the request. -func (r *FirewallPoliciesService) Insert(firewallpolicy *FirewallPolicy) *FirewallPoliciesInsertCall { - c := &FirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallpolicy = firewallpolicy - return c +type FirewallsUpdateCall struct { + s *Service + project string + firewall string + firewall2 *Firewall + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ParentId sets the optional parameter "parentId": Parent ID for this -// request. The ID can be either be "folders/[FOLDER_ID]" if the parent -// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an -// organization. -func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPoliciesInsertCall { - c.urlParams_.Set("parentId", parentId) +// Update: Updates the specified firewall rule with the data included in +// the request. Note that all fields will be updated if using PUT, even +// fields that are not specified. To update individual fields, please +// use PATCH instead. +// +// - firewall: Name of the firewall rule to update. +// - project: Project ID for this request. +func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { + c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall + c.firewall2 = firewall2 return c } @@ -77740,7 +82364,7 @@ func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPolicies // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPoliciesInsertCall { +func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -77748,7 +82372,7 @@ func (c *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPolici // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPoliciesInsertCall { +func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77756,21 +82380,21 @@ func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPolic // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesInsertCall) Context(ctx context.Context) *FirewallPoliciesInsertCall { +func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesInsertCall) Header() http.Header { +func (c *FirewallsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -77778,31 +82402,35 @@ func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) 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, "locations/global/firewallPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") 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{ + "project": c.project, + "firewall": c.firewall, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.insert" call. +// Do executes the "compute.firewalls.update" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77833,14 +82461,27 @@ func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a new policy in the specified project using the data included in the request.", - // "flatPath": "locations/global/firewallPolicies", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.insert", + // "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.", + // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "httpMethod": "PUT", + // "id": "compute.firewalls.update", + // "parameterOrder": [ + // "project", + // "firewall" + // ], // "parameters": { - // "parentId": { - // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", - // "location": "query", + // "firewall": { + // "description": "Name of the firewall rule to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // }, // "requestId": { @@ -77849,9 +82490,9 @@ func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies", + // "path": "projects/{project}/global/firewalls/{firewall}", // "request": { - // "$ref": "FirewallPolicy" + // "$ref": "Firewall" // }, // "response": { // "$ref": "Operation" @@ -77864,20 +82505,23 @@ func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } -// method id "compute.firewallPolicies.list": +// method id "compute.forwardingRules.aggregatedList": -type FirewallPoliciesListCall struct { +type ForwardingRulesAggregatedListCall struct { s *Service + project string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the policies that have been configured for the -// specified folder or organization. -func (r *FirewallPoliciesService) List() *FirewallPoliciesListCall { - c := &FirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// AggregatedList: Retrieves an aggregated list of forwarding rules. +// +// - project: Project ID for this request. +func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { + c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project return c } @@ -77916,18 +82560,31 @@ func (r *FirewallPoliciesService) List() *FirewallPoliciesListCall { // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *FirewallPoliciesListCall) Filter(filter string) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *ForwardingRulesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ForwardingRulesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *FirewallPoliciesListCall) MaxResults(maxResults int64) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -77941,7 +82598,7 @@ func (c *FirewallPoliciesListCall) MaxResults(maxResults int64) *FirewallPolicie // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *FirewallPoliciesListCall) OrderBy(orderBy string) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -77949,25 +82606,16 @@ func (c *FirewallPoliciesListCall) OrderBy(orderBy string) *FirewallPoliciesList // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *FirewallPoliciesListCall) PageToken(pageToken string) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ParentId sets the optional parameter "parentId": Parent ID for this -// request. The ID can be either be "folders/[FOLDER_ID]" if the parent -// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an -// organization. -func (c *FirewallPoliciesListCall) ParentId(parentId string) *FirewallPoliciesListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - // ReturnPartialSuccess sets the optional parameter // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *FirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -77975,7 +82623,7 @@ func (c *FirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesListCall) Fields(s ...googleapi.Field) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77985,7 +82633,7 @@ func (c *FirewallPoliciesListCall) Fields(s ...googleapi.Field) *FirewallPolicie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FirewallPoliciesListCall) IfNoneMatch(entityTag string) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -77993,21 +82641,21 @@ func (c *FirewallPoliciesListCall) IfNoneMatch(entityTag string) *FirewallPolici // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesListCall) Context(ctx context.Context) *FirewallPoliciesListCall { +func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesListCall) Header() http.Header { +func (c *ForwardingRulesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -78020,24 +82668,27 @@ func (c *FirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/forwardingRules") 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{ + "project": c.project, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.list" call. -// Exactly one of *FirewallPolicyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.forwardingRules.aggregatedList" call. +// Exactly one of *ForwardingRuleAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, error) { +func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78056,7 +82707,7 @@ func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyList{ + ret := &ForwardingRuleAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78068,16 +82719,24 @@ func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPo } return ret, nil // { - // "description": "Lists all the policies that have been configured for the specified folder or organization.", - // "flatPath": "locations/global/firewallPolicies", + // "description": "Retrieves an aggregated list of forwarding rules.", + // "flatPath": "projects/{project}/aggregated/forwardingRules", // "httpMethod": "GET", - // "id": "compute.firewallPolicies.list", + // "id": "compute.forwardingRules.aggregatedList", + // "parameterOrder": [ + // "project" + // ], // "parameters": { // "filter": { // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", // "location": "query", // "type": "string" // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -78096,9 +82755,11 @@ func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPo // "location": "query", // "type": "string" // }, - // "parentId": { - // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // }, // "returnPartialSuccess": { @@ -78107,9 +82768,9 @@ func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPo // "type": "boolean" // } // }, - // "path": "locations/global/firewallPolicies", + // "path": "projects/{project}/aggregated/forwardingRules", // "response": { - // "$ref": "FirewallPolicyList" + // "$ref": "ForwardingRuleAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -78123,7 +82784,7 @@ func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPo // 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 *FirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { +func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -78141,99 +82802,105 @@ func (c *FirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPo } } -// method id "compute.firewallPolicies.listAssociations": +// method id "compute.forwardingRules.delete": -type FirewallPoliciesListAssociationsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ForwardingRulesDeleteCall struct { + s *Service + project string + region string + forwardingRule string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListAssociations: Lists associations of a specified target, i.e., -// organization or folder. -func (r *FirewallPoliciesService) ListAssociations() *FirewallPoliciesListAssociationsCall { - c := &FirewallPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Delete: Deletes the specified ForwardingRule resource. +// +// - forwardingRule: Name of the ForwardingRule resource to delete. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { + c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.forwardingRule = forwardingRule return c } -// TargetResource sets the optional parameter "targetResource": The -// target resource to list associations. It is an organization, or a -// folder. -func (c *FirewallPoliciesListAssociationsCall) TargetResource(targetResource string) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("targetResource", targetResource) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *FirewallPoliciesListAssociationsCall { +func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FirewallPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *FirewallPoliciesListAssociationsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesListAssociationsCall) Context(ctx context.Context) *FirewallPoliciesListAssociationsCall { +func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesListAssociationsCall) Header() http.Header { +func (c *ForwardingRulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, 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, "locations/global/firewallPolicies/listAssociations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") 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{ + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.listAssociations" call. -// Exactly one of *FirewallPoliciesListAssociationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *FirewallPoliciesListAssociationsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*FirewallPoliciesListAssociationsResponse, error) { +// Do executes the "compute.forwardingRules.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78252,7 +82919,7 @@ func (c *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPoliciesListAssociationsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78264,130 +82931,152 @@ func (c *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists associations of a specified target, i.e., organization or folder.", - // "flatPath": "locations/global/firewallPolicies/listAssociations", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.listAssociations", + // "description": "Deletes the specified ForwardingRule resource.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "httpMethod": "DELETE", + // "id": "compute.forwardingRules.delete", + // "parameterOrder": [ + // "project", + // "region", + // "forwardingRule" + // ], // "parameters": { - // "targetResource": { - // "description": "The target resource to list associations. It is an organization, or a folder.", + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/listAssociations", + // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", // "response": { - // "$ref": "FirewallPoliciesListAssociationsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.move": +// method id "compute.forwardingRules.get": -type FirewallPoliciesMoveCall struct { +type ForwardingRulesGetCall struct { s *Service - firewallPolicy string + project string + region string + forwardingRule string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Move: Moves the specified firewall policy. +// Get: Returns the specified ForwardingRule resource. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Move(firewallPolicy string) *FirewallPoliciesMoveCall { - c := &FirewallPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// ParentId sets the optional parameter "parentId": The new parent of -// the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if -// the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *FirewallPoliciesMoveCall) ParentId(parentId string) *FirewallPoliciesMoveCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesMoveCall) RequestId(requestId string) *FirewallPoliciesMoveCall { - c.urlParams_.Set("requestId", requestId) +// - forwardingRule: Name of the ForwardingRule resource to return. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { + c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.forwardingRule = forwardingRule return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesMoveCall) Fields(s ...googleapi.Field) *FirewallPoliciesMoveCall { +func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesMoveCall) Context(ctx context.Context) *FirewallPoliciesMoveCall { +func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesMoveCall) Header() http.Header { +func (c *ForwardingRulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, 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, "locations/global/firewallPolicies/{firewallPolicy}/move") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") 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{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.move" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.forwardingRules.get" call. +// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *ForwardingRule.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78406,7 +83095,7 @@ func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ForwardingRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78418,63 +83107,73 @@ func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Moves the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/move", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.move", + // "description": "Returns the specified ForwardingRule resource.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "httpMethod": "GET", + // "id": "compute.forwardingRules.get", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "region", + // "forwardingRule" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to return.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "parentId": { - // "description": "The new parent of the firewall policy. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/move", + // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", // "response": { - // "$ref": "Operation" + // "$ref": "ForwardingRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.patch": +// method id "compute.forwardingRules.insert": -type FirewallPoliciesPatchCall struct { +type ForwardingRulesInsertCall struct { s *Service - firewallPolicy string - firewallpolicy *FirewallPolicy + project string + region string + forwardingrule *ForwardingRule urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Patches the specified policy with the data included in the -// request. +// Insert: Creates a ForwardingRule resource in the specified project +// and region using the data included in the request. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Patch(firewallPolicy string, firewallpolicy *FirewallPolicy) *FirewallPoliciesPatchCall { - c := &FirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { + c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.forwardingrule = forwardingrule return c } @@ -78489,7 +83188,7 @@ func (r *FirewallPoliciesService) Patch(firewallPolicy string, firewallpolicy *F // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesPatchCall) RequestId(requestId string) *FirewallPoliciesPatchCall { +func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -78497,7 +83196,7 @@ func (c *FirewallPoliciesPatchCall) RequestId(requestId string) *FirewallPolicie // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchCall { +func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -78505,21 +83204,21 @@ func (c *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPolici // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesPatchCall) Context(ctx context.Context) *FirewallPoliciesPatchCall { +func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesPatchCall) Header() http.Header { +func (c *ForwardingRulesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -78527,34 +83226,35 @@ func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) 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, "locations/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") 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{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.patch" call. +// Do executes the "compute.forwardingRules.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78585,18 +83285,26 @@ func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - // "httpMethod": "PATCH", - // "id": "compute.firewallPolicies.patch", + // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules", + // "httpMethod": "POST", + // "id": "compute.forwardingRules.insert", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "region" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -78606,9 +83314,9 @@ func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}", + // "path": "projects/{project}/regions/{region}/forwardingRules", // "request": { - // "$ref": "FirewallPolicy" + // "$ref": "ForwardingRule" // }, // "response": { // "$ref": "Operation" @@ -78621,111 +83329,182 @@ func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.firewallPolicies.patchRule": +// method id "compute.forwardingRules.list": -type FirewallPoliciesPatchRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ForwardingRulesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PatchRule: Patches a rule of the specified priority. +// List: Retrieves a list of ForwardingRule resources available to the +// specified project and region. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) PatchRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchRuleCall { - c := &FirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { + c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region return c } -// Priority sets the optional parameter "priority": The priority of the -// rule to patch. -func (c *FirewallPoliciesPatchRuleCall) Priority(priority int64) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { + c.urlParams_.Set("filter", filter) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesPatchRuleCall) RequestId(requestId string) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("requestId", requestId) +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchRuleCall { +func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesPatchRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchRuleCall { +func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesPatchRuleCall) Header() http.Header { +func (c *ForwardingRulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, 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.firewallpolicyrule) - 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, "locations/global/firewallPolicies/{firewallPolicy}/patchRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") 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{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.patchRule" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.forwardingRules.list" call. +// Exactly one of *ForwardingRuleList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ForwardingRuleList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78744,7 +83523,7 @@ func (c *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ForwardingRuleList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78756,72 +83535,119 @@ func (c *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Patches a rule of the specified priority.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.patchRule", + // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules", + // "httpMethod": "GET", + // "id": "compute.forwardingRules.list", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "region" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", - // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", // "type": "string" // }, - // "priority": { - // "description": "The priority of the rule to patch.", - // "format": "int32", + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", // "location": "query", + // "minimum": "0", // "type": "integer" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", // "location": "query", // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", - // "request": { - // "$ref": "FirewallPolicyRule" - // }, + // "path": "projects/{project}/regions/{region}/forwardingRules", // "response": { - // "$ref": "Operation" + // "$ref": "ForwardingRuleList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.removeAssociation": - -type FirewallPoliciesRemoveAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) 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) + } } -// RemoveAssociation: Removes an association for the specified firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveAssociation(firewallPolicy string) *FirewallPoliciesRemoveAssociationCall { - c := &FirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c +// method id "compute.forwardingRules.patch": + +type ForwardingRulesPatchCall struct { + s *Service + project string + region string + forwardingRule string + forwardingrule *ForwardingRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Name sets the optional parameter "name": Name for the attachment that -// will be removed. -func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("name", name) +// Patch: Updates the specified forwarding rule with the data included +// in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. Currently, you can only +// patch the network_tier field. +// +// - forwardingRule: Name of the ForwardingRule resource to patch. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { + c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.forwardingRule = forwardingRule + c.forwardingrule = forwardingrule return c } @@ -78836,7 +83662,7 @@ func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPolic // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *FirewallPoliciesRemoveAssociationCall { +func (c *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -78844,7 +83670,7 @@ func (c *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *Fir // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveAssociationCall { +func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -78852,21 +83678,21 @@ func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *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 *FirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *FirewallPoliciesRemoveAssociationCall { +func (c *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesRemoveAssociationCall) Header() http.Header { +func (c *ForwardingRulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -78874,29 +83700,36 @@ func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) + 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, "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.removeAssociation" call. +// Do executes the "compute.forwardingRules.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78927,24 +83760,35 @@ func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Removes an association for the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.removeAssociation", + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "httpMethod": "PATCH", + // "id": "compute.forwardingRules.patch", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "region", + // "forwardingRule" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to patch.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "name": { - // "description": "Name for the attachment that will be removed.", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, // "type": "string" // }, // "requestId": { @@ -78953,7 +83797,10 @@ func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", + // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "request": { + // "$ref": "ForwardingRule" + // }, // "response": { // "$ref": "Operation" // }, @@ -78965,29 +83812,31 @@ func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) } -// method id "compute.firewallPolicies.removeRule": +// method id "compute.forwardingRules.setLabels": -type FirewallPoliciesRemoveRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ForwardingRulesSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveRule: Deletes a rule of the specified priority. +// SetLabels: Sets the labels on the specified resource. To learn more +// about labels, read the Labeling Resources documentation. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveRule(firewallPolicy string) *FirewallPoliciesRemoveRuleCall { - c := &FirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the -// rule to remove from the firewall policy. -func (c *FirewallPoliciesRemoveRuleCall) Priority(priority int64) *FirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { + c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest return c } @@ -79002,7 +83851,7 @@ func (c *FirewallPoliciesRemoveRuleCall) Priority(priority int64) *FirewallPolic // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesRemoveRuleCall) RequestId(requestId string) *FirewallPoliciesRemoveRuleCall { +func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -79010,7 +83859,7 @@ func (c *FirewallPoliciesRemoveRuleCall) RequestId(requestId string) *FirewallPo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveRuleCall { +func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79018,21 +83867,21 @@ func (c *FirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *FirewallP // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *FirewallPoliciesRemoveRuleCall { +func (c *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesRemoveRuleCall) Header() http.Header { +func (c *ForwardingRulesSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79040,9 +83889,14 @@ func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + 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, "locations/global/firewallPolicies/{firewallPolicy}/removeRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79050,19 +83904,21 @@ func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.removeRule" call. +// Do executes the "compute.forwardingRules.setLabels" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79093,34 +83949,47 @@ func (c *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Deletes a rule of the specified priority.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", + // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.removeRule", + // "id": "compute.forwardingRules.setLabels", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "region", + // "resource" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "priority": { - // "description": "The priority of the rule to remove from the firewall policy.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "region": { + // "description": "The region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", + // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", + // "request": { + // "$ref": "RegionSetLabelsRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -79132,32 +84001,55 @@ func (c *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.firewallPolicies.setIamPolicy": +// method id "compute.forwardingRules.setTarget": -type FirewallPoliciesSetIamPolicyCall struct { - s *Service - resource string - globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ForwardingRulesSetTargetCall struct { + s *Service + project string + region string + forwardingRule string + targetreference *TargetReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// SetTarget: Changes target URL for forwarding rule. The new target +// should be of the same type as the old target. // -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) SetIamPolicy(resource string, globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest) *FirewallPoliciesSetIamPolicyCall { - c := &FirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.globalorganizationsetpolicyrequest = globalorganizationsetpolicyrequest +// - forwardingRule: Name of the ForwardingRule resource in which target +// is to be set. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { + c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.forwardingRule = forwardingRule + c.targetreference = targetreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesSetIamPolicyCall { +func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79165,21 +84057,21 @@ func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *Firewal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesSetIamPolicyCall { +func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesSetIamPolicyCall) Header() http.Header { +func (c *ForwardingRulesSetTargetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79187,14 +84079,14 @@ func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalorganizationsetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) 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, "locations/global/firewallPolicies/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79202,19 +84094,21 @@ func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.forwardingRules.setTarget" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79233,7 +84127,7 @@ func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79245,28 +84139,49 @@ func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "locations/global/firewallPolicies/{resource}/setIamPolicy", + // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.setIamPolicy", + // "id": "compute.forwardingRules.setTarget", // "parameterOrder": [ - // "resource" + // "project", + // "region", + // "forwardingRule" // ], // "parameters": { - // "resource": { - // "description": "Name or id of the resource for this request.", + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource in which target is to be set.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{resource}/setIamPolicy", + // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", // "request": { - // "$ref": "GlobalOrganizationSetPolicyRequest" + // "$ref": "TargetReference" // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -79276,10 +84191,12 @@ func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } -// method id "compute.firewallPolicies.testIamPermissions": +// method id "compute.forwardingRules.testIamPermissions": -type FirewallPoliciesTestIamPermissionsCall struct { +type ForwardingRulesTestIamPermissionsCall struct { s *Service + project string + region string resource string testpermissionsrequest *TestPermissionsRequest urlParams_ gensupport.URLParams @@ -79290,9 +84207,13 @@ type FirewallPoliciesTestIamPermissionsCall struct { // TestIamPermissions: Returns permissions that a caller has on the // specified resource. // +// - project: Project ID for this request. +// - region: The name of the region for this request. // - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) TestIamPermissions(resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallPoliciesTestIamPermissionsCall { - c := &FirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { + c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region c.resource = resource c.testpermissionsrequest = testpermissionsrequest return c @@ -79301,7 +84222,7 @@ func (r *FirewallPoliciesService) TestIamPermissions(resource string, testpermis // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallPoliciesTestIamPermissionsCall { +func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79309,21 +84230,21 @@ func (c *FirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *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 *FirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *FirewallPoliciesTestIamPermissionsCall { +func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallPoliciesTestIamPermissionsCall) Header() http.Header { +func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79338,7 +84259,7 @@ func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Re reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79346,19 +84267,21 @@ func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.testIamPermissions" call. +// Do executes the "compute.forwardingRules.testIamPermissions" call. // Exactly one of *TestPermissionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79390,22 +84313,38 @@ func (c *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "locations/global/firewallPolicies/{resource}/testIamPermissions", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.testIamPermissions", + // "id": "compute.forwardingRules.testIamPermissions", // "parameterOrder": [ + // "project", + // "region", // "resource" // ], // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, // "resource": { // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{resource}/testIamPermissions", + // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", // "request": { // "$ref": "TestPermissionsRequest" // }, @@ -79421,25 +84360,25 @@ func (c *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } -// method id "compute.firewalls.delete": +// method id "compute.globalAddresses.delete": -type FirewallsDeleteCall struct { +type GlobalAddressesDeleteCall struct { s *Service project string - firewall string + address string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified firewall. +// Delete: Deletes the specified address resource. // -// - firewall: Name of the firewall rule to delete. +// - address: Name of the address resource to delete. // - project: Project ID for this request. -func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { - c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { + c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewall = firewall + c.address = address return c } @@ -79454,7 +84393,7 @@ func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDel // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { +func (c *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -79462,7 +84401,7 @@ func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { +func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79470,21 +84409,21 @@ func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { +func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallsDeleteCall) Header() http.Header { +func (c *GlobalAddressesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79494,7 +84433,7 @@ func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -79502,20 +84441,20 @@ func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, + "project": c.project, + "address": c.address, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.delete" call. +// Do executes the "compute.globalAddresses.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79546,17 +84485,17 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified firewall.", - // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "description": "Deletes the specified address resource.", + // "flatPath": "projects/{project}/global/addresses/{address}", // "httpMethod": "DELETE", - // "id": "compute.firewalls.delete", + // "id": "compute.globalAddresses.delete", // "parameterOrder": [ // "project", - // "firewall" + // "address" // ], // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to delete.", + // "address": { + // "description": "Name of the address resource to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -79575,7 +84514,7 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{firewall}", + // "path": "projects/{project}/global/addresses/{address}", // "response": { // "$ref": "Operation" // }, @@ -79587,33 +84526,33 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.firewalls.get": +// method id "compute.globalAddresses.get": -type FirewallsGetCall struct { +type GlobalAddressesGetCall struct { s *Service project string - firewall string + address string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified firewall. +// Get: Returns the specified address resource. // -// - firewall: Name of the firewall rule to return. +// - address: Name of the address resource to return. // - project: Project ID for this request. -func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { - c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { + c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewall = firewall + c.address = address return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { +func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79623,7 +84562,7 @@ func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { +func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -79631,21 +84570,21 @@ func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { +func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallsGetCall) Header() http.Header { +func (c *GlobalAddressesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79658,7 +84597,7 @@ func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -79666,20 +84605,20 @@ func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, + "project": c.project, + "address": c.address, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.get" call. -// Exactly one of *Firewall or error will be non-nil. Any non-2xx status +// Do executes the "compute.globalAddresses.get" call. +// Exactly one of *Address or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Firewall.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { +// *Address.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79698,7 +84637,7 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Firewall{ + ret := &Address{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79710,17 +84649,17 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { } return ret, nil // { - // "description": "Returns the specified firewall.", - // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "description": "Returns the specified address resource.", + // "flatPath": "projects/{project}/global/addresses/{address}", // "httpMethod": "GET", - // "id": "compute.firewalls.get", + // "id": "compute.globalAddresses.get", // "parameterOrder": [ // "project", - // "firewall" + // "address" // ], // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to return.", + // "address": { + // "description": "Name of the address resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -79734,9 +84673,9 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{firewall}", + // "path": "projects/{project}/global/addresses/{address}", // "response": { - // "$ref": "Firewall" + // "$ref": "Address" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -79747,25 +84686,25 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { } -// method id "compute.firewalls.insert": +// method id "compute.globalAddresses.insert": -type FirewallsInsertCall struct { +type GlobalAddressesInsertCall struct { s *Service project string - firewall *Firewall + address *Address urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates a firewall rule in the specified project using the -// data included in the request. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. // // - project: Project ID for this request. -func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { - c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { + c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewall = firewall + c.address = address return c } @@ -79780,7 +84719,7 @@ func (r *FirewallsService) Insert(project string, firewall *Firewall) *Firewalls // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { +func (c *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -79788,7 +84727,7 @@ func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { +func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79796,21 +84735,21 @@ func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { +func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallsInsertCall) Header() http.Header { +func (c *GlobalAddressesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79818,14 +84757,14 @@ func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79838,14 +84777,14 @@ func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.insert" call. +// Do executes the "compute.globalAddresses.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79876,10 +84815,10 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/firewalls", + // "description": "Creates an address resource in the specified project by using the data included in the request.", + // "flatPath": "projects/{project}/global/addresses", // "httpMethod": "POST", - // "id": "compute.firewalls.insert", + // "id": "compute.globalAddresses.insert", // "parameterOrder": [ // "project" // ], @@ -79897,9 +84836,9 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls", + // "path": "projects/{project}/global/addresses", // "request": { - // "$ref": "Firewall" + // "$ref": "Address" // }, // "response": { // "$ref": "Operation" @@ -79912,9 +84851,9 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.firewalls.list": +// method id "compute.globalAddresses.list": -type FirewallsListCall struct { +type GlobalAddressesListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -79923,12 +84862,11 @@ type FirewallsListCall struct { header_ http.Header } -// List: Retrieves the list of firewall rules available to the specified -// project. +// List: Retrieves a list of global addresses. // // - project: Project ID for this request. -func (r *FirewallsService) List(project string) *FirewallsListCall { - c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { + c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -79968,7 +84906,7 @@ func (r *FirewallsService) List(project string) *FirewallsListCall { // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { +func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { c.urlParams_.Set("filter", filter) return c } @@ -79979,7 +84917,7 @@ func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { +func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -79993,7 +84931,7 @@ func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { +func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -80001,7 +84939,7 @@ func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { +func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -80010,7 +84948,7 @@ func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallsListCall { +func (c *GlobalAddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalAddressesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -80018,7 +84956,7 @@ func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *Fir // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { +func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80028,7 +84966,7 @@ func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { +func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall { c.ifNoneMatch_ = entityTag return c } @@ -80036,21 +84974,21 @@ func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { +func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallsListCall) Header() http.Header { +func (c *GlobalAddressesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -80063,7 +85001,7 @@ func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -80076,14 +85014,14 @@ func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.list" call. -// Exactly one of *FirewallList or error will be non-nil. Any non-2xx +// Do executes the "compute.globalAddresses.list" call. +// Exactly one of *AddressList or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *FirewallList.ServerResponse.Header or (if a response was returned at +// *AddressList.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) { +func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80102,7 +85040,7 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallList{ + ret := &AddressList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80114,10 +85052,10 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err } return ret, nil // { - // "description": "Retrieves the list of firewall rules available to the specified project.", - // "flatPath": "projects/{project}/global/firewalls", + // "description": "Retrieves a list of global addresses.", + // "flatPath": "projects/{project}/global/addresses", // "httpMethod": "GET", - // "id": "compute.firewalls.list", + // "id": "compute.globalAddresses.list", // "parameterOrder": [ // "project" // ], @@ -80158,9 +85096,9 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err // "type": "boolean" // } // }, - // "path": "projects/{project}/global/firewalls", + // "path": "projects/{project}/global/addresses", // "response": { - // "$ref": "FirewallList" + // "$ref": "AddressList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -80174,7 +85112,7 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err // 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 *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error { +func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -80192,29 +85130,28 @@ func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) err } } -// method id "compute.firewalls.patch": +// method id "compute.globalAddresses.move": -type FirewallsPatchCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalAddressesMoveCall struct { + s *Service + project string + address string + globaladdressesmoverequest *GlobalAddressesMoveRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified firewall rule with the data included in -// the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// Move: Moves the specified address resource from one project to +// another project. // -// - firewall: Name of the firewall rule to patch. -// - project: Project ID for this request. -func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { - c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - address: Name of the address resource to move. +// - project: Source project ID which the Address is moved from. +func (r *GlobalAddressesService) Move(project string, address string, globaladdressesmoverequest *GlobalAddressesMoveRequest) *GlobalAddressesMoveCall { + c := &GlobalAddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewall = firewall - c.firewall2 = firewall2 + c.address = address + c.globaladdressesmoverequest = globaladdressesmoverequest return c } @@ -80229,7 +85166,7 @@ func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Fir // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { +func (c *GlobalAddressesMoveCall) RequestId(requestId string) *GlobalAddressesMoveCall { c.urlParams_.Set("requestId", requestId) return c } @@ -80237,7 +85174,7 @@ func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { +func (c *GlobalAddressesMoveCall) Fields(s ...googleapi.Field) *GlobalAddressesMoveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80245,21 +85182,21 @@ func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { +func (c *GlobalAddressesMoveCall) Context(ctx context.Context) *GlobalAddressesMoveCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallsPatchCall) Header() http.Header { +func (c *GlobalAddressesMoveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -80267,35 +85204,35 @@ func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globaladdressesmoverequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}/move") 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{ - "project": c.project, - "firewall": c.firewall, + "project": c.project, + "address": c.address, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.patch" call. +// Do executes the "compute.globalAddresses.move" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalAddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80326,24 +85263,24 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/firewalls/{firewall}", - // "httpMethod": "PATCH", - // "id": "compute.firewalls.patch", + // "description": "Moves the specified address resource from one project to another project.", + // "flatPath": "projects/{project}/global/addresses/{address}/move", + // "httpMethod": "POST", + // "id": "compute.globalAddresses.move", // "parameterOrder": [ // "project", - // "firewall" + // "address" // ], // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to patch.", + // "address": { + // "description": "Name of the address resource to move.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", + // "description": "Source project ID which the Address is moved from.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -80355,9 +85292,9 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{firewall}", + // "path": "projects/{project}/global/addresses/{address}/move", // "request": { - // "$ref": "Firewall" + // "$ref": "GlobalAddressesMoveRequest" // }, // "response": { // "$ref": "Operation" @@ -80370,35 +85307,35 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } -// method id "compute.firewalls.testIamPermissions": +// method id "compute.globalAddresses.setLabels": -type FirewallsTestIamPermissionsCall struct { +type GlobalAddressesSetLabelsCall struct { s *Service project string resource string - testpermissionsrequest *TestPermissionsRequest + globalsetlabelsrequest *GlobalSetLabelsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// SetLabels: Sets the labels on a GlobalAddress. To learn more about +// labels, read the Labeling Resources documentation. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { - c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { + c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.globalsetlabelsrequest = globalsetlabelsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { +func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80406,21 +85343,21 @@ func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *Firewall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { +func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FirewallsTestIamPermissionsCall) Header() http.Header { +func (c *GlobalAddressesSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -80428,14 +85365,14 @@ func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -80449,189 +85386,14 @@ func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.firewalls.testIamPermissions", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.firewalls.update": - -type FirewallsUpdateCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified firewall rule with the data included in -// the request. Note that all fields will be updated if using PUT, even -// fields that are not specified. To update individual fields, please -// use PATCH instead. -// -// - firewall: Name of the firewall rule to update. -// - project: Project ID for this request. -func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { - c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { - 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 *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *FirewallsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, 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.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.update" call. +// Do executes the "compute.globalAddresses.setLabels" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80662,22 +85424,15 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.", - // "flatPath": "projects/{project}/global/firewalls/{firewall}", - // "httpMethod": "PUT", - // "id": "compute.firewalls.update", + // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/global/addresses/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.globalAddresses.setLabels", // "parameterOrder": [ // "project", - // "firewall" + // "resource" // ], // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -80685,15 +85440,17 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{firewall}", + // "path": "projects/{project}/global/addresses/{resource}/setLabels", // "request": { - // "$ref": "Firewall" + // "$ref": "GlobalSetLabelsRequest" // }, // "response": { // "$ref": "Operation" @@ -80706,190 +85463,93 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.forwardingRules.aggregatedList": +// method id "compute.globalAddresses.testIamPermissions": -type ForwardingRulesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type GlobalAddressesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves an aggregated list of forwarding rules. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // // - project: Project ID for this request. -func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { - c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *ForwardingRulesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *ForwardingRulesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// - resource: Name or id of the resource for this request. +func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { + c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { +func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { +func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesAggregatedListCall) Header() http.Header { +func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.aggregatedList" call. -// Exactly one of *ForwardingRuleAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.globalAddresses.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) { +func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80908,7 +85568,7 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ForwardingRuleAggregatedList{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80920,42 +85580,15 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } return ret, nil // { - // "description": "Retrieves an aggregated list of forwarding rules.", - // "flatPath": "projects/{project}/aggregated/forwardingRules", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.aggregatedList", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/addresses/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.globalAddresses.testIamPermissions", // "parameterOrder": [ - // "project" + // "project", + // "resource" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -80963,15 +85596,20 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/forwardingRules", + // "path": "projects/{project}/global/addresses/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "ForwardingRuleAggregatedList" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -80982,48 +85620,24 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } -// 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 *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) 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 "compute.forwardingRules.delete": +// method id "compute.globalForwardingRules.delete": -type ForwardingRulesDeleteCall struct { +type GlobalForwardingRulesDeleteCall struct { s *Service project string - region string forwardingRule string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified ForwardingRule resource. +// Delete: Deletes the specified GlobalForwardingRule resource. // // - forwardingRule: Name of the ForwardingRule resource to delete. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { - c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { + c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region c.forwardingRule = forwardingRule return c } @@ -81039,7 +85653,7 @@ func (r *ForwardingRulesService) Delete(project string, region string, forwardin // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { +func (c *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -81047,7 +85661,7 @@ func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRules // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { +func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81055,21 +85669,21 @@ func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRule // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { +func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesDeleteCall) Header() http.Header { +func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -81079,7 +85693,7 @@ func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -81088,20 +85702,19 @@ func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.delete" call. +// Do executes the "compute.globalForwardingRules.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81132,13 +85745,12 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified ForwardingRule resource.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "description": "Deletes the specified GlobalForwardingRule resource.", + // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", // "httpMethod": "DELETE", - // "id": "compute.forwardingRules.delete", + // "id": "compute.globalForwardingRules.delete", // "parameterOrder": [ // "project", - // "region", // "forwardingRule" // ], // "parameters": { @@ -81156,20 +85768,13 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "path": "projects/{project}/global/forwardingRules/{forwardingRule}", // "response": { // "$ref": "Operation" // }, @@ -81181,12 +85786,11 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.forwardingRules.get": +// method id "compute.globalForwardingRules.get": -type ForwardingRulesGetCall struct { +type GlobalForwardingRulesGetCall struct { s *Service project string - region string forwardingRule string urlParams_ gensupport.URLParams ifNoneMatch_ string @@ -81194,15 +85798,14 @@ type ForwardingRulesGetCall struct { header_ http.Header } -// Get: Returns the specified ForwardingRule resource. +// Get: Returns the specified GlobalForwardingRule resource. Gets a list +// of available forwarding rules by making a list() request. // // - forwardingRule: Name of the ForwardingRule resource to return. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { - c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { + c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region c.forwardingRule = forwardingRule return c } @@ -81210,7 +85813,7 @@ func (r *ForwardingRulesService) Get(project string, region string, forwardingRu // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { +func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81220,7 +85823,7 @@ func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGe // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { +func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -81228,21 +85831,21 @@ func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesG // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { +func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesGetCall) Header() http.Header { +func (c *GlobalForwardingRulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -81255,7 +85858,7 @@ func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -81264,20 +85867,19 @@ func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.get" call. +// Do executes the "compute.globalForwardingRules.get" call. // Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *ForwardingRule.ServerResponse.Header or (if a response was returned // at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { +func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81308,13 +85910,12 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu } return ret, nil // { - // "description": "Returns the specified ForwardingRule resource.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", + // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", // "httpMethod": "GET", - // "id": "compute.forwardingRules.get", + // "id": "compute.globalForwardingRules.get", // "parameterOrder": [ // "project", - // "region", // "forwardingRule" // ], // "parameters": { @@ -81331,16 +85932,9 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "path": "projects/{project}/global/forwardingRules/{forwardingRule}", // "response": { // "$ref": "ForwardingRule" // }, @@ -81353,27 +85947,24 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu } -// method id "compute.forwardingRules.insert": +// method id "compute.globalForwardingRules.insert": -type ForwardingRulesInsertCall struct { +type GlobalForwardingRulesInsertCall struct { s *Service project string - region string forwardingrule *ForwardingRule urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. +// Insert: Creates a GlobalForwardingRule resource in the specified +// project using the data included in the request. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { - c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { + c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region c.forwardingrule = forwardingrule return c } @@ -81389,7 +85980,7 @@ func (r *ForwardingRulesService) Insert(project string, region string, forwardin // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { +func (c *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -81397,7 +85988,7 @@ func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRules // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { +func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81405,21 +85996,21 @@ func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRule // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { +func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesInsertCall) Header() http.Header { +func (c *GlobalForwardingRulesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -81434,7 +86025,7 @@ func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -81443,19 +86034,18 @@ func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.insert" call. +// Do executes the "compute.globalForwardingRules.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81486,13 +86076,12 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules", + // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/forwardingRules", // "httpMethod": "POST", - // "id": "compute.forwardingRules.insert", + // "id": "compute.globalForwardingRules.insert", // "parameterOrder": [ - // "project", - // "region" + // "project" // ], // "parameters": { // "project": { @@ -81502,20 +86091,13 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules", + // "path": "projects/{project}/global/forwardingRules", // "request": { // "$ref": "ForwardingRule" // }, @@ -81530,27 +86112,24 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.forwardingRules.list": +// method id "compute.globalForwardingRules.list": -type ForwardingRulesListCall struct { +type GlobalForwardingRulesListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. +// List: Retrieves a list of GlobalForwardingRule resources available to +// the specified project. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { - c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { + c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -81589,7 +86168,7 @@ func (r *ForwardingRulesService) List(project string, region string) *Forwarding // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { c.urlParams_.Set("filter", filter) return c } @@ -81600,7 +86179,7 @@ func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -81614,7 +86193,7 @@ func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesL // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -81622,7 +86201,7 @@ func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCa // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -81631,7 +86210,7 @@ func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesLi // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalForwardingRulesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -81639,7 +86218,7 @@ func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81649,7 +86228,7 @@ func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesL // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -81657,21 +86236,21 @@ func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRules // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { +func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesListCall) Header() http.Header { +func (c *GlobalForwardingRulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -81684,7 +86263,7 @@ func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -81693,19 +86272,18 @@ func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.list" call. +// Do executes the "compute.globalForwardingRules.list" call. // Exactly one of *ForwardingRuleList or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *ForwardingRuleList.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { +func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81736,13 +86314,12 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR } return ret, nil // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules", + // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", + // "flatPath": "projects/{project}/global/forwardingRules", // "httpMethod": "GET", - // "id": "compute.forwardingRules.list", + // "id": "compute.globalForwardingRules.list", // "parameterOrder": [ - // "project", - // "region" + // "project" // ], // "parameters": { // "filter": { @@ -81775,20 +86352,13 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "returnPartialSuccess": { // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules", + // "path": "projects/{project}/global/forwardingRules", // "response": { // "$ref": "ForwardingRuleList" // }, @@ -81804,7 +86374,7 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR // 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 *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { +func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -81822,12 +86392,11 @@ func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingR } } -// method id "compute.forwardingRules.patch": +// method id "compute.globalForwardingRules.patch": -type ForwardingRulesPatchCall struct { +type GlobalForwardingRulesPatchCall struct { s *Service project string - region string forwardingRule string forwardingrule *ForwardingRule urlParams_ gensupport.URLParams @@ -81842,11 +86411,9 @@ type ForwardingRulesPatchCall struct { // // - forwardingRule: Name of the ForwardingRule resource to patch. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { - c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { + c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region c.forwardingRule = forwardingRule c.forwardingrule = forwardingrule return c @@ -81863,7 +86430,7 @@ func (r *ForwardingRulesService) Patch(project string, region string, forwarding // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { +func (c *GlobalForwardingRulesPatchCall) RequestId(requestId string) *GlobalForwardingRulesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -81871,7 +86438,7 @@ func (c *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesP // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { +func (c *GlobalForwardingRulesPatchCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81879,21 +86446,21 @@ func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRules // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { +func (c *GlobalForwardingRulesPatchCall) Context(ctx context.Context) *GlobalForwardingRulesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesPatchCall) Header() http.Header { +func (c *GlobalForwardingRulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -81908,7 +86475,7 @@ func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -81917,20 +86484,19 @@ func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.patch" call. +// Do executes the "compute.globalForwardingRules.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81962,12 +86528,11 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil // { // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", // "httpMethod": "PATCH", - // "id": "compute.forwardingRules.patch", + // "id": "compute.globalForwardingRules.patch", // "parameterOrder": [ // "project", - // "region", // "forwardingRule" // ], // "parameters": { @@ -81985,20 +86550,13 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "path": "projects/{project}/global/forwardingRules/{forwardingRule}", // "request": { // "$ref": "ForwardingRule" // }, @@ -82013,54 +86571,35 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.forwardingRules.setLabels": +// method id "compute.globalForwardingRules.setLabels": -type ForwardingRulesSetLabelsCall struct { +type GlobalForwardingRulesSetLabelsCall struct { s *Service project string - region string resource string - regionsetlabelsrequest *RegionSetLabelsRequest + globalsetlabelsrequest *GlobalSetLabelsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } // SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. +// about labels, read the Labeling resources documentation. // // - project: Project ID for this request. -// - region: The region for this request. // - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { - c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { + c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) + c.globalsetlabelsrequest = globalsetlabelsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { +func (c *GlobalForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82068,21 +86607,21 @@ func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingR // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { +func (c *GlobalForwardingRulesSetLabelsCall) Context(ctx context.Context) *GlobalForwardingRulesSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesSetLabelsCall) Header() http.Header { +func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82090,14 +86629,14 @@ func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82106,20 +86645,19 @@ func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, er req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.setLabels" call. +// Do executes the "compute.globalForwardingRules.setLabels" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82150,13 +86688,12 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", + // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.", + // "flatPath": "projects/{project}/global/forwardingRules/{resource}/setLabels", // "httpMethod": "POST", - // "id": "compute.forwardingRules.setLabels", + // "id": "compute.globalForwardingRules.setLabels", // "parameterOrder": [ // "project", - // "region", // "resource" // ], // "parameters": { @@ -82167,29 +86704,17 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, // "resource": { // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", + // "path": "projects/{project}/global/forwardingRules/{resource}/setLabels", // "request": { - // "$ref": "RegionSetLabelsRequest" + // "$ref": "GlobalSetLabelsRequest" // }, // "response": { // "$ref": "Operation" @@ -82202,12 +86727,11 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } -// method id "compute.forwardingRules.setTarget": +// method id "compute.globalForwardingRules.setTarget": -type ForwardingRulesSetTargetCall struct { +type GlobalForwardingRulesSetTargetCall struct { s *Service project string - region string forwardingRule string targetreference *TargetReference urlParams_ gensupport.URLParams @@ -82215,17 +86739,15 @@ type ForwardingRulesSetTargetCall struct { header_ http.Header } -// SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. +// SetTarget: Changes target URL for the GlobalForwardingRule resource. +// The new target should be of the same type as the old target. // // - forwardingRule: Name of the ForwardingRule resource in which target // is to be set. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { - c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { + c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region c.forwardingRule = forwardingRule c.targetreference = targetreference return c @@ -82242,7 +86764,7 @@ func (r *ForwardingRulesService) SetTarget(project string, region string, forwar // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { +func (c *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall { c.urlParams_.Set("requestId", requestId) return c } @@ -82250,7 +86772,7 @@ func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRu // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { +func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82258,21 +86780,21 @@ func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingR // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { +func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesSetTargetCall) Header() http.Header { +func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82287,7 +86809,7 @@ func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, er reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82296,20 +86818,19 @@ func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, er req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.setTarget" call. +// Do executes the "compute.globalForwardingRules.setTarget" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82340,13 +86861,12 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", + // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", + // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", // "httpMethod": "POST", - // "id": "compute.forwardingRules.setTarget", + // "id": "compute.globalForwardingRules.setTarget", // "parameterOrder": [ // "project", - // "region", // "forwardingRule" // ], // "parameters": { @@ -82364,20 +86884,13 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", + // "path": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", // "request": { // "$ref": "TargetReference" // }, @@ -82392,12 +86905,11 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat } -// method id "compute.forwardingRules.testIamPermissions": +// method id "compute.globalForwardingRules.testIamPermissions": -type ForwardingRulesTestIamPermissionsCall struct { +type GlobalForwardingRulesTestIamPermissionsCall struct { s *Service project string - region string resource string testpermissionsrequest *TestPermissionsRequest urlParams_ gensupport.URLParams @@ -82409,12 +86921,10 @@ type ForwardingRulesTestIamPermissionsCall struct { // specified resource. // // - project: Project ID for this request. -// - region: The name of the region for this request. // - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { - c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { + c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region c.resource = resource c.testpermissionsrequest = testpermissionsrequest return c @@ -82423,7 +86933,7 @@ func (r *ForwardingRulesService) TestIamPermissions(project string, region strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { +func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82431,21 +86941,21 @@ func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *Fo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { +func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { +func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82460,512 +86970,7 @@ func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Res reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.testIamPermissions", - // "parameterOrder": [ - // "project", - // "region", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, - // "response": { - // "$ref": "TestPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalAddresses.delete": - -type GlobalAddressesDeleteCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// -// - address: Name of the address resource to delete. -// - project: Project ID for this request. -func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { - c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { - 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 *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/addresses/{address}") - 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{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes the specified address resource.", - // "flatPath": "projects/{project}/global/addresses/{address}", - // "httpMethod": "DELETE", - // "id": "compute.globalAddresses.delete", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/addresses/{address}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalAddresses.get": - -type GlobalAddressesGetCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// -// - address: Name of the address resource to return. -// - project: Project ID for this request. -func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { - c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/addresses/{address}") - 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{ - "project": c.project, - "address": c.address, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the specified address resource.", - // "flatPath": "projects/{project}/global/addresses/{address}", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.get", - // "parameterOrder": [ - // "project", - // "address" - // ], - // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/addresses/{address}", - // "response": { - // "$ref": "Address" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.globalAddresses.insert": - -type GlobalAddressesInsertCall struct { - s *Service - project string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project by using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { - c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { - 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 *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalAddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, 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.address) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82973,19 +86978,20 @@ func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalAddresses.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.globalForwardingRules.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83004,7 +87010,7 @@ func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83016,12 +87022,13 @@ func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates an address resource in the specified project by using the data included in the request.", - // "flatPath": "projects/{project}/global/addresses", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.globalAddresses.insert", + // "id": "compute.globalForwardingRules.testIamPermissions", // "parameterOrder": [ - // "project" + // "project", + // "resource" // ], // "parameters": { // "project": { @@ -83031,198 +87038,135 @@ func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/addresses", + // "path": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", // "request": { - // "$ref": "Address" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.globalAddresses.list": +// method id "compute.globalNetworkEndpointGroups.attachNetworkEndpoints": -type GlobalAddressesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall struct { + s *Service + project string + networkEndpointGroup string + globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of global addresses. +// AttachNetworkEndpoints: Attach a network endpoint to the specified +// network endpoint group. // -// - project: Project ID for this request. -func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { - c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group where +// you are attaching network endpoints to. It should comply with +// RFC1035. +// - project: Project ID for this request. +func (r *GlobalNetworkEndpointGroupsService) AttachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { + c := &GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.networkEndpointGroup = networkEndpointGroup + c.globalnetworkendpointgroupsattachendpointsrequest = globalnetworkendpointgroupsattachendpointsrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *GlobalAddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalAddressesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { +func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall { +func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalAddressesListCall) Header() http.Header { +func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, 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.globalnetworkendpointgroupsattachendpointsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") 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{ - "project": c.project, + "project": c.project, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalAddresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx +// Do executes the "compute.globalNetworkEndpointGroups.attachNetworkEndpoints" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *AddressList.ServerResponse.Header or (if a response was returned at +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { +func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83241,7 +87185,7 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AddressList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83253,35 +87197,19 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList } return ret, nil // { - // "description": "Retrieves a list of global addresses.", - // "flatPath": "projects/{project}/global/addresses", - // "httpMethod": "GET", - // "id": "compute.globalAddresses.list", + // "description": "Attach a network endpoint to the specified network endpoint group.", + // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "httpMethod": "POST", + // "id": "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", // "parameterOrder": [ - // "project" + // "project", + // "networkEndpointGroup" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + // "location": "path", + // "required": true, // "type": "string" // }, // "project": { @@ -83291,68 +87219,48 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/global/addresses", + // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "request": { + // "$ref": "GlobalNetworkEndpointGroupsAttachEndpointsRequest" + // }, // "response": { - // "$ref": "AddressList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) 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 "compute.globalAddresses.move": +// method id "compute.globalNetworkEndpointGroups.delete": -type GlobalAddressesMoveCall struct { - s *Service - project string - address string - globaladdressesmoverequest *GlobalAddressesMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalNetworkEndpointGroupsDeleteCall struct { + s *Service + project string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Move: Moves the specified address resource from one project to -// another project. +// Delete: Deletes the specified network endpoint group.Note that the +// NEG cannot be deleted if there are backend services referencing it. // -// - address: Name of the address resource to move. -// - project: Source project ID which the Address is moved from. -func (r *GlobalAddressesService) Move(project string, address string, globaladdressesmoverequest *GlobalAddressesMoveRequest) *GlobalAddressesMoveCall { - c := &GlobalAddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group to +// delete. It should comply with RFC1035. +// - project: Project ID for this request. +func (r *GlobalNetworkEndpointGroupsService) Delete(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsDeleteCall { + c := &GlobalNetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.address = address - c.globaladdressesmoverequest = globaladdressesmoverequest + c.networkEndpointGroup = networkEndpointGroup return c } @@ -83367,7 +87275,7 @@ func (r *GlobalAddressesService) Move(project string, address string, globaladdr // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalAddressesMoveCall) RequestId(requestId string) *GlobalAddressesMoveCall { +func (c *GlobalNetworkEndpointGroupsDeleteCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -83375,7 +87283,7 @@ func (c *GlobalAddressesMoveCall) RequestId(requestId string) *GlobalAddressesMo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalAddressesMoveCall) Fields(s ...googleapi.Field) *GlobalAddressesMoveCall { +func (c *GlobalNetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83383,21 +87291,21 @@ func (c *GlobalAddressesMoveCall) Fields(s ...googleapi.Field) *GlobalAddressesM // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalAddressesMoveCall) Context(ctx context.Context) *GlobalAddressesMoveCall { +func (c *GlobalNetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalAddressesMoveCall) Header() http.Header { +func (c *GlobalNetworkEndpointGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalAddressesMoveCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -83405,35 +87313,30 @@ func (c *GlobalAddressesMoveCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globaladdressesmoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}/move") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") 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{ - "project": c.project, - "address": c.address, + "project": c.project, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalAddresses.move" call. +// Do executes the "compute.globalNetworkEndpointGroups.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalAddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalNetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83464,24 +87367,23 @@ func (c *GlobalAddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Moves the specified address resource from one project to another project.", - // "flatPath": "projects/{project}/global/addresses/{address}/move", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.move", + // "description": "Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.", + // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", + // "httpMethod": "DELETE", + // "id": "compute.globalNetworkEndpointGroups.delete", // "parameterOrder": [ // "project", - // "address" + // "networkEndpointGroup" // ], // "parameters": { - // "address": { - // "description": "Name of the address resource to move.", + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group to delete. It should comply with RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "Source project ID which the Address is moved from.", + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -83493,10 +87395,7 @@ func (c *GlobalAddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "projects/{project}/global/addresses/{address}/move", - // "request": { - // "$ref": "GlobalAddressesMoveRequest" - // }, + // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", // "response": { // "$ref": "Operation" // }, @@ -83508,35 +87407,52 @@ func (c *GlobalAddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.globalAddresses.setLabels": +// method id "compute.globalNetworkEndpointGroups.detachNetworkEndpoints": -type GlobalAddressesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall struct { + s *Service + project string + networkEndpointGroup string + globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on a GlobalAddress. To learn more about -// labels, read the Labeling Resources documentation. +// DetachNetworkEndpoints: Detach the network endpoint from the +// specified network endpoint group. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { - c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group where +// you are removing network endpoints. It should comply with RFC1035. +// - project: Project ID for this request. +func (r *GlobalNetworkEndpointGroupsService) DetachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { + c := &GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest + c.networkEndpointGroup = networkEndpointGroup + c.globalnetworkendpointgroupsdetachendpointsrequest = globalnetworkendpointgroupsdetachendpointsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { +func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83544,21 +87460,21 @@ func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddre // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { +func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalAddressesSetLabelsCall) Header() http.Header { +func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -83566,14 +87482,14 @@ func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalnetworkendpointgroupsdetachendpointsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -83581,20 +87497,20 @@ func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalAddresses.setLabels" call. +// Do executes the "compute.globalNetworkEndpointGroups.detachNetworkEndpoints" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83625,15 +87541,21 @@ func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/global/addresses/{resource}/setLabels", + // "description": "Detach the network endpoint from the specified network endpoint group.", + // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", // "httpMethod": "POST", - // "id": "compute.globalAddresses.setLabels", + // "id": "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", // "parameterOrder": [ // "project", - // "resource" + // "networkEndpointGroup" // ], // "parameters": { + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -83641,17 +87563,15 @@ func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/addresses/{resource}/setLabels", + // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", // "request": { - // "$ref": "GlobalSetLabelsRequest" + // "$ref": "GlobalNetworkEndpointGroupsDetachEndpointsRequest" // }, // "response": { // "$ref": "Operation" @@ -83664,93 +87584,100 @@ func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } -// method id "compute.globalAddresses.testIamPermissions": +// method id "compute.globalNetworkEndpointGroups.get": -type GlobalAddressesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalNetworkEndpointGroupsGetCall struct { + s *Service + project string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Get: Returns the specified network endpoint group. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { - c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group. It +// should comply with RFC1035. +// - project: Project ID for this request. +func (r *GlobalNetworkEndpointGroupsService) Get(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsGetCall { + c := &GlobalNetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.networkEndpointGroup = networkEndpointGroup return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { +func (c *GlobalNetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GlobalNetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { +func (c *GlobalNetworkEndpointGroupsGetCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { +func (c *GlobalNetworkEndpointGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - 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, "projects/{project}/global/addresses/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalAddresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// Do executes the "compute.globalNetworkEndpointGroups.get" call. +// Exactly one of *NetworkEndpointGroup or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// *NetworkEndpointGroup.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83769,7 +87696,7 @@ func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &NetworkEndpointGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83781,36 +87708,32 @@ func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/addresses/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.globalAddresses.testIamPermissions", + // "description": "Returns the specified network endpoint group.", + // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", + // "httpMethod": "GET", + // "id": "compute.globalNetworkEndpointGroups.get", // "parameterOrder": [ // "project", - // "resource" + // "networkEndpointGroup" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group. It should comply with RFC1035.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/addresses/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "NetworkEndpointGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -83821,25 +87744,25 @@ func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } -// method id "compute.globalForwardingRules.delete": +// method id "compute.globalNetworkEndpointGroups.insert": -type GlobalForwardingRulesDeleteCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalNetworkEndpointGroupsInsertCall struct { + s *Service + project string + networkendpointgroup *NetworkEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified GlobalForwardingRule resource. +// Insert: Creates a network endpoint group in the specified project +// using the parameters that are included in the request. // -// - forwardingRule: Name of the ForwardingRule resource to delete. // - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { - c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalNetworkEndpointGroupsService) Insert(project string, networkendpointgroup *NetworkEndpointGroup) *GlobalNetworkEndpointGroupsInsertCall { + c := &GlobalNetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.forwardingRule = forwardingRule + c.networkendpointgroup = networkendpointgroup return c } @@ -83854,7 +87777,7 @@ func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { +func (c *GlobalNetworkEndpointGroupsInsertCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -83862,7 +87785,7 @@ func (c *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalFor // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { +func (c *GlobalNetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83870,21 +87793,21 @@ func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalFo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { +func (c *GlobalNetworkEndpointGroupsInsertCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { +func (c *GlobalNetworkEndpointGroupsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -83892,30 +87815,34 @@ func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") 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{ - "project": c.project, - "forwardingRule": c.forwardingRule, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalForwardingRules.delete" call. +// Do executes the "compute.globalNetworkEndpointGroups.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalNetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83946,22 +87873,14 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified GlobalForwardingRule resource.", - // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - // "httpMethod": "DELETE", - // "id": "compute.globalForwardingRules.delete", + // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + // "flatPath": "projects/{project}/global/networkEndpointGroups", + // "httpMethod": "POST", + // "id": "compute.globalNetworkEndpointGroups.insert", // "parameterOrder": [ - // "project", - // "forwardingRule" + // "project" // ], // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -83975,7 +87894,10 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "type": "string" // } // }, - // "path": "projects/{project}/global/forwardingRules/{forwardingRule}", + // "path": "projects/{project}/global/networkEndpointGroups", + // "request": { + // "$ref": "NetworkEndpointGroup" + // }, // "response": { // "$ref": "Operation" // }, @@ -83987,34 +87909,113 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.globalForwardingRules.get": +// method id "compute.globalNetworkEndpointGroups.list": -type GlobalForwardingRulesGetCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type GlobalNetworkEndpointGroupsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified GlobalForwardingRule resource. Gets a list -// of available forwarding rules by making a list() request. +// List: Retrieves the list of network endpoint groups that are located +// in the specified project. // -// - forwardingRule: Name of the ForwardingRule resource to return. // - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { - c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalNetworkEndpointGroupsService) List(project string) *GlobalNetworkEndpointGroupsListCall { + c := &GlobalNetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.forwardingRule = forwardingRule + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *GlobalNetworkEndpointGroupsListCall) Filter(filter string) *GlobalNetworkEndpointGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *GlobalNetworkEndpointGroupsListCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *GlobalNetworkEndpointGroupsListCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *GlobalNetworkEndpointGroupsListCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *GlobalNetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { +func (c *GlobalNetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84024,7 +88025,7 @@ func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwa // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall { +func (c *GlobalNetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsListCall { c.ifNoneMatch_ = entityTag return c } @@ -84032,21 +88033,21 @@ func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForw // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall { +func (c *GlobalNetworkEndpointGroupsListCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalForwardingRulesGetCall) Header() http.Header { +func (c *GlobalNetworkEndpointGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -84059,7 +88060,7 @@ func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, er var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -84067,20 +88068,19 @@ func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalForwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ForwardingRule.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.globalNetworkEndpointGroups.list" call. +// Exactly one of *NetworkEndpointGroupList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *NetworkEndpointGroupList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { +func (c *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84099,7 +88099,7 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ForwardingRule{ + ret := &NetworkEndpointGroupList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -84111,20 +88111,35 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar } return ret, nil // { - // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", - // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", + // "description": "Retrieves the list of network endpoint groups that are located in the specified project.", + // "flatPath": "projects/{project}/global/networkEndpointGroups", // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.get", + // "id": "compute.globalNetworkEndpointGroups.list", // "parameterOrder": [ - // "project", - // "forwardingRule" + // "project" // ], // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -84133,11 +88148,16 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/forwardingRules/{forwardingRule}", + // "path": "projects/{project}/global/networkEndpointGroups", // "response": { - // "$ref": "ForwardingRule" + // "$ref": "NetworkEndpointGroupList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -84148,48 +88168,138 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar } -// method id "compute.globalForwardingRules.insert": +// 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 *GlobalNetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) 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 GlobalForwardingRulesInsertCall struct { - s *Service - project string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.globalNetworkEndpointGroups.listNetworkEndpoints": + +type GlobalNetworkEndpointGroupsListNetworkEndpointsCall struct { + s *Service + project string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a GlobalForwardingRule resource in the specified -// project using the data included in the request. +// ListNetworkEndpoints: Lists the network endpoints in the specified +// network endpoint group. // -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { - c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group from +// which you want to generate a list of included network endpoints. It +// should comply with RFC1035. +// - project: Project ID for this request. +func (r *GlobalNetworkEndpointGroupsService) ListNetworkEndpoints(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { + c := &GlobalNetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.forwardingrule = forwardingrule + c.networkEndpointGroup = networkEndpointGroup return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84197,21 +88307,21 @@ func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalFo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall { +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalForwardingRulesInsertCall) Header() http.Header { +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -84219,14 +88329,9 @@ func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -84234,19 +88339,22 @@ func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalForwardingRules.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.globalNetworkEndpointGroups.listNetworkEndpoints" call. +// Exactly one of *NetworkEndpointGroupsListNetworkEndpoints or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *NetworkEndpointGroupsListNetworkEndpoints.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84265,7 +88373,7 @@ func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkEndpointGroupsListNetworkEndpoints{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -84277,14 +88385,44 @@ func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/forwardingRules", + // "description": "Lists the network endpoints in the specified network endpoint group.", + // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.insert", + // "id": "compute.globalNetworkEndpointGroups.listNetworkEndpoints", // "parameterOrder": [ - // "project" + // "project", + // "networkEndpointGroup" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "networkEndpointGroup": { + // "description": "The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -84292,30 +88430,49 @@ func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/forwardingRules", - // "request": { - // "$ref": "ForwardingRule" - // }, + // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", // "response": { - // "$ref": "Operation" + // "$ref": "NetworkEndpointGroupsListNetworkEndpoints" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.globalForwardingRules.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) 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 GlobalForwardingRulesListCall struct { +// method id "compute.globalOperations.aggregatedList": + +type GlobalOperationsAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -84324,12 +88481,11 @@ type GlobalForwardingRulesListCall struct { header_ http.Header } -// List: Retrieves a list of GlobalForwardingRule resources available to -// the specified project. +// AggregatedList: Retrieves an aggregated list of all operations. // // - project: Project ID for this request. -func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { - c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { + c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -84369,18 +88525,31 @@ func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRul // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *GlobalOperationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *GlobalOperationsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -84394,7 +88563,7 @@ func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForw // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -84402,7 +88571,7 @@ func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardin // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -84411,7 +88580,7 @@ func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwa // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *GlobalForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -84419,7 +88588,7 @@ func (c *GlobalForwardingRulesListCall) ReturnPartialSuccess(returnPartialSucces // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84429,7 +88598,7 @@ func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForw // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -84437,21 +88606,21 @@ func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalFor // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall { +func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalForwardingRulesListCall) Header() http.Header { +func (c *GlobalOperationsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -84464,7 +88633,7 @@ func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -84477,14 +88646,14 @@ func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalForwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any +// Do executes the "compute.globalOperations.aggregatedList" call. +// Exactly one of *OperationAggregatedList or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.ServerResponse.Header or (if a response was +// *OperationAggregatedList.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { +func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84503,7 +88672,7 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ForwardingRuleList{ + ret := &OperationAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -84515,10 +88684,10 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa } return ret, nil // { - // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", - // "flatPath": "projects/{project}/global/forwardingRules", + // "description": "Retrieves an aggregated list of all operations.", + // "flatPath": "projects/{project}/aggregated/operations", // "httpMethod": "GET", - // "id": "compute.globalForwardingRules.list", + // "id": "compute.globalOperations.aggregatedList", // "parameterOrder": [ // "project" // ], @@ -84528,6 +88697,11 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa // "location": "query", // "type": "string" // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -84559,9 +88733,9 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa // "type": "boolean" // } // }, - // "path": "projects/{project}/global/forwardingRules", + // "path": "projects/{project}/aggregated/operations", // "response": { - // "$ref": "ForwardingRuleList" + // "$ref": "OperationAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -84575,7 +88749,7 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa // 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 *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { +func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -84593,53 +88767,32 @@ func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*Forwa } } -// method id "compute.globalForwardingRules.patch": +// method id "compute.globalOperations.delete": -type GlobalForwardingRulesPatchCall struct { - s *Service - project string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalOperationsDeleteCall struct { + s *Service + project string + operation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified forwarding rule with the data included -// in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. +// Delete: Deletes the specified Operations resource. // -// - forwardingRule: Name of the ForwardingRule resource to patch. +// - operation: Name of the Operations resource to delete. // - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { - c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { + c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesPatchCall) RequestId(requestId string) *GlobalForwardingRulesPatchCall { - c.urlParams_.Set("requestId", requestId) + c.operation = operation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalForwardingRulesPatchCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesPatchCall { +func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84647,21 +88800,21 @@ func (c *GlobalForwardingRulesPatchCall) Fields(s ...googleapi.Field) *GlobalFor // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalForwardingRulesPatchCall) Context(ctx context.Context) *GlobalForwardingRulesPatchCall { +func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalForwardingRulesPatchCall) Header() http.Header { +func (c *GlobalOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -84669,76 +88822,46 @@ func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "forwardingRule": c.forwardingRule, + "project": c.project, + "operation": c.operation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalForwardingRules.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.globalOperations.delete" call. +func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", - // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - // "httpMethod": "PATCH", - // "id": "compute.globalForwardingRules.patch", + // "description": "Deletes the specified Operations resource.", + // "flatPath": "projects/{project}/global/operations/{operation}", + // "httpMethod": "DELETE", + // "id": "compute.globalOperations.delete", // "parameterOrder": [ // "project", - // "forwardingRule" + // "operation" // ], // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to patch.", + // "operation": { + // "description": "Name of the Operations resource to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -84750,20 +88873,9 @@ func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Oper // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/global/forwardingRules/{forwardingRule}", - // "request": { - // "$ref": "ForwardingRule" - // }, - // "response": { - // "$ref": "Operation" - // }, + // "path": "projects/{project}/global/operations/{operation}", // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/compute" @@ -84772,93 +88884,99 @@ func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.globalForwardingRules.setLabels": +// method id "compute.globalOperations.get": -type GlobalForwardingRulesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalOperationsGetCall struct { + s *Service + project string + operation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling resources documentation. +// Get: Retrieves the specified Operations resource. // +// - operation: Name of the Operations resource to return. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { - c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { + c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest + c.operation = operation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetLabelsCall { +func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalForwardingRulesSetLabelsCall) Context(ctx context.Context) *GlobalForwardingRulesSetLabelsCall { +func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { +func (c *GlobalOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, 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.globalsetlabelsrequest) - 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, "projects/{project}/global/forwardingRules/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "operation": c.operation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalForwardingRules.setLabels" call. +// Do executes the "compute.globalOperations.get" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84889,310 +89007,215 @@ func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.", - // "flatPath": "projects/{project}/global/forwardingRules/{resource}/setLabels", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.setLabels", + // "description": "Retrieves the specified Operations resource.", + // "flatPath": "projects/{project}/global/operations/{operation}", + // "httpMethod": "GET", + // "id": "compute.globalOperations.get", // "parameterOrder": [ // "project", - // "resource" + // "operation" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "operation": { + // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/forwardingRules/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, + // "path": "projects/{project}/global/operations/{operation}", // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.globalForwardingRules.setTarget": +// method id "compute.globalOperations.list": -type GlobalForwardingRulesSetTargetCall struct { - s *Service - project string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalOperationsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetTarget: Changes target URL for the GlobalForwardingRule resource. -// The new target should be of the same type as the old target. +// List: Retrieves a list of Operation resources contained within the +// specified project. // -// - forwardingRule: Name of the ForwardingRule resource in which target -// is to be set. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { - c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { + c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.forwardingRule = forwardingRule - c.targetreference = targetreference return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall { - c.ctx_ = ctx +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, 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.targetreference) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget") - 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{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setTarget" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", - // "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.setTarget", - // "parameterOrder": [ - // "project", - // "forwardingRule" - // ], - // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalForwardingRules.testIamPermissions": - -type GlobalForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { - c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *GlobalOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall { +func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall { +func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { +func (c *GlobalOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - 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, "projects/{project}/global/forwardingRules/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalForwardingRules.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.globalOperations.list" call. +// Exactly one of *OperationList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *OperationList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85211,7 +89234,7 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &OperationList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85223,15 +89246,37 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.globalForwardingRules.testIamPermissions", + // "description": "Retrieves a list of Operation resources contained within the specified project.", + // "flatPath": "projects/{project}/global/operations", + // "httpMethod": "GET", + // "id": "compute.globalOperations.list", // "parameterOrder": [ - // "project", - // "resource" + // "project" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -85239,20 +89284,15 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/global/operations", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "OperationList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -85263,53 +89303,64 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO } -// method id "compute.globalNetworkEndpointGroups.attachNetworkEndpoints": +// 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 *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.globalOperations.wait": + +type GlobalOperationsWaitCall struct { + s *Service + project string + operation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AttachNetworkEndpoints: Attach a network endpoint to the specified -// network endpoint group. +// Wait: Waits for the specified Operation resource to return as `DONE` +// or for the request to approach the 2 minute deadline, and retrieves +// the specified Operation resource. This method differs from the `GET` +// method in that it waits for no more than the default deadline (2 +// minutes) and then returns the current state of the operation, which +// might be `DONE` or still in progress. This method is called on a +// best-effort basis. Specifically: - In uncommon cases, when the server +// is overloaded, the request might return before the default deadline +// is reached, or might return after zero seconds. - If the default +// deadline is reached, there is no guarantee that the operation is +// actually done when the method returns. Be prepared to retry if the +// operation is not `DONE`. // -// - networkEndpointGroup: The name of the network endpoint group where -// you are attaching network endpoints to. It should comply with -// RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) AttachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - operation: Name of the Operations resource to return. +// - project: Project ID for this request. +func (r *GlobalOperationsService) Wait(project string, operation string) *GlobalOperationsWaitCall { + c := &GlobalOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.networkEndpointGroup = networkEndpointGroup - c.globalnetworkendpointgroupsattachendpointsrequest = globalnetworkendpointgroupsattachendpointsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.urlParams_.Set("requestId", requestId) + c.operation = operation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { +func (c *GlobalOperationsWaitCall) Fields(s ...googleapi.Field) *GlobalOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85317,21 +89368,21 @@ func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { +func (c *GlobalOperationsWaitCall) Context(ctx context.Context) *GlobalOperationsWaitCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { +func (c *GlobalOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -85339,14 +89390,9 @@ func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalnetworkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}/wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85354,20 +89400,20 @@ func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, + "project": c.project, + "operation": c.operation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalNetworkEndpointGroups.attachNetworkEndpoints" call. +// Do executes the "compute.globalOperations.wait" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85398,18 +89444,19 @@ func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googl } return ret, nil // { - // "description": "Attach a network endpoint to the specified network endpoint group.", - // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", + // "description": "Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`. ", + // "flatPath": "projects/{project}/global/operations/{operation}/wait", // "httpMethod": "POST", - // "id": "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", + // "id": "compute.globalOperations.wait", // "parameterOrder": [ // "project", - // "networkEndpointGroup" + // "operation" // ], // "parameters": { - // "networkEndpointGroup": { - // "description": "The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035.", + // "operation": { + // "description": "Name of the Operations resource to return.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -85419,72 +89466,51 @@ func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googl // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - // "request": { - // "$ref": "GlobalNetworkEndpointGroupsAttachEndpointsRequest" - // }, + // "path": "projects/{project}/global/operations/{operation}/wait", // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.globalNetworkEndpointGroups.delete": +// method id "compute.globalOrganizationOperations.delete": -type GlobalNetworkEndpointGroupsDeleteCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalOrganizationOperationsDeleteCall struct { + s *Service + operation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified network endpoint group.Note that the -// NEG cannot be deleted if there are backend services referencing it. +// Delete: Deletes the specified Operations resource. // -// - networkEndpointGroup: The name of the network endpoint group to -// delete. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Delete(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsDeleteCall { - c := &GlobalNetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup +// - operation: Name of the Operations resource to delete. +func (r *GlobalOrganizationOperationsService) Delete(operation string) *GlobalOrganizationOperationsDeleteCall { + c := &GlobalOrganizationOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.operation = operation return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalNetworkEndpointGroupsDeleteCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("requestId", requestId) +// ParentId sets the optional parameter "parentId": Parent ID for this +// request. +func (c *GlobalOrganizationOperationsDeleteCall) ParentId(parentId string) *GlobalOrganizationOperationsDeleteCall { + c.urlParams_.Set("parentId", parentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDeleteCall { +func (c *GlobalOrganizationOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85492,21 +89518,21 @@ func (c *GlobalNetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *Gl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDeleteCall { +func (c *GlobalOrganizationOperationsDeleteCall) Context(ctx context.Context) *GlobalOrganizationOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Header() http.Header { +func (c *GlobalOrganizationOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOrganizationOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -85516,7 +89542,7 @@ func (c *GlobalNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations/{operation}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -85524,82 +89550,46 @@ func (c *GlobalNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, + "operation": c.operation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalNetworkEndpointGroups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.globalOrganizationOperations.delete" call. +func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil // { - // "description": "Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.", - // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", + // "description": "Deletes the specified Operations resource.", + // "flatPath": "locations/global/operations/{operation}", // "httpMethod": "DELETE", - // "id": "compute.globalNetworkEndpointGroups.delete", + // "id": "compute.globalOrganizationOperations.delete", // "parameterOrder": [ - // "project", - // "networkEndpointGroup" + // "operation" // ], // "parameters": { - // "networkEndpointGroup": { - // "description": "The name of the network endpoint group to delete. It should comply with RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", + // "operation": { + // "description": "Name of the Operations resource to delete.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "parentId": { + // "description": "Parent ID for this request.", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - // "response": { - // "$ref": "Operation" - // }, + // "path": "locations/global/operations/{operation}", // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/compute" @@ -85608,110 +89598,103 @@ func (c *GlobalNetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "compute.globalNetworkEndpointGroups.detachNetworkEndpoints": +// method id "compute.globalOrganizationOperations.get": -type GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalOrganizationOperationsGetCall struct { + s *Service + operation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DetachNetworkEndpoints: Detach the network endpoint from the -// specified network endpoint group. +// Get: Retrieves the specified Operations resource. Gets a list of +// operations by making a `list()` request. // -// - networkEndpointGroup: The name of the network endpoint group where -// you are removing network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) DetachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - c.globalnetworkendpointgroupsdetachendpointsrequest = globalnetworkendpointgroupsdetachendpointsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.urlParams_.Set("requestId", requestId) +// - operation: Name of the Operations resource to return. +func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { + c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.operation = operation + return c +} + +// ParentId sets the optional parameter "parentId": Parent ID for this +// request. +func (c *GlobalOrganizationOperationsGetCall) ParentId(parentId string) *GlobalOrganizationOperationsGetCall { + c.urlParams_.Set("parentId", parentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { +func (c *GlobalOrganizationOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GlobalOrganizationOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { +func (c *GlobalOrganizationOperationsGetCall) Context(ctx context.Context) *GlobalOrganizationOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { +func (c *GlobalOrganizationOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Response, 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.globalnetworkendpointgroupsdetachendpointsrequest) - 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, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations/{operation}") 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{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, + "operation": c.operation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalNetworkEndpointGroups.detachNetworkEndpoints" call. +// Do executes the "compute.globalOrganizationOperations.get" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalOrganizationOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85742,77 +89725,150 @@ func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googl } return ret, nil // { - // "description": "Detach the network endpoint from the specified network endpoint group.", - // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - // "httpMethod": "POST", - // "id": "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", + // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.", + // "flatPath": "locations/global/operations/{operation}", + // "httpMethod": "GET", + // "id": "compute.globalOrganizationOperations.get", // "parameterOrder": [ - // "project", - // "networkEndpointGroup" + // "operation" // ], // "parameters": { - // "networkEndpointGroup": { - // "description": "The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", + // "operation": { + // "description": "Name of the Operations resource to return.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "parentId": { + // "description": "Parent ID for this request.", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - // "request": { - // "$ref": "GlobalNetworkEndpointGroupsDetachEndpointsRequest" - // }, + // "path": "locations/global/operations/{operation}", // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.globalNetworkEndpointGroups.get": +// method id "compute.globalOrganizationOperations.list": -type GlobalNetworkEndpointGroupsGetCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type GlobalOrganizationOperationsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group. It -// should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Get(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsGetCall { - c := &GlobalNetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup +// List: Retrieves a list of Operation resources contained within the +// specified organization. +func (r *GlobalOrganizationOperationsService) List() *GlobalOrganizationOperationsListCall { + c := &GlobalOrganizationOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *GlobalOrganizationOperationsListCall) Filter(filter string) *GlobalOrganizationOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *GlobalOrganizationOperationsListCall) MaxResults(maxResults int64) *GlobalOrganizationOperationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *GlobalOrganizationOperationsListCall) OrderBy(orderBy string) *GlobalOrganizationOperationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *GlobalOrganizationOperationsListCall) PageToken(pageToken string) *GlobalOrganizationOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ParentId sets the optional parameter "parentId": Parent ID for this +// request. +func (c *GlobalOrganizationOperationsListCall) ParentId(parentId string) *GlobalOrganizationOperationsListCall { + c.urlParams_.Set("parentId", parentId) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *GlobalOrganizationOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOrganizationOperationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalNetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsGetCall { +func (c *GlobalOrganizationOperationsListCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85822,7 +89878,7 @@ func (c *GlobalNetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *Globa // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalNetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsGetCall { +func (c *GlobalOrganizationOperationsListCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -85830,21 +89886,21 @@ func (c *GlobalNetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *Glob // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalNetworkEndpointGroupsGetCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsGetCall { +func (c *GlobalOrganizationOperationsListCall) Context(ctx context.Context) *GlobalOrganizationOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalNetworkEndpointGroupsGetCall) Header() http.Header { +func (c *GlobalOrganizationOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalOrganizationOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -85857,28 +89913,24 @@ func (c *GlobalNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalNetworkEndpointGroups.get" call. -// Exactly one of *NetworkEndpointGroup or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.globalOrganizationOperations.list" call. +// Exactly one of *OperationList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *OperationList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, error) { +func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85897,7 +89949,7 @@ func (c *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEndpointGroup{ + ret := &OperationList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85909,32 +89961,48 @@ func (c *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns the specified network endpoint group.", - // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", + // "description": "Retrieves a list of Operation resources contained within the specified organization.", + // "flatPath": "locations/global/operations", // "httpMethod": "GET", - // "id": "compute.globalNetworkEndpointGroups.get", - // "parameterOrder": [ - // "project", - // "networkEndpointGroup" - // ], + // "id": "compute.globalOrganizationOperations.list", // "parameters": { - // "networkEndpointGroup": { - // "description": "The name of the network endpoint group. It should comply with RFC1035.", - // "location": "path", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "parentId": { + // "description": "Parent ID for this request.", + // "location": "query", // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", + // "path": "locations/global/operations", // "response": { - // "$ref": "NetworkEndpointGroup" + // "$ref": "OperationList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -85945,25 +90013,47 @@ func (c *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "compute.globalNetworkEndpointGroups.insert": +// 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 *GlobalOrganizationOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type GlobalNetworkEndpointGroupsInsertCall struct { - s *Service - project string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.globalPublicDelegatedPrefixes.delete": + +type GlobalPublicDelegatedPrefixesDeleteCall struct { + s *Service + project string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a network endpoint group in the specified project -// using the parameters that are included in the request. +// Delete: Deletes the specified global PublicDelegatedPrefix. // -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Insert(project string, networkendpointgroup *NetworkEndpointGroup) *GlobalNetworkEndpointGroupsInsertCall { - c := &GlobalNetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource +// to delete. +func (r *GlobalPublicDelegatedPrefixesService) Delete(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesDeleteCall { + c := &GlobalPublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.networkendpointgroup = networkendpointgroup + c.publicDelegatedPrefix = publicDelegatedPrefix return c } @@ -85978,7 +90068,7 @@ func (r *GlobalNetworkEndpointGroupsService) Insert(project string, networkendpo // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalNetworkEndpointGroupsInsertCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsInsertCall { +func (c *GlobalPublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -85986,7 +90076,7 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) RequestId(requestId string) *Glo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalNetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsInsertCall { +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85994,21 +90084,21 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *Gl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalNetworkEndpointGroupsInsertCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsInsertCall { +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalNetworkEndpointGroupsInsertCall) Header() http.Header { +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalPublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -86016,34 +90106,30 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroup) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") 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{ - "project": c.project, + "project": c.project, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalNetworkEndpointGroups.insert" call. +// Do executes the "compute.globalPublicDelegatedPrefixes.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86074,12 +90160,13 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", - // "flatPath": "projects/{project}/global/networkEndpointGroups", - // "httpMethod": "POST", - // "id": "compute.globalNetworkEndpointGroups.insert", + // "description": "Deletes the specified global PublicDelegatedPrefix.", + // "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "httpMethod": "DELETE", + // "id": "compute.globalPublicDelegatedPrefixes.delete", // "parameterOrder": [ - // "project" + // "project", + // "publicDelegatedPrefix" // ], // "parameters": { // "project": { @@ -86089,16 +90176,20 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/networkEndpointGroups", - // "request": { - // "$ref": "NetworkEndpointGroup" - // }, + // "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", // "response": { // "$ref": "Operation" // }, @@ -86110,113 +90201,34 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) } -// method id "compute.globalNetworkEndpointGroups.list": +// method id "compute.globalPublicDelegatedPrefixes.get": -type GlobalNetworkEndpointGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type GlobalPublicDelegatedPrefixesGetCall struct { + s *Service + project string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of network endpoint groups that are located -// in the specified project. +// Get: Returns the specified global PublicDelegatedPrefix resource. // -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) List(project string) *GlobalNetworkEndpointGroupsListCall { - c := &GlobalNetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource +// to return. +func (r *GlobalPublicDelegatedPrefixesService) Get(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesGetCall { + c := &GlobalPublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *GlobalNetworkEndpointGroupsListCall) Filter(filter string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *GlobalNetworkEndpointGroupsListCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *GlobalNetworkEndpointGroupsListCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *GlobalNetworkEndpointGroupsListCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *GlobalNetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.publicDelegatedPrefix = publicDelegatedPrefix return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalNetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListCall { +func (c *GlobalPublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -86226,7 +90238,7 @@ func (c *GlobalNetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *Glob // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalNetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsListCall { +func (c *GlobalPublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -86234,21 +90246,21 @@ func (c *GlobalNetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *Glo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalNetworkEndpointGroupsListCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListCall { +func (c *GlobalPublicDelegatedPrefixesGetCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalNetworkEndpointGroupsListCall) Header() http.Header { +func (c *GlobalPublicDelegatedPrefixesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalPublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -86261,7 +90273,7 @@ func (c *GlobalNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -86269,19 +90281,20 @@ func (c *GlobalNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalNetworkEndpointGroups.list" call. -// Exactly one of *NetworkEndpointGroupList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.ServerResponse.Header or (if a response was +// Do executes the "compute.globalPublicDelegatedPrefixes.get" call. +// Exactly one of *PublicDelegatedPrefix or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PublicDelegatedPrefix.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, error) { +func (c *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86300,7 +90313,7 @@ func (c *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEndpointGroupList{ + ret := &PublicDelegatedPrefix{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86312,37 +90325,15 @@ func (c *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups that are located in the specified project.", - // "flatPath": "projects/{project}/global/networkEndpointGroups", + // "description": "Returns the specified global PublicDelegatedPrefix resource.", + // "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", // "httpMethod": "GET", - // "id": "compute.globalNetworkEndpointGroups.list", + // "id": "compute.globalPublicDelegatedPrefixes.get", // "parameterOrder": [ - // "project" + // "project", + // "publicDelegatedPrefix" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -86350,15 +90341,17 @@ func (c *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) ( // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/networkEndpointGroups", + // "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", // "response": { - // "$ref": "NetworkEndpointGroupList" + // "$ref": "PublicDelegatedPrefix" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -86369,138 +90362,48 @@ func (c *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalNetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) 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 "compute.globalNetworkEndpointGroups.listNetworkEndpoints": +// method id "compute.globalPublicDelegatedPrefixes.insert": -type GlobalNetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type GlobalPublicDelegatedPrefixesInsertCall struct { + s *Service + project string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListNetworkEndpoints: Lists the network endpoints in the specified -// network endpoint group. +// Insert: Creates a global PublicDelegatedPrefix in the specified +// project using the parameters that are included in the request. // -// - networkEndpointGroup: The name of the network endpoint group from -// which you want to generate a list of included network endpoints. It -// should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) ListNetworkEndpoints(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *GlobalPublicDelegatedPrefixesService) Insert(project string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesInsertCall { + c := &GlobalPublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) + c.publicdelegatedprefix = publicdelegatedprefix return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *GlobalPublicDelegatedPrefixesInsertCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { +func (c *GlobalPublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -86508,21 +90411,21 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { +func (c *GlobalPublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { +func (c *GlobalPublicDelegatedPrefixesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalPublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -86530,9 +90433,14 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -86540,22 +90448,19 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalNetworkEndpointGroups.listNetworkEndpoints" call. -// Exactly one of *NetworkEndpointGroupsListNetworkEndpoints or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, error) { +// Do executes the "compute.globalPublicDelegatedPrefixes.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *GlobalPublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86574,7 +90479,7 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEndpointGroupsListNetworkEndpoints{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86586,44 +90491,14 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the network endpoints in the specified network endpoint group.", - // "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", + // "description": "Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.", + // "flatPath": "projects/{project}/global/publicDelegatedPrefixes", // "httpMethod": "POST", - // "id": "compute.globalNetworkEndpointGroups.listNetworkEndpoints", + // "id": "compute.globalPublicDelegatedPrefixes.insert", // "parameterOrder": [ - // "project", - // "networkEndpointGroup" + // "project" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "networkEndpointGroup": { - // "description": "The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -86631,49 +90506,30 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googlea // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", + // "path": "projects/{project}/global/publicDelegatedPrefixes", + // "request": { + // "$ref": "PublicDelegatedPrefix" + // }, // "response": { - // "$ref": "NetworkEndpointGroupsListNetworkEndpoints" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) 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 "compute.globalOperations.aggregatedList": +// method id "compute.globalPublicDelegatedPrefixes.list": -type GlobalOperationsAggregatedListCall struct { +type GlobalPublicDelegatedPrefixesListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -86682,11 +90538,11 @@ type GlobalOperationsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of all operations. +// List: Lists the global PublicDelegatedPrefixes for a project. // // - project: Project ID for this request. -func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { - c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *GlobalPublicDelegatedPrefixesService) List(project string) *GlobalPublicDelegatedPrefixesListCall { + c := &GlobalPublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -86726,31 +90582,18 @@ func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperatio // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) Filter(filter string) *GlobalPublicDelegatedPrefixesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *GlobalOperationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *GlobalPublicDelegatedPrefixesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -86764,7 +90607,7 @@ func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *Globa // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) OrderBy(orderBy string) *GlobalPublicDelegatedPrefixesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -86772,7 +90615,7 @@ func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOper // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) PageToken(pageToken string) *GlobalPublicDelegatedPrefixesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -86781,7 +90624,7 @@ func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *Global // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *GlobalOperationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalPublicDelegatedPrefixesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -86789,7 +90632,7 @@ func (c *GlobalOperationsAggregatedListCall) ReturnPartialSuccess(returnPartialS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -86799,7 +90642,7 @@ func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *Globa // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesListCall { c.ifNoneMatch_ = entityTag return c } @@ -86807,21 +90650,21 @@ func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *Glob // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall { +func (c *GlobalPublicDelegatedPrefixesListCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalOperationsAggregatedListCall) Header() http.Header { +func (c *GlobalPublicDelegatedPrefixesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalPublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -86834,7 +90677,7 @@ func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -86847,14 +90690,14 @@ func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalOperations.aggregatedList" call. -// Exactly one of *OperationAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *OperationAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.globalPublicDelegatedPrefixes.list" call. +// Exactly one of *PublicDelegatedPrefixList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *PublicDelegatedPrefixList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) { +func (c *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86873,7 +90716,7 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OperationAggregatedList{ + ret := &PublicDelegatedPrefixList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86885,10 +90728,10 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of all operations.", - // "flatPath": "projects/{project}/aggregated/operations", + // "description": "Lists the global PublicDelegatedPrefixes for a project.", + // "flatPath": "projects/{project}/global/publicDelegatedPrefixes", // "httpMethod": "GET", - // "id": "compute.globalOperations.aggregatedList", + // "id": "compute.globalPublicDelegatedPrefixes.list", // "parameterOrder": [ // "project" // ], @@ -86898,11 +90741,6 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -86934,9 +90772,9 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/operations", + // "path": "projects/{project}/global/publicDelegatedPrefixes", // "response": { - // "$ref": "OperationAggregatedList" + // "$ref": "PublicDelegatedPrefixList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -86950,7 +90788,7 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error { +func (c *GlobalPublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -86968,216 +90806,111 @@ func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(* } } -// method id "compute.globalOperations.delete": - -type GlobalOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// -// - operation: Name of the Operations resource to delete. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { - c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { - 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 *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *GlobalOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/operations/{operation}") - 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{ - "project": c.project, - "operation": c.operation, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.delete" call. -func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil - // { - // "description": "Deletes the specified Operations resource.", - // "flatPath": "projects/{project}/global/operations/{operation}", - // "httpMethod": "DELETE", - // "id": "compute.globalOperations.delete", - // "parameterOrder": [ - // "project", - // "operation" - // ], - // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/operations/{operation}", - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.globalOperations.get": - -type GlobalOperationsGetCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. +// method id "compute.globalPublicDelegatedPrefixes.patch": + +type GlobalPublicDelegatedPrefixesPatchCall struct { + s *Service + project string + publicDelegatedPrefix string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified global PublicDelegatedPrefix resource +// with the data included in the request. This method supports PATCH +// semantics and uses JSON merge patch format and processing rules. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { - c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource +// to patch. +func (r *GlobalPublicDelegatedPrefixesService) Patch(project string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesPatchCall { + c := &GlobalPublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.publicDelegatedPrefix = publicDelegatedPrefix + c.publicdelegatedprefix = publicdelegatedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *GlobalPublicDelegatedPrefixesPatchCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesPatchCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { +func (c *GlobalPublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall { +func (c *GlobalPublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalOperationsGetCall) Header() http.Header { +func (c *GlobalPublicDelegatedPrefixesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *GlobalPublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, 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.publicdelegatedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operation, + "project": c.project, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalOperations.get" call. +// Do executes the "compute.globalPublicDelegatedPrefixes.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *GlobalPublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87208,46 +90941,53 @@ func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Retrieves the specified Operations resource.", - // "flatPath": "projects/{project}/global/operations/{operation}", - // "httpMethod": "GET", - // "id": "compute.globalOperations.get", + // "description": "Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "httpMethod": "PATCH", + // "id": "compute.globalPublicDelegatedPrefixes.patch", // "parameterOrder": [ // "project", - // "operation" + // "publicDelegatedPrefix" // ], // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to patch.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/global/operations/{operation}", + // "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "request": { + // "$ref": "PublicDelegatedPrefix" + // }, // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.globalOperations.list": +// method id "compute.healthChecks.aggregatedList": -type GlobalOperationsListCall struct { +type HealthChecksAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -87256,12 +90996,12 @@ type GlobalOperationsListCall struct { header_ http.Header } -// List: Retrieves a list of Operation resources contained within the -// specified project. +// AggregatedList: Retrieves the list of all HealthCheck resources, +// regional and global, available to the specified project. // -// - project: Project ID for this request. -func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { - c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { + c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -87301,18 +91041,31 @@ func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) Filter(filter string) *HealthChecksAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *HealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *HealthChecksAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChecksAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -87326,7 +91079,7 @@ func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperation // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -87334,7 +91087,7 @@ func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsList // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChecksAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -87343,7 +91096,7 @@ func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperations // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *GlobalOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -87351,7 +91104,7 @@ func (c *GlobalOperationsListCall) ReturnPartialSuccess(returnPartialSuccess boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChecksAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87361,7 +91114,7 @@ func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperation // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthChecksAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -87369,21 +91122,21 @@ func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperatio // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall { +func (c *HealthChecksAggregatedListCall) Context(ctx context.Context) *HealthChecksAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalOperationsListCall) Header() http.Header { +func (c *HealthChecksAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -87396,7 +91149,7 @@ func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -87409,14 +91162,14 @@ func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.healthChecks.aggregatedList" call. +// Exactly one of *HealthChecksAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *HealthChecksAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { +func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthChecksAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87435,7 +91188,7 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OperationList{ + ret := &HealthChecksAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -87447,10 +91200,10 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified project.", - // "flatPath": "projects/{project}/global/operations", + // "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/healthChecks", // "httpMethod": "GET", - // "id": "compute.globalOperations.list", + // "id": "compute.healthChecks.aggregatedList", // "parameterOrder": [ // "project" // ], @@ -87460,6 +91213,11 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL // "location": "query", // "type": "string" // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -87479,7 +91237,7 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", + // "description": "Name of the project scoping this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -87491,9 +91249,9 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL // "type": "boolean" // } // }, - // "path": "projects/{project}/global/operations", + // "path": "projects/{project}/aggregated/healthChecks", // "response": { - // "$ref": "OperationList" + // "$ref": "HealthChecksAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -87507,7 +91265,7 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL // 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 *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { +func (c *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*HealthChecksAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -87525,43 +91283,48 @@ func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationL } } -// method id "compute.globalOperations.wait": +// method id "compute.healthChecks.delete": -type GlobalOperationsWaitCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HealthChecksDeleteCall struct { + s *Service + project string + healthCheck string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits for the specified Operation resource to return as `DONE` -// or for the request to approach the 2 minute deadline, and retrieves -// the specified Operation resource. This method differs from the `GET` -// method in that it waits for no more than the default deadline (2 -// minutes) and then returns the current state of the operation, which -// might be `DONE` or still in progress. This method is called on a -// best-effort basis. Specifically: - In uncommon cases, when the server -// is overloaded, the request might return before the default deadline -// is reached, or might return after zero seconds. - If the default -// deadline is reached, there is no guarantee that the operation is -// actually done when the method returns. Be prepared to retry if the -// operation is not `DONE`. +// Delete: Deletes the specified HealthCheck resource. // -// - operation: Name of the Operations resource to return. +// - healthCheck: Name of the HealthCheck resource to delete. // - project: Project ID for this request. -func (r *GlobalOperationsService) Wait(project string, operation string) *GlobalOperationsWaitCall { - c := &GlobalOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { + c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.healthCheck = healthCheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalOperationsWaitCall) Fields(s ...googleapi.Field) *GlobalOperationsWaitCall { +func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87569,21 +91332,21 @@ func (c *GlobalOperationsWaitCall) Fields(s ...googleapi.Field) *GlobalOperation // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalOperationsWaitCall) Context(ctx context.Context) *GlobalOperationsWaitCall { +func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalOperationsWaitCall) Header() http.Header { +func (c *HealthChecksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -87593,28 +91356,28 @@ func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}/wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") 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{ - "project": c.project, - "operation": c.operation, + "project": c.project, + "healthCheck": c.healthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalOperations.wait" call. +// Do executes the "compute.healthChecks.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87645,17 +91408,17 @@ func (c *GlobalOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`. ", - // "flatPath": "projects/{project}/global/operations/{operation}/wait", - // "httpMethod": "POST", - // "id": "compute.globalOperations.wait", + // "description": "Deletes the specified HealthCheck resource.", + // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", + // "httpMethod": "DELETE", + // "id": "compute.healthChecks.delete", // "parameterOrder": [ // "project", - // "operation" + // "healthCheck" // ], // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", + // "healthCheck": { + // "description": "Name of the HealthCheck resource to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -87667,235 +91430,284 @@ func (c *GlobalOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/global/operations/{operation}/wait", + // "path": "projects/{project}/global/healthChecks/{healthCheck}", // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.globalOrganizationOperations.delete": +// method id "compute.healthChecks.get": -type GlobalOrganizationOperationsDeleteCall struct { - s *Service - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HealthChecksGetCall struct { + s *Service + project string + healthCheck string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified Operations resource. +// Get: Returns the specified HealthCheck resource. // -// - operation: Name of the Operations resource to delete. -func (r *GlobalOrganizationOperationsService) Delete(operation string) *GlobalOrganizationOperationsDeleteCall { - c := &GlobalOrganizationOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this -// request. -func (c *GlobalOrganizationOperationsDeleteCall) ParentId(parentId string) *GlobalOrganizationOperationsDeleteCall { - c.urlParams_.Set("parentId", parentId) +// - healthCheck: Name of the HealthCheck resource to return. +// - project: Project ID for this request. +func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { + c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.healthCheck = healthCheck return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalOrganizationOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsDeleteCall { +func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalOrganizationOperationsDeleteCall) Context(ctx context.Context) *GlobalOrganizationOperationsDeleteCall { +func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalOrganizationOperationsDeleteCall) Header() http.Header { +func (c *HealthChecksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalOrganizationOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, 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, "locations/global/operations/{operation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") 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{ - "operation": c.operation, + "project": c.project, + "healthCheck": c.healthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalOrganizationOperations.delete" call. -func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "compute.healthChecks.get" call. +// Exactly one of *HealthCheck or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *HealthCheck.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &HealthCheck{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil // { - // "description": "Deletes the specified Operations resource.", - // "flatPath": "locations/global/operations/{operation}", - // "httpMethod": "DELETE", - // "id": "compute.globalOrganizationOperations.delete", + // "description": "Returns the specified HealthCheck resource.", + // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", + // "httpMethod": "GET", + // "id": "compute.healthChecks.get", // "parameterOrder": [ - // "operation" + // "project", + // "healthCheck" // ], // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to delete.", + // "healthCheck": { + // "description": "Name of the HealthCheck resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "parentId": { - // "description": "Parent ID for this request.", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // } // }, - // "path": "locations/global/operations/{operation}", + // "path": "projects/{project}/global/healthChecks/{healthCheck}", + // "response": { + // "$ref": "HealthCheck" + // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.globalOrganizationOperations.get": +// method id "compute.healthChecks.insert": -type GlobalOrganizationOperationsGetCall struct { - s *Service - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type HealthChecksInsertCall struct { + s *Service + project string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the specified Operations resource. Gets a list of -// operations by making a `list()` request. +// Insert: Creates a HealthCheck resource in the specified project using +// the data included in the request. // -// - operation: Name of the Operations resource to return. -func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { - c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation +// - project: Project ID for this request. +func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { + c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.healthcheck = healthcheck return c } -// ParentId sets the optional parameter "parentId": Parent ID for this -// request. -func (c *GlobalOrganizationOperationsGetCall) ParentId(parentId string) *GlobalOrganizationOperationsGetCall { - c.urlParams_.Set("parentId", parentId) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalOrganizationOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsGetCall { +func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalOrganizationOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalOrganizationOperationsGetCall) Context(ctx context.Context) *GlobalOrganizationOperationsGetCall { +func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalOrganizationOperationsGetCall) Header() http.Header { +func (c *HealthChecksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, 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.healthcheck) + 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, "locations/global/operations/{operation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks") 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{ - "operation": c.operation, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalOrganizationOperations.get" call. +// Do executes the "compute.healthChecks.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalOrganizationOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87926,54 +91738,60 @@ func (c *GlobalOrganizationOperationsGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.", - // "flatPath": "locations/global/operations/{operation}", - // "httpMethod": "GET", - // "id": "compute.globalOrganizationOperations.get", + // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/healthChecks", + // "httpMethod": "POST", + // "id": "compute.healthChecks.insert", // "parameterOrder": [ - // "operation" + // "project" // ], // "parameters": { - // "operation": { - // "description": "Name of the Operations resource to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "parentId": { - // "description": "Parent ID for this request.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "locations/global/operations/{operation}", + // "path": "projects/{project}/global/healthChecks", + // "request": { + // "$ref": "HealthCheck" + // }, // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.globalOrganizationOperations.list": +// method id "compute.healthChecks.list": -type GlobalOrganizationOperationsListCall struct { +type HealthChecksListCall struct { s *Service + project string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of Operation resources contained within the -// specified organization. -func (r *GlobalOrganizationOperationsService) List() *GlobalOrganizationOperationsListCall { - c := &GlobalOrganizationOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Retrieves the list of HealthCheck resources available to the +// specified project. +// +// - project: Project ID for this request. +func (r *HealthChecksService) List(project string) *HealthChecksListCall { + c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project return c } @@ -88012,7 +91830,7 @@ func (r *GlobalOrganizationOperationsService) List() *GlobalOrganizationOperatio // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *GlobalOrganizationOperationsListCall) Filter(filter string) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall { c.urlParams_.Set("filter", filter) return c } @@ -88023,7 +91841,7 @@ func (c *GlobalOrganizationOperationsListCall) Filter(filter string) *GlobalOrga // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *GlobalOrganizationOperationsListCall) MaxResults(maxResults int64) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -88037,7 +91855,7 @@ func (c *GlobalOrganizationOperationsListCall) MaxResults(maxResults int64) *Glo // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *GlobalOrganizationOperationsListCall) OrderBy(orderBy string) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -88045,23 +91863,16 @@ func (c *GlobalOrganizationOperationsListCall) OrderBy(orderBy string) *GlobalOr // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *GlobalOrganizationOperationsListCall) PageToken(pageToken string) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ParentId sets the optional parameter "parentId": Parent ID for this -// request. -func (c *GlobalOrganizationOperationsListCall) ParentId(parentId string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - // ReturnPartialSuccess sets the optional parameter // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *GlobalOrganizationOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -88069,7 +91880,7 @@ func (c *GlobalOrganizationOperationsListCall) ReturnPartialSuccess(returnPartia // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalOrganizationOperationsListCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -88079,7 +91890,7 @@ func (c *GlobalOrganizationOperationsListCall) Fields(s ...googleapi.Field) *Glo // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalOrganizationOperationsListCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall { c.ifNoneMatch_ = entityTag return c } @@ -88087,21 +91898,21 @@ func (c *GlobalOrganizationOperationsListCall) IfNoneMatch(entityTag string) *Gl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalOrganizationOperationsListCall) Context(ctx context.Context) *GlobalOrganizationOperationsListCall { +func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalOrganizationOperationsListCall) Header() http.Header { +func (c *HealthChecksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalOrganizationOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -88114,24 +91925,27 @@ func (c *GlobalOrganizationOperationsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks") 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{ + "project": c.project, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalOrganizationOperations.list" call. -// Exactly one of *OperationList or error will be non-nil. Any non-2xx +// Do executes the "compute.healthChecks.list" call. +// Exactly one of *HealthCheckList or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *OperationList.ServerResponse.Header or (if a response was returned +// *HealthCheckList.ServerResponse.Header or (if a response was returned // at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) { +func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88150,7 +91964,7 @@ func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OperationList{ + ret := &HealthCheckList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88162,10 +91976,13 @@ func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified organization.", - // "flatPath": "locations/global/operations", + // "description": "Retrieves the list of HealthCheck resources available to the specified project.", + // "flatPath": "projects/{project}/global/healthChecks", // "httpMethod": "GET", - // "id": "compute.globalOrganizationOperations.list", + // "id": "compute.healthChecks.list", + // "parameterOrder": [ + // "project" + // ], // "parameters": { // "filter": { // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", @@ -88190,9 +92007,11 @@ func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) // "location": "query", // "type": "string" // }, - // "parentId": { - // "description": "Parent ID for this request.", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // }, // "returnPartialSuccess": { @@ -88201,9 +92020,9 @@ func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) // "type": "boolean" // } // }, - // "path": "locations/global/operations", + // "path": "projects/{project}/global/healthChecks", // "response": { - // "$ref": "OperationList" + // "$ref": "HealthCheckList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -88217,7 +92036,7 @@ func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *GlobalOrganizationOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { +func (c *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -88235,26 +92054,29 @@ func (c *GlobalOrganizationOperationsListCall) Pages(ctx context.Context, f func } } -// method id "compute.globalPublicDelegatedPrefixes.delete": +// method id "compute.healthChecks.patch": -type GlobalPublicDelegatedPrefixesDeleteCall struct { - s *Service - project string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HealthChecksPatchCall struct { + s *Service + project string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified global PublicDelegatedPrefix. +// Patch: Updates a HealthCheck resource in the specified project using +// the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. // -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource -// to delete. -func (r *GlobalPublicDelegatedPrefixesService) Delete(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesDeleteCall { - c := &GlobalPublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheck: Name of the HealthCheck resource to patch. +// - project: Project ID for this request. +func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { + c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix + c.healthCheck = healthCheck + c.healthcheck = healthcheck return c } @@ -88269,7 +92091,7 @@ func (r *GlobalPublicDelegatedPrefixesService) Delete(project string, publicDele // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalPublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesDeleteCall { +func (c *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -88277,7 +92099,7 @@ func (c *GlobalPublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *G // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesDeleteCall { +func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -88285,21 +92107,21 @@ func (c *GlobalPublicDelegatedPrefixesDeleteCall) 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 *GlobalPublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesDeleteCall { +func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Header() http.Header { +func (c *HealthChecksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalPublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -88307,30 +92129,35 @@ func (c *GlobalPublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, + "healthCheck": c.healthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalPublicDelegatedPrefixes.delete" call. +// Do executes the "compute.healthChecks.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88361,26 +92188,26 @@ func (c *GlobalPublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Deletes the specified global PublicDelegatedPrefix.", - // "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - // "httpMethod": "DELETE", - // "id": "compute.globalPublicDelegatedPrefixes.delete", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", + // "httpMethod": "PATCH", + // "id": "compute.healthChecks.patch", // "parameterOrder": [ // "project", - // "publicDelegatedPrefix" + // "healthCheck" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "healthCheck": { + // "description": "Name of the HealthCheck resource to patch.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "publicDelegatedPrefix": { - // "description": "Name of the PublicDelegatedPrefix resource to delete.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, @@ -88390,7 +92217,10 @@ func (c *GlobalPublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOptio // "type": "string" // } // }, - // "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "path": "projects/{project}/global/healthChecks/{healthCheck}", + // "request": { + // "$ref": "HealthCheck" + // }, // "response": { // "$ref": "Operation" // }, @@ -88402,100 +92232,93 @@ func (c *GlobalPublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOptio } -// method id "compute.globalPublicDelegatedPrefixes.get": +// method id "compute.healthChecks.testIamPermissions": -type GlobalPublicDelegatedPrefixesGetCall struct { - s *Service - project string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type HealthChecksTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified global PublicDelegatedPrefix resource. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource -// to return. -func (r *GlobalPublicDelegatedPrefixesService) Get(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesGetCall { - c := &GlobalPublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { + c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalPublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesGetCall { +func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HealthChecksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *GlobalPublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalPublicDelegatedPrefixesGetCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesGetCall { +func (c *HealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HealthChecksTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalPublicDelegatedPrefixesGetCall) Header() http.Header { +func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalPublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalPublicDelegatedPrefixes.get" call. -// Exactly one of *PublicDelegatedPrefix or error will be non-nil. Any +// Do executes the "compute.healthChecks.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefix.ServerResponse.Header or (if a response was +// *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { +func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88514,7 +92337,7 @@ func (c *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicDelegatedPrefix{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88526,13 +92349,13 @@ func (c *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns the specified global PublicDelegatedPrefix resource.", - // "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - // "httpMethod": "GET", - // "id": "compute.globalPublicDelegatedPrefixes.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.healthChecks.testIamPermissions", // "parameterOrder": [ // "project", - // "publicDelegatedPrefix" + // "resource" // ], // "parameters": { // "project": { @@ -88542,17 +92365,20 @@ func (c *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "publicDelegatedPrefix": { - // "description": "Name of the PublicDelegatedPrefix resource to return.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "path": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "PublicDelegatedPrefix" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -88563,25 +92389,28 @@ func (c *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) } -// method id "compute.globalPublicDelegatedPrefixes.insert": +// method id "compute.healthChecks.update": -type GlobalPublicDelegatedPrefixesInsertCall struct { - s *Service - project string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HealthChecksUpdateCall struct { + s *Service + project string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a global PublicDelegatedPrefix in the specified -// project using the parameters that are included in the request. +// Update: Updates a HealthCheck resource in the specified project using +// the data included in the request. // +// - healthCheck: Name of the HealthCheck resource to update. // - project: Project ID for this request. -func (r *GlobalPublicDelegatedPrefixesService) Insert(project string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesInsertCall { - c := &GlobalPublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { + c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicdelegatedprefix = publicdelegatedprefix + c.healthCheck = healthCheck + c.healthcheck = healthcheck return c } @@ -88596,7 +92425,7 @@ func (r *GlobalPublicDelegatedPrefixesService) Insert(project string, publicdele // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalPublicDelegatedPrefixesInsertCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesInsertCall { +func (c *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -88604,7 +92433,7 @@ func (c *GlobalPublicDelegatedPrefixesInsertCall) RequestId(requestId string) *G // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesInsertCall { +func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -88612,21 +92441,21 @@ func (c *GlobalPublicDelegatedPrefixesInsertCall) 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 *GlobalPublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesInsertCall { +func (c *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Header() http.Header { +func (c *HealthChecksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalPublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -88634,34 +92463,204 @@ func (c *GlobalPublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") 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{ - "project": c.project, + "project": c.project, + "healthCheck": c.healthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalPublicDelegatedPrefixes.insert" call. +// Do executes the "compute.healthChecks.update" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", + // "httpMethod": "PUT", + // "id": "compute.healthChecks.update", + // "parameterOrder": [ + // "project", + // "healthCheck" + // ], + // "parameters": { + // "healthCheck": { + // "description": "Name of the HealthCheck resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/healthChecks/{healthCheck}", + // "request": { + // "$ref": "HealthCheck" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.httpHealthChecks.delete": + +type HttpHealthChecksDeleteCall struct { + s *Service + project string + httpHealthCheck string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified HttpHealthCheck resource. +// +// - httpHealthCheck: Name of the HttpHealthCheck resource to delete. +// - project: Project ID for this request. +func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { + c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.httpHealthCheck = httpHealthCheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { + 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 *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *HttpHealthChecksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") + 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{ + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.httpHealthChecks.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88692,14 +92691,22 @@ func (c *GlobalPublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.", - // "flatPath": "projects/{project}/global/publicDelegatedPrefixes", - // "httpMethod": "POST", - // "id": "compute.globalPublicDelegatedPrefixes.insert", + // "description": "Deletes the specified HttpHealthCheck resource.", + // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + // "httpMethod": "DELETE", + // "id": "compute.httpHealthChecks.delete", // "parameterOrder": [ - // "project" + // "project", + // "httpHealthCheck" // ], // "parameters": { + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -88713,10 +92720,7 @@ func (c *GlobalPublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOptio // "type": "string" // } // }, - // "path": "projects/{project}/global/publicDelegatedPrefixes", - // "request": { - // "$ref": "PublicDelegatedPrefix" - // }, + // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", // "response": { // "$ref": "Operation" // }, @@ -88728,112 +92732,33 @@ func (c *GlobalPublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOptio } -// method id "compute.globalPublicDelegatedPrefixes.list": +// method id "compute.httpHealthChecks.get": -type GlobalPublicDelegatedPrefixesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type HttpHealthChecksGetCall struct { + s *Service + project string + httpHealthCheck string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists the global PublicDelegatedPrefixes for a project. +// Get: Returns the specified HttpHealthCheck resource. // +// - httpHealthCheck: Name of the HttpHealthCheck resource to return. // - project: Project ID for this request. -func (r *GlobalPublicDelegatedPrefixesService) List(project string) *GlobalPublicDelegatedPrefixesListCall { - c := &GlobalPublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { + c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *GlobalPublicDelegatedPrefixesListCall) Filter(filter string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *GlobalPublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *GlobalPublicDelegatedPrefixesListCall) OrderBy(orderBy string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *GlobalPublicDelegatedPrefixesListCall) PageToken(pageToken string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *GlobalPublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.httpHealthCheck = httpHealthCheck return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalPublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesListCall { +func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -88843,7 +92768,7 @@ func (c *GlobalPublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *Gl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *GlobalPublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesListCall { +func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -88851,21 +92776,21 @@ func (c *GlobalPublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *G // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalPublicDelegatedPrefixesListCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesListCall { +func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalPublicDelegatedPrefixesListCall) Header() http.Header { +func (c *HttpHealthChecksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalPublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -88878,7 +92803,7 @@ func (c *GlobalPublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -88886,19 +92811,20 @@ func (c *GlobalPublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalPublicDelegatedPrefixes.list" call. -// Exactly one of *PublicDelegatedPrefixList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.httpHealthChecks.get" call. +// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *HttpHealthCheck.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, error) { +func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88917,7 +92843,7 @@ func (c *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicDelegatedPrefixList{ + ret := &HttpHealthCheck{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88929,35 +92855,20 @@ func (c *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists the global PublicDelegatedPrefixes for a project.", - // "flatPath": "projects/{project}/global/publicDelegatedPrefixes", + // "description": "Returns the specified HttpHealthCheck resource.", + // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", // "httpMethod": "GET", - // "id": "compute.globalPublicDelegatedPrefixes.list", + // "id": "compute.httpHealthChecks.get", // "parameterOrder": [ - // "project" + // "project", + // "httpHealthCheck" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -88966,16 +92877,11 @@ func (c *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "projects/{project}/global/publicDelegatedPrefixes", + // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", // "response": { - // "$ref": "PublicDelegatedPrefixList" + // "$ref": "HttpHealthCheck" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -88986,51 +92892,25 @@ func (c *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *GlobalPublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) 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 "compute.globalPublicDelegatedPrefixes.patch": +// method id "compute.httpHealthChecks.insert": -type GlobalPublicDelegatedPrefixesPatchCall struct { - s *Service - project string - publicDelegatedPrefix string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HttpHealthChecksInsertCall struct { + s *Service + project string + httphealthcheck *HttpHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified global PublicDelegatedPrefix resource -// with the data included in the request. This method supports PATCH -// semantics and uses JSON merge patch format and processing rules. +// Insert: Creates a HttpHealthCheck resource in the specified project +// using the data included in the request. // -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource -// to patch. -func (r *GlobalPublicDelegatedPrefixesService) Patch(project string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesPatchCall { - c := &GlobalPublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { + c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix - c.publicdelegatedprefix = publicdelegatedprefix + c.httphealthcheck = httphealthcheck return c } @@ -89045,7 +92925,7 @@ func (r *GlobalPublicDelegatedPrefixesService) Patch(project string, publicDeleg // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *GlobalPublicDelegatedPrefixesPatchCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesPatchCall { +func (c *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -89053,7 +92933,7 @@ func (c *GlobalPublicDelegatedPrefixesPatchCall) RequestId(requestId string) *Gl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesPatchCall { +func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -89061,21 +92941,21 @@ func (c *GlobalPublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *G // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesPatchCall { +func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Header() http.Header { +func (c *HttpHealthChecksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *GlobalPublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -89083,35 +92963,34 @@ func (c *GlobalPublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") 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{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.globalPublicDelegatedPrefixes.patch" call. +// Do executes the "compute.httpHealthChecks.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89142,13 +93021,12 @@ func (c *GlobalPublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - // "httpMethod": "PATCH", - // "id": "compute.globalPublicDelegatedPrefixes.patch", + // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/httpHealthChecks", + // "httpMethod": "POST", + // "id": "compute.httpHealthChecks.insert", // "parameterOrder": [ - // "project", - // "publicDelegatedPrefix" + // "project" // ], // "parameters": { // "project": { @@ -89158,22 +93036,15 @@ func (c *GlobalPublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption // "required": true, // "type": "string" // }, - // "publicDelegatedPrefix": { - // "description": "Name of the PublicDelegatedPrefix resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "path": "projects/{project}/global/httpHealthChecks", // "request": { - // "$ref": "PublicDelegatedPrefix" + // "$ref": "HttpHealthCheck" // }, // "response": { // "$ref": "Operation" @@ -89186,9 +93057,9 @@ func (c *GlobalPublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption } -// method id "compute.healthChecks.aggregatedList": +// method id "compute.httpHealthChecks.list": -type HealthChecksAggregatedListCall struct { +type HttpHealthChecksListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -89197,12 +93068,12 @@ type HealthChecksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves the list of all HealthCheck resources, -// regional and global, available to the specified project. +// List: Retrieves the list of HttpHealthCheck resources available to +// the specified project. // -// - project: Name of the project scoping this request. -func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { - c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { + c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -89242,31 +93113,18 @@ func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggreg // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *HealthChecksAggregatedListCall) Filter(filter string) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *HealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *HealthChecksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -89280,7 +93138,7 @@ func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChe // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -89288,7 +93146,7 @@ func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAg // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -89297,7 +93155,7 @@ func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChec // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *HealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpHealthChecksListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -89305,7 +93163,7 @@ func (c *HealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSucce // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -89315,7 +93173,7 @@ func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChe // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall { c.ifNoneMatch_ = entityTag return c } @@ -89323,21 +93181,21 @@ func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthCh // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksAggregatedListCall) Context(ctx context.Context) *HealthChecksAggregatedListCall { +func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksAggregatedListCall) Header() http.Header { +func (c *HttpHealthChecksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -89350,7 +93208,7 @@ func (c *HealthChecksAggregatedListCall) 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, "projects/{project}/aggregated/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -89363,14 +93221,14 @@ func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.aggregatedList" call. -// Exactly one of *HealthChecksAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *HealthChecksAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.httpHealthChecks.list" call. +// Exactly one of *HttpHealthCheckList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HttpHealthCheckList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthChecksAggregatedList, error) { +func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89389,7 +93247,7 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthChecksAggregatedList{ + ret := &HttpHealthCheckList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89401,10 +93259,10 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal } return ret, nil // { - // "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", - // "flatPath": "projects/{project}/aggregated/healthChecks", + // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + // "flatPath": "projects/{project}/global/httpHealthChecks", // "httpMethod": "GET", - // "id": "compute.healthChecks.aggregatedList", + // "id": "compute.httpHealthChecks.list", // "parameterOrder": [ // "project" // ], @@ -89414,11 +93272,6 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -89438,7 +93291,7 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal // "type": "string" // }, // "project": { - // "description": "Name of the project scoping this request.", + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -89450,9 +93303,9 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/healthChecks", + // "path": "projects/{project}/global/httpHealthChecks", // "response": { - // "$ref": "HealthChecksAggregatedList" + // "$ref": "HttpHealthCheckList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -89466,7 +93319,7 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal // 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 *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*HealthChecksAggregatedList) error) error { +func (c *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -89484,25 +93337,29 @@ func (c *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*Heal } } -// method id "compute.healthChecks.delete": +// method id "compute.httpHealthChecks.patch": -type HealthChecksDeleteCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HttpHealthChecksPatchCall struct { + s *Service + project string + httpHealthCheck string + httphealthcheck *HttpHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Patch: Updates a HttpHealthCheck resource in the specified project +// using the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. // -// - healthCheck: Name of the HealthCheck resource to delete. +// - httpHealthCheck: Name of the HttpHealthCheck resource to patch. // - project: Project ID for this request. -func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { - c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { + c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.healthCheck = healthCheck + c.httpHealthCheck = httpHealthCheck + c.httphealthcheck = httphealthcheck return c } @@ -89517,7 +93374,7 @@ func (r *HealthChecksService) Delete(project string, healthCheck string) *Health // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { +func (c *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -89525,7 +93382,7 @@ func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDelete // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { +func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -89533,21 +93390,21 @@ func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDelet // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { +func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksDeleteCall) Header() http.Header { +func (c *HttpHealthChecksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -89555,30 +93412,35 @@ func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.delete" call. +// Do executes the "compute.httpHealthChecks.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89609,17 +93471,17 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Deletes the specified HealthCheck resource.", - // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - // "httpMethod": "DELETE", - // "id": "compute.healthChecks.delete", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + // "httpMethod": "PATCH", + // "id": "compute.httpHealthChecks.patch", // "parameterOrder": [ // "project", - // "healthCheck" + // "httpHealthCheck" // ], // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to delete.", + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -89638,7 +93500,10 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e // "type": "string" // } // }, - // "path": "projects/{project}/global/healthChecks/{healthCheck}", + // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + // "request": { + // "$ref": "HttpHealthCheck" + // }, // "response": { // "$ref": "Operation" // }, @@ -89650,99 +93515,93 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e } -// method id "compute.healthChecks.get": +// method id "compute.httpHealthChecks.testIamPermissions": -type HealthChecksGetCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type HttpHealthChecksTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified HealthCheck resource. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - healthCheck: Name of the HealthCheck resource to return. // - project: Project ID for this request. -func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { - c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { + c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.healthCheck = healthCheck + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { +func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { +func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksGetCall) Header() http.Header { +func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.get" call. -// Exactly one of *HealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HealthCheck.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { +// Do executes the "compute.httpHealthChecks.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89761,7 +93620,7 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheck{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89773,33 +93632,36 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er } return ret, nil // { - // "description": "Returns the specified HealthCheck resource.", - // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - // "httpMethod": "GET", - // "id": "compute.healthChecks.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.httpHealthChecks.testIamPermissions", // "parameterOrder": [ // "project", - // "healthCheck" + // "resource" // ], // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/healthChecks/{healthCheck}", + // "path": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "HealthCheck" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -89810,25 +93672,28 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er } -// method id "compute.healthChecks.insert": +// method id "compute.httpHealthChecks.update": -type HealthChecksInsertCall struct { - s *Service - project string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HttpHealthChecksUpdateCall struct { + s *Service + project string + httpHealthCheck string + httphealthcheck *HttpHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. +// Update: Updates a HttpHealthCheck resource in the specified project +// using the data included in the request. // +// - httpHealthCheck: Name of the HttpHealthCheck resource to update. // - project: Project ID for this request. -func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { - c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { + c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.healthcheck = healthcheck + c.httpHealthCheck = httpHealthCheck + c.httphealthcheck = httphealthcheck return c } @@ -89843,7 +93708,7 @@ func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) * // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall { +func (c *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -89851,7 +93716,7 @@ func (c *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsert // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall { +func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -89859,21 +93724,21 @@ func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInser // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall { +func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksInsertCall) Header() http.Header { +func (c *HttpHealthChecksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -89881,34 +93746,35 @@ func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") 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{ - "project": c.project, + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.insert" call. +// Do executes the "compute.httpHealthChecks.update" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89939,14 +93805,22 @@ func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/healthChecks", - // "httpMethod": "POST", - // "id": "compute.healthChecks.insert", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + // "httpMethod": "PUT", + // "id": "compute.httpHealthChecks.update", // "parameterOrder": [ - // "project" + // "project", + // "httpHealthCheck" // ], // "parameters": { + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -89960,9 +93834,9 @@ func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e // "type": "string" // } // }, - // "path": "projects/{project}/global/healthChecks", + // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", // "request": { - // "$ref": "HealthCheck" + // "$ref": "HttpHealthCheck" // }, // "response": { // "$ref": "Operation" @@ -89975,178 +93849,101 @@ func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e } -// method id "compute.healthChecks.list": +// method id "compute.httpsHealthChecks.delete": -type HealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type HttpsHealthChecksDeleteCall struct { + s *Service + project string + httpsHealthCheck string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of HealthCheck resources available to the -// specified project. +// Delete: Deletes the specified HttpsHealthCheck resource. // +// - httpsHealthCheck: Name of the HttpsHealthCheck resource to delete. // - project: Project ID for this request. -func (r *HealthChecksService) List(project string) *HealthChecksListCall { - c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { + c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.httpsHealthCheck = httpsHealthCheck return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *HealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall { +func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall { +func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksListCall) Header() http.Header { +func (c *HttpsHealthChecksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") 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{ - "project": c.project, + "project": c.project, + "httpsHealthCheck": c.httpsHealthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.list" call. -// Exactly one of *HealthCheckList or error will be non-nil. Any non-2xx +// Do executes the "compute.httpsHealthChecks.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *HealthCheckList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90165,7 +93962,7 @@ func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckLis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90177,35 +93974,20 @@ func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckLis } return ret, nil // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", - // "flatPath": "projects/{project}/global/healthChecks", - // "httpMethod": "GET", - // "id": "compute.healthChecks.list", + // "description": "Deletes the specified HttpsHealthCheck resource.", + // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "httpMethod": "DELETE", + // "id": "compute.httpsHealthChecks.delete", // "parameterOrder": [ - // "project" + // "project", + // "httpsHealthCheck" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "httpsHealthCheck": { + // "description": "Name of the HttpsHealthCheck resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -90215,150 +93997,117 @@ func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckLis // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/global/healthChecks", + // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", // "response": { - // "$ref": "HealthCheckList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) 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 "compute.healthChecks.patch": +// method id "compute.httpsHealthChecks.get": -type HealthChecksPatchCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HttpsHealthChecksGetCall struct { + s *Service + project string + httpsHealthCheck string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a HealthCheck resource in the specified project using -// the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. +// Get: Returns the specified HttpsHealthCheck resource. // -// - healthCheck: Name of the HealthCheck resource to patch. +// - httpsHealthCheck: Name of the HttpsHealthCheck resource to return. // - project: Project ID for this request. -func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { - c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { + c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall { - c.urlParams_.Set("requestId", requestId) + c.httpsHealthCheck = httpsHealthCheck return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall { +func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall { +func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksPatchCall) Header() http.Header { +func (c *HttpsHealthChecksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, 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.healthcheck) - 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, "projects/{project}/global/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "healthCheck": c.healthCheck, + "project": c.project, + "httpsHealthCheck": c.httpsHealthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.httpsHealthChecks.get" call. +// Exactly one of *HttpsHealthCheck or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HttpsHealthCheck.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90377,7 +94126,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &HttpsHealthCheck{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90389,17 +94138,17 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - // "httpMethod": "PATCH", - // "id": "compute.healthChecks.patch", + // "description": "Returns the specified HttpsHealthCheck resource.", + // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "httpMethod": "GET", + // "id": "compute.httpsHealthChecks.get", // "parameterOrder": [ // "project", - // "healthCheck" + // "httpsHealthCheck" // ], // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to patch.", + // "httpsHealthCheck": { + // "description": "Name of the HttpsHealthCheck resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -90411,57 +94160,63 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, + // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", // "response": { - // "$ref": "Operation" + // "$ref": "HttpsHealthCheck" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.healthChecks.testIamPermissions": +// method id "compute.httpsHealthChecks.insert": -type HealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HttpsHealthChecksInsertCall struct { + s *Service + project string + httpshealthcheck *HttpsHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Insert: Creates a HttpsHealthCheck resource in the specified project +// using the data included in the request. // // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { - c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { + c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.httpshealthcheck = httpshealthcheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HealthChecksTestIamPermissionsCall { +func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -90469,21 +94224,21 @@ func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *Healt // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HealthChecksTestIamPermissionsCall { +func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { +func (c *HttpsHealthChecksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -90491,14 +94246,14 @@ func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -90506,20 +94261,19 @@ func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.httpsHealthChecks.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90538,7 +94292,7 @@ func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90550,13 +94304,12 @@ func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", + // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/httpsHealthChecks", // "httpMethod": "POST", - // "id": "compute.healthChecks.testIamPermissions", + // "id": "compute.httpsHealthChecks.insert", // "parameterOrder": [ - // "project", - // "resource" + // "project" // ], // "parameters": { // "project": { @@ -90566,133 +94319,199 @@ func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", + // "path": "projects/{project}/global/httpsHealthChecks", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "HttpsHealthCheck" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.healthChecks.update": +// method id "compute.httpsHealthChecks.list": -type HealthChecksUpdateCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HttpsHealthChecksListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. +// List: Retrieves the list of HttpsHealthCheck resources available to +// the specified project. // -// - healthCheck: Name of the HealthCheck resource to update. // - project: Project ID for this request. -func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { - c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { + c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *HttpsHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpsHealthChecksListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall { +func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall { +func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HealthChecksUpdateCall) Header() http.Header { +func (c *HttpsHealthChecksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, 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.healthcheck) - 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, "projects/{project}/global/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.healthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.httpsHealthChecks.list" call. +// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HttpsHealthCheckList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90711,7 +94530,7 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &HttpsHealthCheckList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90723,20 +94542,35 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - // "httpMethod": "PUT", - // "id": "compute.healthChecks.update", + // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + // "flatPath": "projects/{project}/global/httpsHealthChecks", + // "httpMethod": "GET", + // "id": "compute.httpsHealthChecks.list", // "parameterOrder": [ - // "project", - // "healthCheck" + // "project" // ], // "parameters": { - // "healthCheck": { - // "description": "Name of the HealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -90746,46 +94580,69 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/healthChecks/{healthCheck}", - // "request": { - // "$ref": "HealthCheck" - // }, + // "path": "projects/{project}/global/httpsHealthChecks", // "response": { - // "$ref": "Operation" + // "$ref": "HttpsHealthCheckList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.httpHealthChecks.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) 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 HttpHealthChecksDeleteCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.httpsHealthChecks.patch": + +type HttpsHealthChecksPatchCall struct { + s *Service + project string + httpsHealthCheck string + httpshealthcheck *HttpsHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified HttpHealthCheck resource. +// Patch: Updates a HttpsHealthCheck resource in the specified project +// using the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. // -// - httpHealthCheck: Name of the HttpHealthCheck resource to delete. +// - httpsHealthCheck: Name of the HttpsHealthCheck resource to patch. // - project: Project ID for this request. -func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { - c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { + c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpHealthCheck = httpHealthCheck + c.httpsHealthCheck = httpsHealthCheck + c.httpshealthcheck = httpshealthcheck return c } @@ -90800,7 +94657,7 @@ func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall { +func (c *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -90808,7 +94665,7 @@ func (c *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { +func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -90816,21 +94673,21 @@ func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChe // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall { +func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpHealthChecksDeleteCall) Header() http.Header { +func (c *HttpsHealthChecksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -90838,30 +94695,35 @@ func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, + "project": c.project, + "httpsHealthCheck": c.httpsHealthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpHealthChecks.delete" call. +// Do executes the "compute.httpsHealthChecks.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90892,17 +94754,17 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified HttpHealthCheck resource.", - // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - // "httpMethod": "DELETE", - // "id": "compute.httpHealthChecks.delete", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "httpMethod": "PATCH", + // "id": "compute.httpsHealthChecks.patch", // "parameterOrder": [ // "project", - // "httpHealthCheck" + // "httpsHealthCheck" // ], // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to delete.", + // "httpsHealthCheck": { + // "description": "Name of the HttpsHealthCheck resource to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -90921,7 +94783,10 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // } // }, - // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "request": { + // "$ref": "HttpsHealthCheck" + // }, // "response": { // "$ref": "Operation" // }, @@ -90933,99 +94798,93 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } -// method id "compute.httpHealthChecks.get": +// method id "compute.httpsHealthChecks.testIamPermissions": -type HttpHealthChecksGetCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type HttpsHealthChecksTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified HttpHealthCheck resource. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - httpHealthCheck: Name of the HttpHealthCheck resource to return. // - project: Project ID for this request. -func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { - c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { + c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpHealthCheck = httpHealthCheck + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { +func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall { +func (c *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpHealthChecksGetCall) Header() http.Header { +func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpHealthChecks.get" call. -// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *HttpHealthCheck.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.httpsHealthChecks.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) { +func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91044,7 +94903,7 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HttpHealthCheck{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -91056,33 +94915,36 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC } return ret, nil // { - // "description": "Returns the specified HttpHealthCheck resource.", - // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.httpsHealthChecks.testIamPermissions", // "parameterOrder": [ // "project", - // "httpHealthCheck" + // "resource" // ], // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + // "path": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "HttpHealthCheck" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -91093,25 +94955,28 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC } -// method id "compute.httpHealthChecks.insert": +// method id "compute.httpsHealthChecks.update": -type HttpHealthChecksInsertCall struct { - s *Service - project string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type HttpsHealthChecksUpdateCall struct { + s *Service + project string + httpsHealthCheck string + httpshealthcheck *HttpsHealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a HttpHealthCheck resource in the specified project +// Update: Updates a HttpsHealthCheck resource in the specified project // using the data included in the request. // +// - httpsHealthCheck: Name of the HttpsHealthCheck resource to update. // - project: Project ID for this request. -func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { - c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { + c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httphealthcheck = httphealthcheck + c.httpsHealthCheck = httpsHealthCheck + c.httpshealthcheck = httpshealthcheck return c } @@ -91126,7 +94991,7 @@ func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHe // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall { +func (c *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -91134,7 +94999,7 @@ func (c *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { +func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -91142,21 +95007,21 @@ func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChe // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall { +func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpHealthChecksInsertCall) Header() http.Header { +func (c *HttpsHealthChecksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -91164,34 +95029,35 @@ func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") 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{ - "project": c.project, + "project": c.project, + "httpsHealthCheck": c.httpsHealthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpHealthChecks.insert" call. +// Do executes the "compute.httpsHealthChecks.update" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91222,14 +95088,22 @@ func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/httpHealthChecks", - // "httpMethod": "POST", - // "id": "compute.httpHealthChecks.insert", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "httpMethod": "PUT", + // "id": "compute.httpsHealthChecks.update", // "parameterOrder": [ - // "project" + // "project", + // "httpsHealthCheck" // ], // "parameters": { + // "httpsHealthCheck": { + // "description": "Name of the HttpsHealthCheck resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -91243,9 +95117,9 @@ func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // } // }, - // "path": "projects/{project}/global/httpHealthChecks", + // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", // "request": { - // "$ref": "HttpHealthCheck" + // "$ref": "HttpsHealthCheck" // }, // "response": { // "$ref": "Operation" @@ -91258,113 +95132,37 @@ func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } -// method id "compute.httpHealthChecks.list": +// method id "compute.imageFamilyViews.get": -type HttpHealthChecksListCall struct { +type ImageFamilyViewsGetCall struct { s *Service project string + zone string + family string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of HttpHealthCheck resources available to -// the specified project. +// Get: Returns the latest image that is part of an image family, is not +// deprecated and is rolled out in the specified zone. // +// - family: Name of the image family to search for. // - project: Project ID for this request. -func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { - c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *ImageFamilyViewsService) Get(project string, zone string, family string) *ImageFamilyViewsGetCall { + c := &ImageFamilyViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *HttpHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.zone = zone + c.family = family return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { +func (c *ImageFamilyViewsGetCall) Fields(s ...googleapi.Field) *ImageFamilyViewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -91374,7 +95172,7 @@ func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthCheck // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall { +func (c *ImageFamilyViewsGetCall) IfNoneMatch(entityTag string) *ImageFamilyViewsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -91382,21 +95180,21 @@ func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChec // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall { +func (c *ImageFamilyViewsGetCall) Context(ctx context.Context) *ImageFamilyViewsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpHealthChecksListCall) Header() http.Header { +func (c *ImageFamilyViewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ImageFamilyViewsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -91409,7 +95207,7 @@ func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/imageFamilyViews/{family}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -91418,18 +95216,20 @@ func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, + "family": c.family, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpHealthChecks.list" call. -// Exactly one of *HttpHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.imageFamilyViews.get" call. +// Exactly one of *ImageFamilyView or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImageFamilyView.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) { +func (c *ImageFamilyViewsGetCall) Do(opts ...googleapi.CallOption) (*ImageFamilyView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91448,7 +95248,7 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HttpHealthCheckList{ + ret := &ImageFamilyView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -91460,35 +95260,21 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth } return ret, nil // { - // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", - // "flatPath": "projects/{project}/global/httpHealthChecks", + // "description": "Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", // "httpMethod": "GET", - // "id": "compute.httpHealthChecks.list", + // "id": "compute.imageFamilyViews.get", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "family" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "family": { + // "description": "Name of the image family to search for.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -91498,15 +95284,17 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/httpHealthChecks", + // "path": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", // "response": { - // "$ref": "HttpHealthCheckList" + // "$ref": "ImageFamilyView" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -91517,50 +95305,25 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth } -// 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 *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) 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 "compute.httpHealthChecks.patch": +// method id "compute.images.delete": -type HttpHealthChecksPatchCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ImagesDeleteCall struct { + s *Service + project string + image string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. +// Delete: Deletes the specified image. // -// - httpHealthCheck: Name of the HttpHealthCheck resource to patch. +// - image: Name of the image resource to delete. // - project: Project ID for this request. -func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { - c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { + c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck + c.image = image return c } @@ -91575,7 +95338,7 @@ func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall { +func (c *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -91583,7 +95346,7 @@ func (c *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthCheck // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { +func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -91591,21 +95354,21 @@ func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChec // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall { +func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpHealthChecksPatchCall) Header() http.Header { +func (c *ImagesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -91613,35 +95376,30 @@ func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, + "project": c.project, + "image": c.image, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpHealthChecks.patch" call. +// Do executes the "compute.images.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91672,17 +95430,17 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - // "httpMethod": "PATCH", - // "id": "compute.httpHealthChecks.patch", + // "description": "Deletes the specified image.", + // "flatPath": "projects/{project}/global/images/{image}", + // "httpMethod": "DELETE", + // "id": "compute.images.delete", // "parameterOrder": [ // "project", - // "httpHealthCheck" + // "image" // ], // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to patch.", + // "image": { + // "description": "Name of the image resource to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -91701,10 +95459,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation // "type": "string" // } // }, - // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, + // "path": "projects/{project}/global/images/{image}", // "response": { // "$ref": "Operation" // }, @@ -91716,35 +95471,51 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.httpHealthChecks.testIamPermissions": +// method id "compute.images.deprecate": -type HttpHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ImagesDeprecateCall struct { + s *Service + project string + image string + deprecationstatus *DeprecationStatus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Deprecate: Sets the deprecation status of an image. If an empty +// request body is given, clears the deprecation status instead. // +// - image: Image name. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { - c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { + c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.image = image + c.deprecationstatus = deprecationstatus + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall { +func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -91752,21 +95523,21 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *H // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall { +func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { +func (c *ImagesDeprecateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -91774,14 +95545,14 @@ func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}/deprecate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -91789,20 +95560,20 @@ func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "image": c.image, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpHealthChecks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.images.deprecate" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91821,7 +95592,7 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -91833,15 +95604,22 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", + // "description": "Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.", + // "flatPath": "projects/{project}/global/images/{image}/deprecate", // "httpMethod": "POST", - // "id": "compute.httpHealthChecks.testIamPermissions", + // "id": "compute.images.deprecate", // "parameterOrder": [ // "project", - // "resource" + // "image" // ], // "parameters": { + // "image": { + // "description": "Image name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -91849,133 +95627,120 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", + // "path": "projects/{project}/global/images/{image}/deprecate", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "DeprecationStatus" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.httpHealthChecks.update": +// method id "compute.images.get": -type HttpHealthChecksUpdateCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ImagesGetCall struct { + s *Service + project string + image string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. +// Get: Returns the specified image. // -// - httpHealthCheck: Name of the HttpHealthCheck resource to update. +// - image: Name of the image resource to return. // - project: Project ID for this request. -func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { - c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ImagesService) Get(project string, image string) *ImagesGetCall { + c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) + c.image = image return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { +func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall { +func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpHealthChecksUpdateCall) Header() http.Header { +func (c *ImagesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesGetCall) doRequest(alt string) (*http.Response, 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.httphealthcheck) - 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, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, + "project": c.project, + "image": c.image, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.images.get" call. +// Exactly one of *Image or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Image.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91994,7 +95759,7 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Image{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -92006,17 +95771,17 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - // "httpMethod": "PUT", - // "id": "compute.httpHealthChecks.update", + // "description": "Returns the specified image.", + // "flatPath": "projects/{project}/global/images/{image}", + // "httpMethod": "GET", + // "id": "compute.images.get", // "parameterOrder": [ // "project", - // "httpHealthCheck" + // "image" // ], // "parameters": { - // "httpHealthCheck": { - // "description": "Name of the HttpHealthCheck resource to update.", + // "image": { + // "description": "Name of the image resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -92028,123 +95793,117 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - // "request": { - // "$ref": "HttpHealthCheck" - // }, + // "path": "projects/{project}/global/images/{image}", // "response": { - // "$ref": "Operation" + // "$ref": "Image" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.httpsHealthChecks.delete": +// method id "compute.images.getFromFamily": -type HttpsHealthChecksDeleteCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ImagesGetFromFamilyCall struct { + s *Service + project string + family string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified HttpsHealthCheck resource. +// GetFromFamily: Returns the latest image that is part of an image +// family and is not deprecated. For more information on image families, +// see Public image families documentation. // -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to delete. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { - c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - family: Name of the image family to search for. +// - project: The image project that the image belongs to. For example, +// to get a CentOS image, specify centos-cloud as the image project. +func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { + c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.family = family return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall { +func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall { +func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpsHealthChecksDeleteCall) Header() http.Header { +func (c *ImagesGetFromFamilyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/family/{family}") 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{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, + "project": c.project, + "family": c.family, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpsHealthChecks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.images.getFromFamily" call. +// Exactly one of *Image or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Image.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -92163,7 +95922,7 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Image{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -92175,74 +95934,78 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified HttpsHealthCheck resource.", - // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "httpMethod": "DELETE", - // "id": "compute.httpsHealthChecks.delete", + // "description": "Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.", + // "flatPath": "projects/{project}/global/images/family/{family}", + // "httpMethod": "GET", + // "id": "compute.images.getFromFamily", // "parameterOrder": [ // "project", - // "httpsHealthCheck" + // "family" // ], // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to delete.", + // "family": { + // "description": "Name of the image family to search for.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", + // "description": "The image project that the image belongs to. For example, to get a CentOS image, specify centos-cloud as the image project.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "path": "projects/{project}/global/images/family/{family}", // "response": { - // "$ref": "Operation" + // "$ref": "Image" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.httpsHealthChecks.get": +// method id "compute.images.getIamPolicy": -type HttpsHealthChecksGetCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ImagesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified HttpsHealthCheck resource. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to return. // - project: Project ID for this request. -func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { - c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { + c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpsHealthCheck = httpsHealthCheck + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ImagesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall { +func (c *ImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -92252,7 +96015,7 @@ func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChec // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall { +func (c *ImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *ImagesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -92260,21 +96023,21 @@ func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChe // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall { +func (c *ImagesGetIamPolicyCall) Context(ctx context.Context) *ImagesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpsHealthChecksGetCall) Header() http.Header { +func (c *ImagesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -92287,7 +96050,7 @@ func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -92295,20 +96058,20 @@ func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpsHealthChecks.get" call. -// Exactly one of *HttpsHealthCheck or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheck.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) { +// Do executes the "compute.images.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -92327,7 +96090,7 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HttpsHealthCheck{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -92339,21 +96102,20 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt } return ret, nil // { - // "description": "Returns the specified HttpsHealthCheck resource.", - // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/global/images/{resource}/getIamPolicy", // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.get", + // "id": "compute.images.getIamPolicy", // "parameterOrder": [ // "project", - // "httpsHealthCheck" + // "resource" // ], // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, // "project": { // "description": "Project ID for this request.", @@ -92361,11 +96123,18 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "path": "projects/{project}/global/images/{resource}/getIamPolicy", // "response": { - // "$ref": "HttpsHealthCheck" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -92376,25 +96145,32 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt } -// method id "compute.httpsHealthChecks.insert": +// method id "compute.images.insert": -type HttpsHealthChecksInsertCall struct { - s *Service - project string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ImagesInsertCall struct { + s *Service + project string + image *Image + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// Insert: Creates an image in the specified project using the data +// included in the request. // // - project: Project ID for this request. -func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { - c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { + c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpshealthcheck = httpshealthcheck + c.image = image + return c +} + +// ForceCreate sets the optional parameter "forceCreate": Force image +// creation if true. +func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { + c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) return c } @@ -92409,7 +96185,7 @@ func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *Http // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall { +func (c *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -92417,7 +96193,7 @@ func (c *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthCh // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall { +func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -92425,21 +96201,21 @@ func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall { +func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpsHealthChecksInsertCall) Header() http.Header { +func (c *ImagesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -92447,14 +96223,14 @@ func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.image) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -92467,14 +96243,14 @@ func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpsHealthChecks.insert" call. +// Do executes the "compute.images.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -92505,14 +96281,19 @@ func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/httpsHealthChecks", + // "description": "Creates an image in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/images", // "httpMethod": "POST", - // "id": "compute.httpsHealthChecks.insert", + // "id": "compute.images.insert", // "parameterOrder": [ // "project" // ], // "parameters": { + // "forceCreate": { + // "description": "Force image creation if true.", + // "location": "query", + // "type": "boolean" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -92526,24 +96307,27 @@ func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "type": "string" // } // }, - // "path": "projects/{project}/global/httpsHealthChecks", + // "path": "projects/{project}/global/images", // "request": { - // "$ref": "HttpsHealthCheck" + // "$ref": "Image" // }, // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/devstorage.full_control", + // "https://www.googleapis.com/auth/devstorage.read_only", + // "https://www.googleapis.com/auth/devstorage.read_write" // ] // } } -// method id "compute.httpsHealthChecks.list": +// method id "compute.images.list": -type HttpsHealthChecksListCall struct { +type ImagesListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -92552,12 +96336,17 @@ type HttpsHealthChecksListCall struct { header_ http.Header } -// List: Retrieves the list of HttpsHealthCheck resources available to -// the specified project. +// List: Retrieves the list of custom images available to the specified +// project. Custom images are images you create that belong to your +// project. This method does not get any images that belong to other +// projects, including publicly-available images, like Debian 8. If you +// want to get a list of publicly-available images, use this method to +// make a request to the respective image project, such as debian-cloud +// or windows-cloud. // // - project: Project ID for this request. -func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { - c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ImagesService) List(project string) *ImagesListCall { + c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -92597,7 +96386,7 @@ func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCa // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { +func (c *ImagesListCall) Filter(filter string) *ImagesListCall { c.urlParams_.Set("filter", filter) return c } @@ -92608,7 +96397,7 @@ func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksList // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { +func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -92622,7 +96411,7 @@ func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChe // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall { +func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -92630,7 +96419,7 @@ func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksLi // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall { +func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -92639,7 +96428,7 @@ func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChec // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *HttpsHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpsHealthChecksListCall { +func (c *ImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ImagesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -92647,7 +96436,7 @@ func (c *HttpsHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall { +func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -92657,7 +96446,7 @@ func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChe // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall { +func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { c.ifNoneMatch_ = entityTag return c } @@ -92665,21 +96454,21 @@ func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthCh // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall { +func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpsHealthChecksListCall) Header() http.Header { +func (c *ImagesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -92692,7 +96481,7 @@ func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -92705,14 +96494,14 @@ func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpsHealthChecks.list" call. -// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheckList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) { +// Do executes the "compute.images.list" call. +// Exactly one of *ImageList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ImageList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -92731,7 +96520,7 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HttpsHealthCheckList{ + ret := &ImageList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -92743,10 +96532,10 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal } return ret, nil // { - // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", - // "flatPath": "projects/{project}/global/httpsHealthChecks", + // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + // "flatPath": "projects/{project}/global/images", // "httpMethod": "GET", - // "id": "compute.httpsHealthChecks.list", + // "id": "compute.images.list", // "parameterOrder": [ // "project" // ], @@ -92787,9 +96576,9 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal // "type": "boolean" // } // }, - // "path": "projects/{project}/global/httpsHealthChecks", + // "path": "projects/{project}/global/images", // "response": { - // "$ref": "HttpsHealthCheckList" + // "$ref": "ImageList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -92803,7 +96592,7 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal // 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 *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error { +func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -92821,29 +96610,29 @@ func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHeal } } -// method id "compute.httpsHealthChecks.patch": +// method id "compute.images.patch": -type HttpsHealthChecksPatchCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ImagesPatchCall struct { + s *Service + project string + image string + image2 *Image + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. +// Patch: Patches the specified image with the data included in the +// request. Only the following fields can be modified: family, +// description, deprecation status. // -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to patch. +// - image: Name of the image resource to patch. // - project: Project ID for this request. -func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { - c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ImagesService) Patch(project string, image string, image2 *Image) *ImagesPatchCall { + c := &ImagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck + c.image = image + c.image2 = image2 return c } @@ -92858,7 +96647,7 @@ func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall { +func (c *ImagesPatchCall) RequestId(requestId string) *ImagesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -92866,7 +96655,7 @@ func (c *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChe // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall { +func (c *ImagesPatchCall) Fields(s ...googleapi.Field) *ImagesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -92874,21 +96663,21 @@ func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthCh // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall { +func (c *ImagesPatchCall) Context(ctx context.Context) *ImagesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpsHealthChecksPatchCall) Header() http.Header { +func (c *ImagesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -92896,14 +96685,14 @@ func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.image2) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -92911,20 +96700,20 @@ func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, + "project": c.project, + "image": c.image, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpsHealthChecks.patch" call. +// Do executes the "compute.images.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ImagesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -92955,17 +96744,17 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "description": "Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.", + // "flatPath": "projects/{project}/global/images/{image}", // "httpMethod": "PATCH", - // "id": "compute.httpsHealthChecks.patch", + // "id": "compute.images.patch", // "parameterOrder": [ // "project", - // "httpsHealthCheck" + // "image" // ], // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to patch.", + // "image": { + // "description": "Name of the image resource to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -92984,9 +96773,9 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // } // }, - // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + // "path": "projects/{project}/global/images/{image}", // "request": { - // "$ref": "HttpsHealthCheck" + // "$ref": "Image" // }, // "response": { // "$ref": "Operation" @@ -92999,9 +96788,321 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } -// method id "compute.httpsHealthChecks.testIamPermissions": +// method id "compute.images.setIamPolicy": -type HttpsHealthChecksTestIamPermissionsCall struct { +type ImagesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall { + c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesSetIamPolicyCall { + 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 *ImagesSetIamPolicyCall) Context(ctx context.Context) *ImagesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ImagesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.globalsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.images.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/global/images/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.images.setIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/images/{resource}/setIamPolicy", + // "request": { + // "$ref": "GlobalSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.images.setLabels": + +type ImagesSetLabelsCall struct { + s *Service + project string + resource string + globalsetlabelsrequest *GlobalSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on an image. To learn more about labels, +// read the Labeling Resources documentation. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { + c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.globalsetlabelsrequest = globalsetlabelsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall { + 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 *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ImagesSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, 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.globalsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/setLabels") + 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{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.images.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/global/images/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.images.setLabels", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/images/{resource}/setLabels", + // "request": { + // "$ref": "GlobalSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.images.testIamPermissions": + +type ImagesTestIamPermissionsCall struct { s *Service project string resource string @@ -93016,8 +97117,8 @@ type HttpsHealthChecksTestIamPermissionsCall struct { // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { - c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { + c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.resource = resource c.testpermissionsrequest = testpermissionsrequest @@ -93027,7 +97128,7 @@ func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall { +func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -93035,21 +97136,21 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) 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 *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall { +func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { +func (c *ImagesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -93064,7 +97165,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.R reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -93078,14 +97179,203 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpsHealthChecks.testIamPermissions" call. +// Do executes the "compute.images.testIamPermissions" call. // Exactly one of *TestPermissionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/images/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.images.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/images/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instanceGroupManagers.abandonInstances": + +type InstanceGroupManagersAbandonInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AbandonInstances: Flags the specified instances to be removed from +// the managed instance group. Abandoning an instance does not delete +// the instance, but it does remove the instance from any target pools +// that are applied by the managed instance group. This method reduces +// the targetSize of the managed instance group by the number of +// instances that you abandon. This operation is marked as DONE when the +// action is scheduled even if the instances have not yet been removed +// from the group. You must separately verify the status of the +// abandoning action with the listmanagedinstances method. If the group +// is part of a backend service that has enabled connection draining, it +// can take up to 60 seconds after the connection draining duration has +// elapsed before the VM instance is removed or deleted. You can specify +// a maximum of 1000 instances with this method per request. +// +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. +func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { + c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + 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.instancegroupmanagersabandoninstancesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") + 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{ + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceGroupManagers.abandonInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -93104,7 +97394,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -93116,15 +97406,22 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", + // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", // "httpMethod": "POST", - // "id": "compute.httpsHealthChecks.testIamPermissions", + // "id": "compute.instanceGroupManagers.abandonInstances", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "instanceGroupManager" // ], // "parameters": { + // "instanceGroupManager": { + // "description": "The name of the managed instance group.", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -93132,133 +97429,219 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "InstanceGroupManagersAbandonInstancesRequest" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.httpsHealthChecks.update": +// method id "compute.instanceGroupManagers.aggregatedList": -type HttpsHealthChecksUpdateCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// AggregatedList: Retrieves the list of managed instance groups and +// groups them by zone. // -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to update. // - project: Project ID for this request. -func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { - c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { + c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *InstanceGroupManagersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupManagersAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstanceGroupManagersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall { +func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall { +func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *HttpsHealthChecksUpdateCall) Header() http.Header { +func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, 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.httpshealthcheck) - 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, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.httpsHealthChecks.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceGroupManagers.aggregatedList" call. +// Exactly one of *InstanceGroupManagerAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -93277,7 +97660,7 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroupManagerAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -93289,20 +97672,40 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "httpMethod": "PUT", - // "id": "compute.httpsHealthChecks.update", + // "description": "Retrieves the list of managed instance groups and groups them by zone.", + // "flatPath": "projects/{project}/aggregated/instanceGroupManagers", + // "httpMethod": "GET", + // "id": "compute.instanceGroupManagers.aggregatedList", // "parameterOrder": [ - // "project", - // "httpsHealthCheck" + // "project" // ], // "parameters": { - // "httpsHealthCheck": { - // "description": "Name of the HttpsHealthCheck resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -93312,125 +97715,140 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - // "request": { - // "$ref": "HttpsHealthCheck" - // }, + // "path": "projects/{project}/aggregated/instanceGroupManagers", // "response": { - // "$ref": "Operation" + // "$ref": "InstanceGroupManagerAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.imageFamilyViews.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 *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) 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 ImageFamilyViewsGetCall struct { - s *Service - project string - zone string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "compute.instanceGroupManagers.applyUpdatesToInstances": + +type InstanceGroupManagersApplyUpdatesToInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the latest image that is part of an image family, is not -// deprecated and is rolled out in the specified zone. +// ApplyUpdatesToInstances: Applies changes to selected instances on the +// managed instance group. This method can be used to apply new +// overrides and/or new versions. // -// - family: Name of the image family to search for. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *ImageFamilyViewsService) Get(project string, zone string, family string) *ImageFamilyViewsGetCall { - c := &ImageFamilyViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group, +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. Should conform to RFC1035. +func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { + c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.family = family + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersapplyupdatesrequest = instancegroupmanagersapplyupdatesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImageFamilyViewsGetCall) Fields(s ...googleapi.Field) *ImageFamilyViewsGetCall { +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersApplyUpdatesToInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImageFamilyViewsGetCall) IfNoneMatch(entityTag string) *ImageFamilyViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImageFamilyViewsGetCall) Context(ctx context.Context) *ImageFamilyViewsGetCall { +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *InstanceGroupManagersApplyUpdatesToInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImageFamilyViewsGetCall) Header() http.Header { +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImageFamilyViewsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagersapplyupdatesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/imageFamilyViews/{family}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") 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{ - "project": c.project, - "zone": c.zone, - "family": c.family, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.imageFamilyViews.get" call. -// Exactly one of *ImageFamilyView or error will be non-nil. Any non-2xx +// Do executes the "compute.instanceGroupManagers.applyUpdatesToInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *ImageFamilyView.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ImageFamilyViewsGetCall) Do(opts ...googleapi.CallOption) (*ImageFamilyView, error) { +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -93449,7 +97867,7 @@ func (c *ImageFamilyViewsGetCall) Do(opts ...googleapi.CallOption) (*ImageFamily if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ImageFamilyView{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -93461,20 +97879,19 @@ func (c *ImageFamilyViewsGetCall) Do(opts ...googleapi.CallOption) (*ImageFamily } return ret, nil // { - // "description": "Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.", - // "flatPath": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", - // "httpMethod": "GET", - // "id": "compute.imageFamilyViews.get", + // "description": "Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.applyUpdatesToInstances", // "parameterOrder": [ // "project", // "zone", - // "family" + // "instanceGroupManager" // ], // "parameters": { - // "family": { - // "description": "Name of the image family to search for.", + // "instanceGroupManager": { + // "description": "The name of the managed instance group, should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -93486,45 +97903,58 @@ func (c *ImageFamilyViewsGetCall) Do(opts ...googleapi.CallOption) (*ImageFamily // "type": "string" // }, // "zone": { - // "description": "The name of the zone for this request.", + // "description": "The name of the zone where the managed instance group is located. Should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + // "request": { + // "$ref": "InstanceGroupManagersApplyUpdatesRequest" + // }, // "response": { - // "$ref": "ImageFamilyView" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.images.delete": +// method id "compute.instanceGroupManagers.createInstances": -type ImagesDeleteCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersCreateInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified image. +// CreateInstances: Creates instances with per-instance configurations +// in this managed instance group. Instances are created using the +// current instance template. The create instances operation is marked +// DONE if the createInstances request is successful. The underlying +// actions take additional time. You must separately verify the status +// of the creating or actions with the listmanagedinstances method. // -// - image: Name of the image resource to delete. -// - project: Project ID for this request. -func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { - c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. It should conform to RFC1035. +func (r *InstanceGroupManagersService) CreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest) *InstanceGroupManagersCreateInstancesCall { + c := &InstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.image = image + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagerscreateinstancesrequest = instancegroupmanagerscreateinstancesrequest return c } @@ -93535,11 +97965,10 @@ func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { // situation where you make an initial request and the request times // out. If you make the request again with the same request ID, the // server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not +// received, and if so, will ignore the second request. The request ID +// must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { +func (c *InstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersCreateInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -93547,7 +97976,7 @@ func (c *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { +func (c *InstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersCreateInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -93555,21 +97984,21 @@ func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall { +func (c *InstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersCreateInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesDeleteCall) Header() http.Header { +func (c *InstanceGroupManagersCreateInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -93577,30 +98006,36 @@ func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerscreateinstancesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances") 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{ - "project": c.project, - "image": c.image, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.delete" call. +// Do executes the "compute.instanceGroupManagers.createInstances" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -93631,19 +98066,19 @@ func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified image.", - // "flatPath": "projects/{project}/global/images/{image}", - // "httpMethod": "DELETE", - // "id": "compute.images.delete", + // "description": "Creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.createInstances", // "parameterOrder": [ // "project", - // "image" + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "image": { - // "description": "Name of the image resource to delete.", + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -93655,12 +98090,21 @@ func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/images/{image}", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", + // "request": { + // "$ref": "InstanceGroupManagersCreateInstancesRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -93672,28 +98116,33 @@ func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } -// method id "compute.images.deprecate": +// method id "compute.instanceGroupManagers.delete": -type ImagesDeprecateCall struct { - s *Service - project string - image string - deprecationstatus *DeprecationStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersDeleteCall struct { + s *Service + project string + zone string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Deprecate: Sets the deprecation status of an image. If an empty -// request body is given, clears the deprecation status instead. +// Delete: Deletes the specified managed instance group and all of the +// instances in that group. Note that the instance group must not belong +// to a backend service. Read Deleting an instance group for more +// information. // -// - image: Image name. -// - project: Project ID for this request. -func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { - c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group to +// delete. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. +func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { + c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.image = image - c.deprecationstatus = deprecationstatus + c.zone = zone + c.instanceGroupManager = instanceGroupManager return c } @@ -93708,7 +98157,7 @@ func (r *ImagesService) Deprecate(project string, image string, deprecationstatu // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { +func (c *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -93716,7 +98165,7 @@ func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { +func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -93724,21 +98173,21 @@ func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall { +func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesDeprecateCall) Header() http.Header { +func (c *InstanceGroupManagersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -93746,35 +98195,31 @@ func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}/deprecate") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") 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{ - "project": c.project, - "image": c.image, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.deprecate" call. +// Do executes the "compute.instanceGroupManagers.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -93805,19 +98250,19 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.", - // "flatPath": "projects/{project}/global/images/{image}/deprecate", - // "httpMethod": "POST", - // "id": "compute.images.deprecate", + // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + // "httpMethod": "DELETE", + // "id": "compute.instanceGroupManagers.delete", // "parameterOrder": [ // "project", - // "image" + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "image": { - // "description": "Image name.", + // "instanceGroupManager": { + // "description": "The name of the managed instance group to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -93832,12 +98277,15 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located.", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/images/{image}/deprecate", - // "request": { - // "$ref": "DeprecationStatus" - // }, + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", // "response": { // "$ref": "Operation" // }, @@ -93849,99 +98297,124 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.images.get": +// method id "compute.instanceGroupManagers.deleteInstances": -type ImagesGetCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersDeleteInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified image. +// DeleteInstances: Flags the specified instances in the managed +// instance group for immediate deletion. The instances are also removed +// from any target pools of which they were a member. This method +// reduces the targetSize of the managed instance group by the number of +// instances that you delete. This operation is marked as DONE when the +// action is scheduled even if the instances are still being deleted. +// You must separately verify the status of the deleting action with the +// listmanagedinstances method. If the group is part of a backend +// service that has enabled connection draining, it can take up to 60 +// seconds after the connection draining duration has elapsed before the +// VM instance is removed or deleted. You can specify a maximum of 1000 +// instances with this method per request. // -// - image: Name of the image resource to return. -// - project: Project ID for this request. -func (r *ImagesService) Get(project string, image string) *ImagesGetCall { - c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. +func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { + c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.image = image + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { +func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall { +func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesGetCall) Header() http.Header { +func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagersdeleteinstancesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") 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{ - "project": c.project, - "image": c.image, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.get" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { +// Do executes the "compute.instanceGroupManagers.deleteInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -93960,7 +98433,7 @@ func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Image{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -93972,19 +98445,19 @@ func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { } return ret, nil // { - // "description": "Returns the specified image.", - // "flatPath": "projects/{project}/global/images/{image}", - // "httpMethod": "GET", - // "id": "compute.images.get", + // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.deleteInstances", // "parameterOrder": [ // "project", - // "image" + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "image": { - // "description": "Name of the image resource to return.", + // "instanceGroupManager": { + // "description": "The name of the managed instance group.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -93994,117 +98467,127 @@ func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located.", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/images/{image}", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", + // "request": { + // "$ref": "InstanceGroupManagersDeleteInstancesRequest" + // }, // "response": { - // "$ref": "Image" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.images.getFromFamily": +// method id "compute.instanceGroupManagers.deletePerInstanceConfigs": -type ImagesGetFromFamilyCall struct { - s *Service - project string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersDeletePerInstanceConfigsCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetFromFamily: Returns the latest image that is part of an image -// family and is not deprecated. For more information on image families, -// see Public image families documentation. +// DeletePerInstanceConfigs: Deletes selected per-instance +// configurations for the managed instance group. // -// - family: Name of the image family to search for. -// - project: The image project that the image belongs to. For example, -// to get a CentOS image, specify centos-cloud as the image project. -func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { - c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. It should conform to RFC1035. +func (r *InstanceGroupManagersService) DeletePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq) *InstanceGroupManagersDeletePerInstanceConfigsCall { + c := &InstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.family = family + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersdeleteperinstanceconfigsreq = instancegroupmanagersdeleteperinstanceconfigsreq return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { +func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeletePerInstanceConfigsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { +func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersDeletePerInstanceConfigsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesGetFromFamilyCall) Header() http.Header { +func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagersdeleteperinstanceconfigsreq) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/family/{family}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") 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{ - "project": c.project, - "family": c.family, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.getFromFamily" call. -// Exactly one of *Image or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Image.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, error) { +// Do executes the "compute.instanceGroupManagers.deletePerInstanceConfigs" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -94123,7 +98606,7 @@ func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Image{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -94135,78 +98618,83 @@ func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, erro } return ret, nil // { - // "description": "Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.", - // "flatPath": "projects/{project}/global/images/family/{family}", - // "httpMethod": "GET", - // "id": "compute.images.getFromFamily", + // "description": "Deletes selected per-instance configurations for the managed instance group.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", // "parameterOrder": [ // "project", - // "family" + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "family": { - // "description": "Name of the image family to search for.", + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "The image project that the image belongs to. For example, to get a CentOS image, specify centos-cloud as the image project.", + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/images/family/{family}", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", + // "request": { + // "$ref": "InstanceGroupManagersDeletePerInstanceConfigsReq" + // }, // "response": { - // "$ref": "Image" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.images.getIamPolicy": +// method id "compute.instanceGroupManagers.get": -type ImagesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersGetCall struct { + s *Service + project string + zone string + instanceGroupManager string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// Get: Returns all of the details about the specified managed instance +// group. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { - c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. +func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { + c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ImagesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.zone = zone + c.instanceGroupManager = instanceGroupManager return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesGetIamPolicyCall { +func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -94216,7 +98704,7 @@ func (c *ImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesGetIamPolic // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *ImagesGetIamPolicyCall { +func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { c.ifNoneMatch_ = entityTag return c } @@ -94224,21 +98712,21 @@ func (c *ImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *ImagesGetIamPoli // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesGetIamPolicyCall) Context(ctx context.Context) *ImagesGetIamPolicyCall { +func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesGetIamPolicyCall) Header() http.Header { +func (c *InstanceGroupManagersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -94251,7 +98739,7 @@ func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -94259,20 +98747,21 @@ func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.instanceGroupManagers.get" call. +// Exactly one of *InstanceGroupManager or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceGroupManager.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -94291,7 +98780,7 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &InstanceGroupManager{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -94303,20 +98792,21 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/global/images/{resource}/getIamPolicy", + // "description": "Returns all of the details about the specified managed instance group.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", // "httpMethod": "GET", - // "id": "compute.images.getIamPolicy", + // "id": "compute.instanceGroupManagers.get", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "instanceGroupManager": { + // "description": "The name of the managed instance group.", + // "location": "path", + // "required": true, + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -94325,17 +98815,16 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "The name of the zone where the managed instance group is located.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/images/{resource}/getIamPolicy", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", // "response": { - // "$ref": "Policy" + // "$ref": "InstanceGroupManager" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -94346,32 +98835,36 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } -// method id "compute.images.insert": +// method id "compute.instanceGroupManagers.insert": -type ImagesInsertCall struct { - s *Service - project string - image *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersInsertCall struct { + s *Service + project string + zone string + instancegroupmanager *InstanceGroupManager + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an image in the specified project using the data -// included in the request. +// Insert: Creates a managed instance group using the information that +// you specify in the request. After the group is created, instances in +// the group are created using the specified instance template. This +// operation is marked as DONE when the group is created even if the +// instances in the group have not yet been created. You must separately +// verify the status of the individual instances with the +// listmanagedinstances method. A managed instance group can have up to +// 1000 VM instances per group. Please contact Cloud Support if you need +// an increase in this limit. // -// - project: Project ID for this request. -func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { - c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone where you want to create the managed +// instance group. +func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { + c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.image = image - return c -} - -// ForceCreate sets the optional parameter "forceCreate": Force image -// creation if true. -func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { - c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) + c.zone = zone + c.instancegroupmanager = instancegroupmanager return c } @@ -94386,7 +98879,7 @@ func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { +func (c *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -94394,7 +98887,7 @@ func (c *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { +func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -94402,21 +98895,21 @@ func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall { +func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesInsertCall) Header() http.Header { +func (c *InstanceGroupManagersInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -94424,14 +98917,14 @@ func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.image) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -94440,18 +98933,19 @@ func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.insert" call. +// Do executes the "compute.instanceGroupManagers.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -94482,19 +98976,15 @@ func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates an image in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/images", + // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", // "httpMethod": "POST", - // "id": "compute.images.insert", + // "id": "compute.instanceGroupManagers.insert", // "parameterOrder": [ - // "project" + // "project", + // "zone" // ], // "parameters": { - // "forceCreate": { - // "description": "Force image creation if true.", - // "location": "query", - // "type": "boolean" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -94506,49 +98996,51 @@ func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where you want to create the managed instance group.", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/images", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers", // "request": { - // "$ref": "Image" + // "$ref": "InstanceGroupManager" // }, // "response": { // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/devstorage.full_control", - // "https://www.googleapis.com/auth/devstorage.read_only", - // "https://www.googleapis.com/auth/devstorage.read_write" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.images.list": +// method id "compute.instanceGroupManagers.list": -type ImagesListCall struct { +type InstanceGroupManagersListCall struct { s *Service project string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of custom images available to the specified -// project. Custom images are images you create that belong to your -// project. This method does not get any images that belong to other -// projects, including publicly-available images, like Debian 8. If you -// want to get a list of publicly-available images, use this method to -// make a request to the respective image project, such as debian-cloud -// or windows-cloud. +// List: Retrieves a list of managed instance groups that are contained +// within the specified project and zone. // -// - project: Project ID for this request. -func (r *ImagesService) List(project string) *ImagesListCall { - c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. +func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { + c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone return c } @@ -94587,7 +99079,7 @@ func (r *ImagesService) List(project string) *ImagesListCall { // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *ImagesListCall) Filter(filter string) *ImagesListCall { +func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { c.urlParams_.Set("filter", filter) return c } @@ -94598,7 +99090,7 @@ func (c *ImagesListCall) Filter(filter string) *ImagesListCall { // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { +func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -94612,7 +99104,7 @@ func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { +func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -94620,7 +99112,7 @@ func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { +func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -94629,7 +99121,7 @@ func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *ImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ImagesListCall { +func (c *InstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -94637,7 +99129,7 @@ func (c *ImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *Images // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { +func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -94647,7 +99139,7 @@ func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { +func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { c.ifNoneMatch_ = entityTag return c } @@ -94655,21 +99147,21 @@ func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall { +func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesListCall) Header() http.Header { +func (c *InstanceGroupManagersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -94682,7 +99174,7 @@ func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -94691,18 +99183,19 @@ func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.list" call. -// Exactly one of *ImageList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ImageList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { +// Do executes the "compute.instanceGroupManagers.list" call. +// Exactly one of *InstanceGroupManagerList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *InstanceGroupManagerList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -94721,7 +99214,7 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ImageList{ + ret := &InstanceGroupManagerList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -94733,12 +99226,13 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { } return ret, nil // { - // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", - // "flatPath": "projects/{project}/global/images", + // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", // "httpMethod": "GET", - // "id": "compute.images.list", + // "id": "compute.instanceGroupManagers.list", // "parameterOrder": [ - // "project" + // "project", + // "zone" // ], // "parameters": { // "filter": { @@ -94775,11 +99269,17 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located.", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/images", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers", // "response": { - // "$ref": "ImageList" + // "$ref": "InstanceGroupManagerList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -94793,7 +99293,7 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { // 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 *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error { +func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -94811,110 +99311,192 @@ func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) er } } -// method id "compute.images.patch": +// method id "compute.instanceGroupManagers.listErrors": -type ImagesPatchCall struct { - s *Service - project string - image string - image2 *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersListErrorsCall struct { + s *Service + project string + zone string + instanceGroupManager string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified image with the data included in the -// request. Only the following fields can be modified: family, -// description, deprecation status. +// ListErrors: Lists all errors thrown by actions on instances for a +// given managed instance group. The filter and orderBy query parameters +// are not supported. // -// - image: Name of the image resource to patch. -// - project: Project ID for this request. -func (r *ImagesService) Patch(project string, image string, image2 *Image) *ImagesPatchCall { - c := &ImagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It +// must be a string that meets the requirements in RFC1035, or an +// unsigned long integer: must match regexp pattern: (?:a-z +// (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. It should conform to RFC1035. +func (r *InstanceGroupManagersService) ListErrors(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListErrorsCall { + c := &InstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.image = image - c.image2 = image2 + c.zone = zone + c.instanceGroupManager = instanceGroupManager return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *ImagesPatchCall) RequestId(requestId string) *ImagesPatchCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstanceGroupManagersListErrorsCall) Filter(filter string) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstanceGroupManagersListErrorsCall) PageToken(pageToken string) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesPatchCall) Fields(s ...googleapi.Field) *ImagesPatchCall { +func (c *InstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListErrorsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListErrorsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesPatchCall) Context(ctx context.Context) *ImagesPatchCall { +func (c *InstanceGroupManagersListErrorsCall) Context(ctx context.Context) *InstanceGroupManagersListErrorsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesPatchCall) Header() http.Header { +func (c *InstanceGroupManagersListErrorsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, 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.image2) - 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, "projects/{project}/global/images/{image}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "image": c.image, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceGroupManagers.listErrors" call. +// Exactly one of *InstanceGroupManagersListErrorsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *InstanceGroupManagersListErrorsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListErrorsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -94933,7 +99515,7 @@ func (c *ImagesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroupManagersListErrorsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -94945,22 +99527,45 @@ func (c *ImagesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.", - // "flatPath": "projects/{project}/global/images/{image}", - // "httpMethod": "PATCH", - // "id": "compute.images.patch", + // "description": "Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", + // "httpMethod": "GET", + // "id": "compute.instanceGroupManagers.listErrors", // "parameterOrder": [ // "project", - // "image" + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "image": { - // "description": "Name of the image resource to patch.", + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -94968,212 +99573,172 @@ func (c *ImagesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "location": "path", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/images/{image}", - // "request": { - // "$ref": "Image" - // }, + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", // "response": { - // "$ref": "Operation" + // "$ref": "InstanceGroupManagersListErrorsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.images.setIamPolicy": +// 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 *InstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListErrorsResponse) 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 ImagesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instanceGroupManagers.listManagedInstances": + +type InstanceGroupManagersListManagedInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// ListManagedInstances: Lists all of the instances in the managed +// instance group. Each instance in the list has a currentAction, which +// indicates the action that the managed instance group is performing on +// the instance. For example, if the group is still creating an +// instance, the currentAction is CREATING. If a previous action failed, +// the list displays the errors for that failed action. The orderBy +// query parameter is not supported. The `pageToken` query parameter is +// supported only in the alpha and beta API and only if the group's +// `listManagedInstancesResults` field is set to `PAGINATED`. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall { - c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. +func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { + c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + c.zone = zone + c.instanceGroupManager = instanceGroupManager return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("filter", filter) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ImagesSetIamPolicyCall) Context(ctx context.Context) *ImagesSetIamPolicyCall { - c.ctx_ = ctx +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ImagesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.globalsetpolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/global/images/{resource}/setIamPolicy", - // "httpMethod": "POST", - // "id": "compute.images.setIamPolicy", - // "parameterOrder": [ - // "project", - // "resource" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/global/images/{resource}/setIamPolicy", - // "request": { - // "$ref": "GlobalSetPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// method id "compute.images.setLabels": - -type ImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// SetLabels: Sets the labels on an image. To learn more about labels, -// read the Labeling Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { - c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall { +func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -95181,21 +99746,21 @@ func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall { +func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesSetLabelsCall) Header() http.Header { +func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -95203,14 +99768,9 @@ func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -95218,20 +99778,23 @@ func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceGroupManagers.listManagedInstances" call. +// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *InstanceGroupManagersListManagedInstancesResponse.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 *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -95250,7 +99813,7 @@ func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroupManagersListManagedInstancesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -95262,15 +99825,45 @@ func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/global/images/{resource}/setLabels", + // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "httpMethod": "POST", - // "id": "compute.images.setLabels", + // "id": "compute.instanceGroupManagers.listManagedInstances", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "instanceGroupManager" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "instanceGroupManager": { + // "description": "The name of the managed instance group.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -95278,58 +99871,167 @@ func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/images/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", // "response": { - // "$ref": "Operation" + // "$ref": "InstanceGroupManagersListManagedInstancesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.images.testIamPermissions": +// 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 *InstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListManagedInstancesResponse) 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 ImagesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instanceGroupManagers.listPerInstanceConfigs": + +type InstanceGroupManagersListPerInstanceConfigsCall struct { + s *Service + project string + zone string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// ListPerInstanceConfigs: Lists all of the per-instance configurations +// defined for the managed instance group. The orderBy query parameter +// is not supported. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { - c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. It should conform to RFC1035. +func (r *InstanceGroupManagersService) ListPerInstanceConfigs(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListPerInstanceConfigsCall { + c := &InstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.zone = zone + c.instanceGroupManager = instanceGroupManager + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *InstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *InstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *InstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *InstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall { +func (c *InstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListPerInstanceConfigsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -95337,21 +100039,21 @@ func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestI // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall { +func (c *InstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersListPerInstanceConfigsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ImagesTestIamPermissionsCall) Header() http.Header { +func (c *InstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -95359,14 +100061,9 @@ func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -95374,20 +100071,25 @@ func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.images.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.instanceGroupManagers.listPerInstanceConfigs" call. +// Exactly one of *InstanceGroupManagersListPerInstanceConfigsResp or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *InstanceGroupManagersListPerInstanceConfigsResp.ServerResponse.Header +// +// or (if a response was returned at all) in +// +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListPerInstanceConfigsResp, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -95406,7 +100108,7 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &InstanceGroupManagersListPerInstanceConfigsResp{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -95418,15 +100120,45 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/images/{resource}/testIamPermissions", + // "description": "Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", // "httpMethod": "POST", - // "id": "compute.images.testIamPermissions", + // "id": "compute.instanceGroupManagers.listPerInstanceConfigs", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "instanceGroupManager" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -95434,20 +100166,21 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/images/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "InstanceGroupManagersListPerInstanceConfigsResp" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -95458,43 +100191,62 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } -// method id "compute.instanceGroupManagers.abandonInstances": +// 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 *InstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListPerInstanceConfigsResp) 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 InstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instanceGroupManagers.patch": + +type InstanceGroupManagersPatchCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanager *InstanceGroupManager + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AbandonInstances: Flags the specified instances to be removed from -// the managed instance group. Abandoning an instance does not delete -// the instance, but it does remove the instance from any target pools -// that are applied by the managed instance group. This method reduces -// the targetSize of the managed instance group by the number of -// instances that you abandon. This operation is marked as DONE when the -// action is scheduled even if the instances have not yet been removed -// from the group. You must separately verify the status of the -// abandoning action with the listmanagedinstances method. If the group -// is part of a backend service that has enabled connection draining, it -// can take up to 60 seconds after the connection draining duration has -// elapsed before the VM instance is removed or deleted. You can specify -// a maximum of 1000 instances with this method per request. +// Patch: Updates a managed instance group using the information that +// you specify in the request. This operation is marked as DONE when the +// group is patched even if the instances in the group are still in the +// process of being patched. You must separately verify the status of +// the individual instances with the listManagedInstances method. This +// method supports PATCH semantics and uses the JSON merge patch format +// and processing rules. If you update your group to specify a new +// template or instance configuration, it's possible that your intended +// specification for each VM in the group is different from the current +// state of that VM. To learn how to apply an updated configuration to +// the VMs in a MIG, see Updating instances in a MIG. // -// - instanceGroupManager: The name of the managed instance group. +// - instanceGroupManager: The name of the instance group manager. // - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { - c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where you want to create the managed +// instance group. +func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { + c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest + c.instancegroupmanager = instancegroupmanager return c } @@ -95509,7 +100261,7 @@ func (r *InstanceGroupManagersService) AbandonInstances(project string, zone str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall { +func (c *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -95517,7 +100269,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { +func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -95525,21 +100277,21 @@ func (c *InstanceGroupManagersAbandonInstancesCall) 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 *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { +func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { +func (c *InstanceGroupManagersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -95547,16 +100299,16 @@ func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -95569,14 +100321,14 @@ func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.abandonInstances" call. +// Do executes the "compute.instanceGroupManagers.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -95607,10 +100359,10 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.abandonInstances", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + // "httpMethod": "PATCH", + // "id": "compute.instanceGroupManagers.patch", // "parameterOrder": [ // "project", // "zone", @@ -95618,7 +100370,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group.", + // "description": "The name of the instance group manager.", // "location": "path", // "required": true, // "type": "string" @@ -95636,15 +100388,15 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where you want to create the managed instance group.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", // "request": { - // "$ref": "InstanceGroupManagersAbandonInstancesRequest" + // "$ref": "InstanceGroupManager" // }, // "response": { // "$ref": "Operation" @@ -95657,192 +100409,117 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt } -// method id "compute.instanceGroupManagers.aggregatedList": +// method id "compute.instanceGroupManagers.patchPerInstanceConfigs": -type InstanceGroupManagersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersPatchPerInstanceConfigsCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves the list of managed instance groups and -// groups them by zone. +// PatchPerInstanceConfigs: Inserts or patches per-instance +// configurations for the managed instance group. perInstanceConfig.name +// serves as a key used to distinguish whether to perform insert or +// patch. // -// - project: Project ID for this request. -func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { - c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is +// located. It should conform to RFC1035. +func (r *InstanceGroupManagersService) PatchPerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq) *InstanceGroupManagersPatchPerInstanceConfigsCall { + c := &InstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagerspatchperinstanceconfigsreq = instancegroupmanagerspatchperinstanceconfigsreq return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *InstanceGroupManagersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstanceGroupManagersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersPatchPerInstanceConfigsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall { +func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchPerInstanceConfigsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall { +func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersPatchPerInstanceConfigsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { +func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagerspatchperinstanceconfigsreq) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroupManagers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") 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{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.aggregatedList" call. -// Exactly one of *InstanceGroupManagerAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) { +// Do executes the "compute.instanceGroupManagers.patchPerInstanceConfigs" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -95861,7 +100538,7 @@ func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupManagerAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -95873,40 +100550,20 @@ func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of managed instance groups and groups them by zone.", - // "flatPath": "projects/{project}/aggregated/instanceGroupManagers", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.aggregatedList", + // "description": "Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.patchPerInstanceConfigs", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "location": "path", + // "required": true, // "type": "string" // }, // "project": { @@ -95916,81 +100573,91 @@ func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOptio // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/instanceGroupManagers", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", + // "request": { + // "$ref": "InstanceGroupManagersPatchPerInstanceConfigsReq" + // }, // "response": { - // "$ref": "InstanceGroupManagerAggregatedList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) 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 "compute.instanceGroupManagers.applyUpdatesToInstances": +// method id "compute.instanceGroupManagers.recreateInstances": -type InstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersRecreateInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ApplyUpdatesToInstances: Applies changes to selected instances on the -// managed instance group. This method can be used to apply new -// overrides and/or new versions. +// RecreateInstances: Flags the specified VM instances in the managed +// instance group to be immediately recreated. Each instance is +// recreated using the group's current configuration. This operation is +// marked as DONE when the flag is set even if the instances have not +// yet been recreated. You must separately verify the status of each +// instance by checking its currentAction field; for more information, +// see Checking the status of managed instances. If the group is part of +// a backend service that has enabled connection draining, it can take +// up to 60 seconds after the connection draining duration has elapsed +// before the VM instance is removed or deleted. You can specify a +// maximum of 1000 instances with this method per request. // -// - instanceGroupManager: The name of the managed instance group, -// should conform to RFC1035. +// - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. // - zone: The name of the zone where the managed instance group is -// located. Should conform to RFC1035. -func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// located. +func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { + c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersapplyupdatesrequest = instancegroupmanagersapplyupdatesrequest + c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersApplyUpdatesToInstancesCall { +func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -95998,21 +100665,21 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) 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 *InstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *InstanceGroupManagersApplyUpdatesToInstancesCall { +func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { +func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -96020,14 +100687,14 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersapplyupdatesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -96042,14 +100709,14 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.applyUpdatesToInstances" call. +// Do executes the "compute.instanceGroupManagers.recreateInstances" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -96080,10 +100747,10 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + // "description": "Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.applyUpdatesToInstances", + // "id": "compute.instanceGroupManagers.recreateInstances", // "parameterOrder": [ // "project", // "zone", @@ -96091,7 +100758,7 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi. // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group, should conform to RFC1035.", + // "description": "The name of the managed instance group.", // "location": "path", // "required": true, // "type": "string" @@ -96103,16 +100770,21 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi. // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located. Should conform to RFC1035.", + // "description": "The name of the zone where the managed instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", // "request": { - // "$ref": "InstanceGroupManagersApplyUpdatesRequest" + // "$ref": "InstanceGroupManagersRecreateInstancesRequest" // }, // "response": { // "$ref": "Operation" @@ -96125,37 +100797,49 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi. } -// method id "compute.instanceGroupManagers.createInstances": +// method id "compute.instanceGroupManagers.resize": -type InstanceGroupManagersCreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersResizeCall struct { + s *Service + project string + zone string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CreateInstances: Creates instances with per-instance configurations -// in this managed instance group. Instances are created using the -// current instance template. The create instances operation is marked -// DONE if the createInstances request is successful. The underlying -// actions take additional time. You must separately verify the status -// of the creating or actions with the listmanagedinstances method. +// Resize: Resizes the managed instance group. If you increase the size, +// the group creates new instances using the current instance template. +// If you decrease the size, the group deletes instances. The resize +// operation is marked DONE when the resize actions are scheduled even +// if the group has not yet added or deleted any instances. You must +// separately verify the status of the creating or deleting actions with +// the listmanagedinstances method. When resizing down, the instance +// group arbitrarily chooses the order in which VMs are deleted. The +// group takes into account some VM attributes when making the selection +// including: + The status of the VM instance. + The health of the VM +// instance. + The instance template version the VM is based on. + For +// regional managed instance groups, the location of the VM instance. +// This list is subject to change. If the group is part of a backend +// service that has enabled connection draining, it can take up to 60 +// seconds after the connection draining duration has elapsed before the +// VM instance is removed or deleted. // -// - instanceGroupManager: The name of the managed instance group. It -// should conform to RFC1035. +// - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. +// - size: The number of running instances that the managed instance +// group should maintain at any given time. The group automatically +// adds or removes instances to maintain the number of instances +// specified by this parameter. // - zone: The name of the zone where the managed instance group is -// located. It should conform to RFC1035. -func (r *InstanceGroupManagersService) CreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest) *InstanceGroupManagersCreateInstancesCall { - c := &InstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// located. +func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { + c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerscreateinstancesrequest = instancegroupmanagerscreateinstancesrequest + c.urlParams_.Set("size", fmt.Sprint(size)) return c } @@ -96166,10 +100850,11 @@ func (r *InstanceGroupManagersService) CreateInstances(project string, zone stri // situation where you make an initial request and the request times // out. If you make the request again with the same request ID, the // server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. The request ID -// must be a valid UUID with the exception that zero UUID is not +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersCreateInstancesCall { +func (c *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall { c.urlParams_.Set("requestId", requestId) return c } @@ -96177,7 +100862,7 @@ func (c *InstanceGroupManagersCreateInstancesCall) RequestId(requestId string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersCreateInstancesCall { +func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -96185,21 +100870,21 @@ func (c *InstanceGroupManagersCreateInstancesCall) 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 *InstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersCreateInstancesCall { +func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersCreateInstancesCall) Header() http.Header { +func (c *InstanceGroupManagersResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -96207,14 +100892,9 @@ func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerscreateinstancesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -96229,14 +100909,14 @@ func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.createInstances" call. +// Do executes the "compute.instanceGroupManagers.resize" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -96267,18 +100947,19 @@ func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", + // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.createInstances", + // "id": "compute.instanceGroupManagers.resize", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "instanceGroupManager", + // "size" // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "description": "The name of the managed instance group.", // "location": "path", // "required": true, // "type": "string" @@ -96291,21 +100972,25 @@ func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // }, + // "size": { + // "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", + // "format": "int32", + // "location": "query", + // "required": true, + // "type": "integer" + // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "description": "The name of the zone where the managed instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", - // "request": { - // "$ref": "InstanceGroupManagersCreateInstancesRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", // "response": { // "$ref": "Operation" // }, @@ -96317,33 +101002,43 @@ func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOpti } -// method id "compute.instanceGroupManagers.delete": +// method id "compute.instanceGroupManagers.resizeAdvanced": -type InstanceGroupManagersDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersResizeAdvancedCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. Note that the instance group must not belong -// to a backend service. Read Deleting an instance group for more -// information. +// ResizeAdvanced: Resizes the managed instance group with advanced +// configuration options like disabling creation retries. This is an +// extended version of the resize method. If you increase the size of +// the instance group, the group creates new instances using the current +// instance template. If you decrease the size, the group deletes +// instances. The resize operation is marked DONE when the resize +// actions are scheduled even if the group has not yet added or deleted +// any instances. You must separately verify the status of the creating, +// creatingWithoutRetries, or deleting actions with the get or +// listmanagedinstances method. If the group is part of a backend +// service that has enabled connection draining, it can take up to 60 +// seconds after the connection draining duration has elapsed before the +// VM instance is removed or deleted. // -// - instanceGroupManager: The name of the managed instance group to -// delete. +// - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. // - zone: The name of the zone where the managed instance group is // located. -func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { - c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { + c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersresizeadvancedrequest = instancegroupmanagersresizeadvancedrequest return c } @@ -96358,7 +101053,7 @@ func (r *InstanceGroupManagersService) Delete(project string, zone string, insta // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall { +func (c *InstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *InstanceGroupManagersResizeAdvancedCall { c.urlParams_.Set("requestId", requestId) return c } @@ -96366,7 +101061,7 @@ func (c *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceG // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { +func (c *InstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeAdvancedCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -96374,21 +101069,21 @@ func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *Instance // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { +func (c *InstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *InstanceGroupManagersResizeAdvancedCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteCall) Header() http.Header { +func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -96396,11 +101091,16 @@ func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersresizeadvancedrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -96413,14 +101113,14 @@ func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.delete" call. +// Do executes the "compute.instanceGroupManagers.resizeAdvanced" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -96451,10 +101151,10 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroupManagers.delete", + // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.resizeAdvanced", // "parameterOrder": [ // "project", // "zone", @@ -96462,7 +101162,7 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group to delete.", + // "description": "The name of the managed instance group.", // "location": "path", // "required": true, // "type": "string" @@ -96486,7 +101186,10 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", + // "request": { + // "$ref": "InstanceGroupManagersResizeAdvancedRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -96498,42 +101201,33 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.instanceGroupManagers.deleteInstances": +// method id "compute.instanceGroupManagers.setAutoHealingPolicies": -type InstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersSetAutoHealingPoliciesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeleteInstances: Flags the specified instances in the managed -// instance group for immediate deletion. The instances are also removed -// from any target pools of which they were a member. This method -// reduces the targetSize of the managed instance group by the number of -// instances that you delete. This operation is marked as DONE when the -// action is scheduled even if the instances are still being deleted. -// You must separately verify the status of the deleting action with the -// listmanagedinstances method. If the group is part of a backend -// service that has enabled connection draining, it can take up to 60 -// seconds after the connection draining duration has elapsed before the -// VM instance is removed or deleted. You can specify a maximum of 1000 -// instances with this method per request. +// SetAutoHealingPolicies: Motifies the autohealing policy for the +// instances in this managed instance group. [Deprecated] This method is +// deprecated. Use instanceGroupManagers.patch instead. // -// - instanceGroupManager: The name of the managed instance group. +// - instanceGroupManager: The name of the instance group manager. // - project: Project ID for this request. // - zone: The name of the zone where the managed instance group is // located. -func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { - c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { + c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest + c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest return c } @@ -96548,7 +101242,7 @@ func (r *InstanceGroupManagersService) DeleteInstances(project string, zone stri // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall { +func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *InstanceGroupManagersSetAutoHealingPoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -96556,7 +101250,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { +func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -96564,21 +101258,21 @@ func (c *InstanceGroupManagersDeleteInstancesCall) 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 *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { +func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { +func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -96586,14 +101280,14 @@ func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetautohealingrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -96608,14 +101302,14 @@ func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.deleteInstances" call. +// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -96646,10 +101340,11 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", + // "deprecated": true, + // "description": "Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.deleteInstances", + // "id": "compute.instanceGroupManagers.setAutoHealingPolicies", // "parameterOrder": [ // "project", // "zone", @@ -96657,7 +101352,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group.", + // "description": "The name of the instance group manager.", // "location": "path", // "required": true, // "type": "string" @@ -96681,9 +101376,9 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", // "request": { - // "$ref": "InstanceGroupManagersDeleteInstancesRequest" + // "$ref": "InstanceGroupManagersSetAutoHealingRequest" // }, // "response": { // "$ref": "Operation" @@ -96696,40 +101391,58 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti } -// method id "compute.instanceGroupManagers.deletePerInstanceConfigs": +// method id "compute.instanceGroupManagers.setInstanceTemplate": -type InstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersSetInstanceTemplateCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeletePerInstanceConfigs: Deletes selected per-instance -// configurations for the managed instance group. +// SetInstanceTemplate: Specifies the instance template to use when +// creating new instances in this group. The templates for existing +// instances in the group do not change unless you run +// recreateInstances, run applyUpdatesToInstances, or set the group's +// updatePolicy.type to PROACTIVE. // -// - instanceGroupManager: The name of the managed instance group. It -// should conform to RFC1035. +// - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. // - zone: The name of the zone where the managed instance group is -// located. It should conform to RFC1035. -func (r *InstanceGroupManagersService) DeletePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c := &InstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// located. +func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { + c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteperinstanceconfigsreq = instancegroupmanagersdeleteperinstanceconfigsreq + c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeletePerInstanceConfigsCall { +func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -96737,21 +101450,21 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) 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 *InstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersDeletePerInstanceConfigsCall { +func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { +func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -96759,14 +101472,14 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteperinstanceconfigsreq) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -96781,14 +101494,14 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.deletePerInstanceConfigs" call. +// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -96819,10 +101532,10 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Deletes selected per-instance configurations for the managed instance group.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", + // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", + // "id": "compute.instanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ // "project", // "zone", @@ -96830,7 +101543,7 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "description": "The name of the managed instance group.", // "location": "path", // "required": true, // "type": "string" @@ -96842,16 +101555,21 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "description": "The name of the zone where the managed instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", // "request": { - // "$ref": "InstanceGroupManagersDeletePerInstanceConfigsReq" + // "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" // }, // "response": { // "$ref": "Operation" @@ -96864,85 +101582,99 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi } -// method id "compute.instanceGroupManagers.get": +// method id "compute.instanceGroupManagers.setTargetPools": -type InstanceGroupManagersGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersSetTargetPoolsCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns all of the details about the specified managed instance -// group. +// SetTargetPools: Modifies the target pools to which all instances in +// this managed instance group are assigned. The target pools +// automatically apply to all of the instances in the managed instance +// group. This operation is marked DONE when you make the request even +// if the instances have not yet been added to their target pools. The +// change might take some time to apply to all of the instances in the +// group depending on the size of the group. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. // - zone: The name of the zone where the managed instance group is // located. -func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { - c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { + c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { +func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { +func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersGetCall) Header() http.Header { +func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagerssettargetpoolsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -96955,14 +101687,14 @@ func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.get" call. -// Exactly one of *InstanceGroupManager or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { +// Do executes the "compute.instanceGroupManagers.setTargetPools" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -96981,7 +101713,7 @@ func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*Instan if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupManager{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -96993,10 +101725,10 @@ func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*Instan } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.get", + // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.setTargetPools", // "parameterOrder": [ // "project", // "zone", @@ -97016,6 +101748,11 @@ func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*Instan // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone where the managed instance group is located.", // "location": "path", @@ -97023,72 +101760,53 @@ func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*Instan // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + // "request": { + // "$ref": "InstanceGroupManagersSetTargetPoolsRequest" + // }, // "response": { - // "$ref": "InstanceGroupManager" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instanceGroupManagers.insert": +// method id "compute.instanceGroupManagers.testIamPermissions": -type InstanceGroupManagersInsertCall struct { - s *Service - project string - zone string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a managed instance group using the information that -// you specify in the request. After the group is created, instances in -// the group are created using the specified instance template. This -// operation is marked as DONE when the group is created even if the -// instances in the group have not yet been created. You must separately -// verify the status of the individual instances with the -// listmanagedinstances method. A managed instance group can have up to -// 1000 VM instances per group. Please contact Cloud Support if you need -// an increase in this limit. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - project: Project ID for this request. -// - zone: The name of the zone where you want to create the managed -// instance group. -func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { - c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { + c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { +func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -97096,21 +101814,21 @@ func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *Instance // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { +func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersInsertCall) Header() http.Header { +func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -97118,14 +101836,14 @@ func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -97133,20 +101851,21 @@ func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceGroupManagers.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -97165,7 +101884,7 @@ func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -97177,13 +101896,14 @@ func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.insert", + // "id": "compute.instanceGroupManagers.testIamPermissions", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "resource" // ], // "parameters": { // "project": { @@ -97193,210 +101913,153 @@ func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", + // "description": "The name of the zone for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", // "request": { - // "$ref": "InstanceGroupManager" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceGroupManagers.list": +// method id "compute.instanceGroupManagers.update": -type InstanceGroupManagersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersUpdateCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanager *InstanceGroupManager + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of managed instance groups that are contained -// within the specified project and zone. +// Update: Updates a managed instance group using the information that +// you specify in the request. This operation is marked as DONE when the +// group is updated even if the instances in the group have not yet been +// updated. You must separately verify the status of the individual +// instances with the listManagedInstances method. If you update your +// group to specify a new template or instance configuration, it's +// possible that your intended specification for each VM in the group is +// different from the current state of that VM. To learn how to apply an +// updated configuration to the VMs in a MIG, see Updating instances in +// a MIG. // +// - instanceGroupManager: The name of the instance group manager. // - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { - c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where you want to create the managed +// instance group. +func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { + c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanager = instancegroupmanager return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceGroupManagersUpdateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { +func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { +func (c *InstanceGroupManagersUpdateCall) Context(ctx context.Context) *InstanceGroupManagersUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersListCall) Header() http.Header { +func (c *InstanceGroupManagersUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, 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.instancegroupmanager) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.list" call. -// Exactly one of *InstanceGroupManagerList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) { +// Do executes the "compute.instanceGroupManagers.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -97415,7 +102078,7 @@ func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*Insta if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupManagerList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -97427,36 +102090,20 @@ func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*Insta } return ret, nil // { - // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.list", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + // "httpMethod": "PUT", + // "id": "compute.instanceGroupManagers.update", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "instanceGroupManager" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "instanceGroupManager": { + // "description": "The name of the instance group manager.", + // "location": "path", + // "required": true, // "type": "string" // }, // "project": { @@ -97466,217 +102113,124 @@ func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*Insta // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where you want to create the managed instance group.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + // "request": { + // "$ref": "InstanceGroupManager" + // }, // "response": { - // "$ref": "InstanceGroupManagerList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "compute.instanceGroupManagers.listErrors": +// method id "compute.instanceGroupManagers.updatePerInstanceConfigs": -type InstanceGroupManagersListErrorsCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListErrors: Lists all errors thrown by actions on instances for a -// given managed instance group. The filter and orderBy query parameters -// are not supported. +// UpdatePerInstanceConfigs: Inserts or updates per-instance +// configurations for the managed instance group. perInstanceConfig.name +// serves as a key used to distinguish whether to perform insert or +// patch. // // - instanceGroupManager: The name of the managed instance group. It -// must be a string that meets the requirements in RFC1035, or an -// unsigned long integer: must match regexp pattern: (?:a-z -// (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. +// should conform to RFC1035. // - project: Project ID for this request. // - zone: The name of the zone where the managed instance group is // located. It should conform to RFC1035. -func (r *InstanceGroupManagersService) ListErrors(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListErrorsCall { - c := &InstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { + c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersupdateperinstanceconfigsreq = instancegroupmanagersupdateperinstanceconfigsreq return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstanceGroupManagersListErrorsCall) Filter(filter string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersListErrorsCall) PageToken(pageToken string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListErrorsCall { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdatePerInstanceConfigsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListErrorsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersListErrorsCall) Context(ctx context.Context) *InstanceGroupManagersListErrorsCall { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersUpdatePerInstanceConfigsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersListErrorsCall) Header() http.Header { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagersupdateperinstanceconfigsreq) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -97689,15 +102243,14 @@ func (c *InstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.listErrors" call. -// Exactly one of *InstanceGroupManagersListErrorsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *InstanceGroupManagersListErrorsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListErrorsResponse, error) { +// Do executes the "compute.instanceGroupManagers.updatePerInstanceConfigs" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -97716,7 +102269,7 @@ func (c *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupManagersListErrorsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -97728,45 +102281,22 @@ func (c *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", - // "httpMethod": "GET", - // "id": "compute.instanceGroupManagers.listErrors", + // "description": "Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", // "parameterOrder": [ // "project", // "zone", // "instanceGroupManager" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, // "instanceGroupManager": { - // "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.", + // "description": "The name of the managed instance group. It should conform to RFC1035.", // "location": "path", // "required": true, // "type": "string" // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -97774,10 +102304,10 @@ func (c *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) ( // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", @@ -97786,160 +102316,71 @@ func (c *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", + // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", + // "request": { + // "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" + // }, // "response": { - // "$ref": "InstanceGroupManagersListErrorsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListErrorsResponse) 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 "compute.instanceGroupManagers.listManagedInstances": +// method id "compute.instanceGroups.addInstances": -type InstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsAddInstancesCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListManagedInstances: Lists all of the instances in the managed -// instance group. Each instance in the list has a currentAction, which -// indicates the action that the managed instance group is performing on -// the instance. For example, if the group is still creating an -// instance, the currentAction is CREATING. If a previous action failed, -// the list displays the errors for that failed action. The orderBy -// query parameter is not supported. The `pageToken` query parameter is -// supported only in the alpha and beta API and only if the group's -// `listManagedInstancesResults` field is set to `PAGINATED`. +// AddInstances: Adds a list of instances to the specified instance +// group. All of the instances in the instance group must be in the same +// network/subnetwork. Read Adding instances for more information. // -// - instanceGroupManager: The name of the managed instance group. +// - instanceGroup: The name of the instance group where you are adding +// instances. // - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { - c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { + c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) + c.instanceGroup = instanceGroup + c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall { +func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -97947,21 +102388,21 @@ func (c *InstanceGroupManagersListManagedInstancesCall) 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 *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall { +func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { +func (c *InstanceGroupsAddInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -97969,9 +102410,14 @@ func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -97979,23 +102425,21 @@ func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.listManagedInstances" call. -// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *InstanceGroupManagersListManagedInstancesResponse.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 *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) { +// Do executes the "compute.instanceGroups.addInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -98014,7 +102458,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupManagersListManagedInstancesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -98026,45 +102470,22 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only in the alpha and beta API and only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", + // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.listManagedInstances", + // "id": "compute.instanceGroups.addInstances", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", + // "instanceGroup": { + // "description": "The name of the instance group where you are adding instances.", // "location": "path", // "required": true, // "type": "string" // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -98072,78 +102493,51 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where the instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", + // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", + // "request": { + // "$ref": "InstanceGroupsAddInstancesRequest" + // }, // "response": { - // "$ref": "InstanceGroupManagersListManagedInstancesResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListManagedInstancesResponse) 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 "compute.instanceGroupManagers.listPerInstanceConfigs": +// method id "compute.instanceGroups.aggregatedList": -type InstanceGroupManagersListPerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ListPerInstanceConfigs: Lists all of the per-instance configurations -// defined for the managed instance group. The orderBy query parameter -// is not supported. +// AggregatedList: Retrieves the list of instance groups and sorts them +// by zone. // -// - instanceGroupManager: The name of the managed instance group. It -// should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. It should conform to RFC1035. -func (r *InstanceGroupManagersService) ListPerInstanceConfigs(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListPerInstanceConfigsCall { - c := &InstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { + c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager return c } @@ -98182,18 +102576,31 @@ func (r *InstanceGroupManagersService) ListPerInstanceConfigs(project string, zo // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *InstanceGroupManagersListPerInstanceConfigsCall { +func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *InstanceGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *InstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *InstanceGroupManagersListPerInstanceConfigsCall { +func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -98207,7 +102614,7 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *InstanceGroupManagersListPerInstanceConfigsCall { +func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -98215,7 +102622,7 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *InstanceGroupManagersListPerInstanceConfigsCall { +func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -98224,7 +102631,7 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken st // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListPerInstanceConfigsCall { +func (c *InstanceGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -98232,65 +102639,72 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(r // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListPerInstanceConfigsCall { +func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersListPerInstanceConfigsCall { +func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { +func (c *InstanceGroupsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroups") 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.listPerInstanceConfigs" call. -// Exactly one of *InstanceGroupManagersListPerInstanceConfigsResp or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *InstanceGroupManagersListPerInstanceConfigsResp.ServerResponse.Header -// -// or (if a response was returned at all) in -// -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListPerInstanceConfigsResp, error) { +// Do executes the "compute.instanceGroups.aggregatedList" call. +// Exactly one of *InstanceGroupAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -98309,7 +102723,7 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupManagersListPerInstanceConfigsResp{ + ret := &InstanceGroupAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -98321,14 +102735,12 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.listPerInstanceConfigs", + // "description": "Retrieves the list of instance groups and sorts them by zone.", + // "flatPath": "projects/{project}/aggregated/instanceGroups", + // "httpMethod": "GET", + // "id": "compute.instanceGroups.aggregatedList", // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroupManager" + // "project" // ], // "parameters": { // "filter": { @@ -98336,11 +102748,10 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.C // "location": "query", // "type": "string" // }, - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" // }, // "maxResults": { // "default": "500", @@ -98371,17 +102782,11 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.C // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" - // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", + // "path": "projects/{project}/aggregated/instanceGroups", // "response": { - // "$ref": "InstanceGroupManagersListPerInstanceConfigsResp" + // "$ref": "InstanceGroupAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -98395,7 +102800,7 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.C // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListPerInstanceConfigsResp) error) error { +func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -98413,41 +102818,31 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Cont } } -// method id "compute.instanceGroupManagers.patch": +// method id "compute.instanceGroups.delete": -type InstanceGroupManagersPatchCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsDeleteCall struct { + s *Service + project string + zone string + instanceGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is patched even if the instances in the group are still in the -// process of being patched. You must separately verify the status of -// the individual instances with the listManagedInstances method. This -// method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. If you update your group to specify a new -// template or instance configuration, it's possible that your intended -// specification for each VM in the group is different from the current -// state of that VM. To learn how to apply an updated configuration to -// the VMs in a MIG, see Updating instances in a MIG. +// Delete: Deletes the specified instance group. The instances in the +// group are not deleted. Note that instance group must not belong to a +// backend service. Read Deleting an instance group for more +// information. // -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of the zone where you want to create the managed -// instance group. -func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { - c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group to delete. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { + c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager + c.instanceGroup = instanceGroup return c } @@ -98462,7 +102857,7 @@ func (r *InstanceGroupManagersService) Patch(project string, zone string, instan // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall { +func (c *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -98470,7 +102865,7 @@ func (c *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall { +func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -98478,21 +102873,21 @@ func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceG // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall { +func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersPatchCall) Header() http.Header { +func (c *InstanceGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -98500,36 +102895,31 @@ func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.patch" call. +// Do executes the "compute.instanceGroups.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -98560,18 +102950,18 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "httpMethod": "PATCH", - // "id": "compute.instanceGroupManagers.patch", + // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + // "httpMethod": "DELETE", + // "id": "compute.instanceGroups.delete", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", + // "instanceGroup": { + // "description": "The name of the instance group to delete.", // "location": "path", // "required": true, // "type": "string" @@ -98589,16 +102979,13 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper // "type": "string" // }, // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", + // "description": "The name of the zone where the instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, + // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", // "response": { // "$ref": "Operation" // }, @@ -98610,117 +102997,106 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.instanceGroupManagers.patchPerInstanceConfigs": +// method id "compute.instanceGroups.get": -type InstanceGroupManagersPatchPerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsGetCall struct { + s *Service + project string + zone string + instanceGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PatchPerInstanceConfigs: Inserts or patches per-instance -// configurations for the managed instance group. perInstanceConfig.name -// serves as a key used to distinguish whether to perform insert or -// patch. +// Get: Returns the specified zonal instance group. Get a list of +// available zonal instance groups by making a list() request. For +// managed instance groups, use the instanceGroupManagers or +// regionInstanceGroupManagers methods instead. // -// - instanceGroupManager: The name of the managed instance group. It -// should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. It should conform to RFC1035. -func (r *InstanceGroupManagersService) PatchPerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c := &InstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { + c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerspatchperinstanceconfigsreq = instancegroupmanagerspatchperinstanceconfigsreq - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c.urlParams_.Set("requestId", requestId) + c.instanceGroup = instanceGroup return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { +func (c *InstanceGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagerspatchperinstanceconfigsreq) - 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, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.patchPerInstanceConfigs" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.instanceGroups.get" call. +// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *InstanceGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -98739,7 +103115,7 @@ func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -98751,18 +103127,18 @@ func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.patchPerInstanceConfigs", + // "description": "Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + // "httpMethod": "GET", + // "id": "compute.instanceGroups.get", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "instanceGroup": { + // "description": "The name of the instance group.", // "location": "path", // "required": true, // "type": "string" @@ -98774,68 +103150,49 @@ func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi. // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "description": "The name of the zone where the instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - // "request": { - // "$ref": "InstanceGroupManagersPatchPerInstanceConfigsReq" - // }, + // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", // "response": { - // "$ref": "Operation" + // "$ref": "InstanceGroup" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceGroupManagers.recreateInstances": +// method id "compute.instanceGroups.insert": -type InstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsInsertCall struct { + s *Service + project string + zone string + instancegroup *InstanceGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RecreateInstances: Flags the specified VM instances in the managed -// instance group to be immediately recreated. Each instance is -// recreated using the group's current configuration. This operation is -// marked as DONE when the flag is set even if the instances have not -// yet been recreated. You must separately verify the status of each -// instance by checking its currentAction field; for more information, -// see Checking the status of managed instances. If the group is part of -// a backend service that has enabled connection draining, it can take -// up to 60 seconds after the connection draining duration has elapsed -// before the VM instance is removed or deleted. You can specify a -// maximum of 1000 instances with this method per request. +// Insert: Creates an instance group in the specified project using the +// parameters that are included in the request. // -// - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { - c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where you want to create the instance +// group. +func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { + c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest + c.instancegroup = instancegroup return c } @@ -98850,7 +103207,7 @@ func (r *InstanceGroupManagersService) RecreateInstances(project string, zone st // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall { +func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -98858,7 +103215,7 @@ func (c *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { +func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -98866,21 +103223,21 @@ func (c *InstanceGroupManagersRecreateInstancesCall) 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 *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { +func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { +func (c *InstanceGroupsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -98888,14 +103245,14 @@ func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -98903,21 +103260,20 @@ func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.recreateInstances" call. +// Do executes the "compute.instanceGroups.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -98948,22 +103304,15 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", + // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.recreateInstances", + // "id": "compute.instanceGroups.insert", // "parameterOrder": [ // "project", - // "zone", - // "instanceGroupManager" + // "zone" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -98977,15 +103326,15 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where you want to create the instance group.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", + // "path": "projects/{project}/zones/{zone}/instanceGroups", // "request": { - // "$ref": "InstanceGroupManagersRecreateInstancesRequest" + // "$ref": "InstanceGroup" // }, // "response": { // "$ref": "Operation" @@ -98998,126 +103347,183 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOp } -// method id "compute.instanceGroupManagers.resize": +// method id "compute.instanceGroups.list": -type InstanceGroupManagersResizeCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Resize: Resizes the managed instance group. If you increase the size, -// the group creates new instances using the current instance template. -// If you decrease the size, the group deletes instances. The resize -// operation is marked DONE when the resize actions are scheduled even -// if the group has not yet added or deleted any instances. You must -// separately verify the status of the creating or deleting actions with -// the listmanagedinstances method. When resizing down, the instance -// group arbitrarily chooses the order in which VMs are deleted. The -// group takes into account some VM attributes when making the selection -// including: + The status of the VM instance. + The health of the VM -// instance. + The instance template version the VM is based on. + For -// regional managed instance groups, the location of the VM instance. -// This list is subject to change. If the group is part of a backend -// service that has enabled connection draining, it can take up to 60 -// seconds after the connection draining duration has elapsed before the -// VM instance is removed or deleted. +// List: Retrieves the list of zonal instance group resources contained +// within the specified zone. For managed instance groups, use the +// instanceGroupManagers or regionInstanceGroupManagers methods instead. // -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - size: The number of running instances that the managed instance -// group should maintain at any given time. The group automatically -// adds or removes instances to maintain the number of instances -// specified by this parameter. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { - c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { + c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { +func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { +func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersResizeCall) Header() http.Header { +func (c *InstanceGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.resize" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceGroups.list" call. +// Exactly one of *InstanceGroupList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceGroupList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -99136,7 +103542,7 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroupList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -99148,21 +103554,36 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.resize", + // "description": "Retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups", + // "httpMethod": "GET", + // "id": "compute.instanceGroups.list", // "parameterOrder": [ // "project", - // "zone", - // "instanceGroupManager", - // "size" + // "zone" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -99172,97 +103593,169 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "size": { - // "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - // "format": "int32", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "required": true, - // "type": "integer" + // "type": "boolean" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where the instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", + // "path": "projects/{project}/zones/{zone}/instanceGroups", // "response": { - // "$ref": "Operation" + // "$ref": "InstanceGroupList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceGroupManagers.resizeAdvanced": +// 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 *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) 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 InstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instanceGroups.listInstances": + +type InstanceGroupsListInstancesCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResizeAdvanced: Resizes the managed instance group with advanced -// configuration options like disabling creation retries. This is an -// extended version of the resize method. If you increase the size of -// the instance group, the group creates new instances using the current -// instance template. If you decrease the size, the group deletes -// instances. The resize operation is marked DONE when the resize -// actions are scheduled even if the group has not yet added or deleted -// any instances. You must separately verify the status of the creating, -// creatingWithoutRetries, or deleting actions with the get or -// listmanagedinstances method. If the group is part of a backend -// service that has enabled connection draining, it can take up to 60 -// seconds after the connection draining duration has elapsed before the -// VM instance is removed or deleted. +// ListInstances: Lists the instances in the specified instance group. +// The orderBy query parameter is not supported. The filter query +// parameter is supported, but only for expressions that use `eq` +// (equal) or `ne` (not equal) operators. // -// - instanceGroupManager: The name of the managed instance group. +// - instanceGroup: The name of the instance group from which you want +// to generate a list of included instances. // - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { - c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { + c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersresizeadvancedrequest = instancegroupmanagersresizeadvancedrequest + c.instanceGroup = instanceGroup + c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *InstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListInstancesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeAdvancedCall { +func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -99270,21 +103763,21 @@ func (c *InstanceGroupManagersResizeAdvancedCall) 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 *InstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *InstanceGroupManagersResizeAdvancedCall { +func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { +func (c *InstanceGroupsListInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -99292,14 +103785,14 @@ func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersresizeadvancedrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -99307,21 +103800,21 @@ func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.resizeAdvanced" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceGroups.listInstances" call. +// Exactly one of *InstanceGroupsListInstances or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *InstanceGroupsListInstances.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -99340,7 +103833,7 @@ func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroupsListInstances{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -99352,22 +103845,45 @@ func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", + // "description": "Lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use `eq` (equal) or `ne` (not equal) operators.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.resizeAdvanced", + // "id": "compute.instanceGroups.listInstances", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "instanceGroup": { + // "description": "The name of the instance group from which you want to generate a list of included instances.", // "location": "path", // "required": true, // "type": "string" // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -99375,60 +103891,84 @@ func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOptio // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where the instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", + // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", // "request": { - // "$ref": "InstanceGroupManagersResizeAdvancedRequest" + // "$ref": "InstanceGroupsListInstancesRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "InstanceGroupsListInstances" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceGroupManagers.setAutoHealingPolicies": +// 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 *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) 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 InstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instanceGroups.removeInstances": + +type InstanceGroupsRemoveInstancesCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetAutoHealingPolicies: Motifies the autohealing policy for the -// instances in this managed instance group. [Deprecated] This method is -// deprecated. Use instanceGroupManagers.patch instead. +// RemoveInstances: Removes one or more instances from the specified +// instance group, but does not delete those instances. If the group is +// part of a backend service that has enabled connection draining, it +// can take up to 60 seconds after the connection draining duration +// before the VM instance is removed or deleted. // -// - instanceGroupManager: The name of the instance group manager. +// - instanceGroup: The name of the instance group where the specified +// instances will be removed. // - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { + c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest + c.instanceGroup = instanceGroup + c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest return c } @@ -99443,7 +103983,7 @@ func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zo // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *InstanceGroupManagersSetAutoHealingPoliciesCall { +func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -99451,7 +103991,7 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall { +func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -99459,21 +103999,21 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) 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 *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall { +func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { +func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -99481,14 +104021,14 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetautohealingrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -99496,21 +104036,21 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call. +// Do executes the "compute.instanceGroups.removeInstances" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -99541,19 +104081,18 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.C } return ret, nil // { - // "deprecated": true, - // "description": "Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", + // "description": "Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setAutoHealingPolicies", + // "id": "compute.instanceGroups.removeInstances", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", + // "instanceGroup": { + // "description": "The name of the instance group where the specified instances will be removed.", // "location": "path", // "required": true, // "type": "string" @@ -99571,15 +104110,15 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.C // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where the instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", + // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", // "request": { - // "$ref": "InstanceGroupManagersSetAutoHealingRequest" + // "$ref": "InstanceGroupsRemoveInstancesRequest" // }, // "response": { // "$ref": "Operation" @@ -99592,35 +104131,31 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.C } -// method id "compute.instanceGroupManagers.setInstanceTemplate": +// method id "compute.instanceGroups.setNamedPorts": -type InstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsSetNamedPortsCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetInstanceTemplate: Specifies the instance template to use when -// creating new instances in this group. The templates for existing -// instances in the group do not change unless you run -// recreateInstances, run applyUpdatesToInstances, or set the group's -// updatePolicy.type to PROACTIVE. +// SetNamedPorts: Sets the named ports for the specified instance group. // -// - instanceGroupManager: The name of the managed instance group. +// - instanceGroup: The name of the instance group where the named ports +// are updated. // - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { - c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { + c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest + c.instanceGroup = instanceGroup + c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest return c } @@ -99635,7 +104170,7 @@ func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall { +func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -99643,7 +104178,7 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { +func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -99651,21 +104186,21 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) 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 *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { +func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { +func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -99673,14 +104208,14 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -99688,21 +104223,21 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call. +// Do executes the "compute.instanceGroups.setNamedPorts" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -99733,18 +104268,18 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + // "description": "Sets the named ports for the specified instance group.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setInstanceTemplate", + // "id": "compute.instanceGroups.setNamedPorts", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", + // "instanceGroup": { + // "description": "The name of the instance group where the named ports are updated.", // "location": "path", // "required": true, // "type": "string" @@ -99762,15 +104297,15 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.Call // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone where the instance group is located.", // "location": "path", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", // "request": { - // "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" + // "$ref": "InstanceGroupsSetNamedPortsRequest" // }, // "response": { // "$ref": "Operation" @@ -99783,60 +104318,38 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.Call } -// method id "compute.instanceGroupManagers.setTargetPools": +// method id "compute.instanceGroups.testIamPermissions": -type InstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetTargetPools: Modifies the target pools to which all instances in -// this managed instance group are assigned. The target pools -// automatically apply to all of the instances in the managed instance -// group. This operation is marked DONE when you make the request even -// if the instances have not yet been added to their target pools. The -// change might take some time to apply to all of the instances in the -// group depending on the size of the group. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. -func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { - c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { + c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { +func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -99844,21 +104357,21 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) 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 *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { +func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { +func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -99866,14 +104379,14 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -99881,21 +104394,21 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.setTargetPools" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceGroups.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -99914,7 +104427,7 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -99926,22 +104439,16 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.setTargetPools", + // "id": "compute.instanceGroups.testIamPermissions", // "parameterOrder": [ // "project", // "zone", - // "instanceGroupManager" + // "resource" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -99949,124 +104456,222 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the managed instance group is located.", + // "description": "The name of the zone for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + // "path": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", // "request": { - // "$ref": "InstanceGroupManagersSetTargetPoolsRequest" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceGroupManagers.testIamPermissions": +// method id "compute.instanceTemplates.aggregatedList": -type InstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// AggregatedList: Retrieves the list of all InstanceTemplates +// resources, regional and global, available to the specified project. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { - c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *InstanceTemplatesService) AggregatedList(project string) *InstanceTemplatesAggregatedListCall { + c := &InstanceTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstanceTemplatesAggregatedListCall) Filter(filter string) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *InstanceTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstanceTemplatesAggregatedListCall) MaxResults(maxResults int64) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstanceTemplatesAggregatedListCall) OrderBy(orderBy string) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstanceTemplatesAggregatedListCall) PageToken(pageToken string) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstanceTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall { +func (c *InstanceTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *InstanceTemplatesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *InstanceTemplatesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall { +func (c *InstanceTemplatesAggregatedListCall) Context(ctx context.Context) *InstanceTemplatesAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { +func (c *InstanceTemplatesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - 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, "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceTemplates") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.instanceTemplates.aggregatedList" call. +// Exactly one of *InstanceTemplateAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *InstanceTemplateAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -100085,7 +104690,7 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &InstanceTemplateAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -100097,44 +104702,58 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.testIamPermissions", + // "description": "Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/instanceTemplates", + // "httpMethod": "GET", + // "id": "compute.instanceTemplates.aggregatedList", // "parameterOrder": [ - // "project", - // "zone", - // "resource" + // "project" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/aggregated/instanceTemplates", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "InstanceTemplateAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -100145,40 +104764,48 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallO } -// method id "compute.instanceGroupManagers.update": +// 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 *InstanceTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceTemplateAggregatedList) 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 InstanceGroupManagersUpdateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instanceTemplates.delete": + +type InstanceTemplatesDeleteCall struct { + s *Service + project string + instanceTemplate string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is updated even if the instances in the group have not yet been -// updated. You must separately verify the status of the individual -// instances with the listManagedInstances method. If you update your -// group to specify a new template or instance configuration, it's -// possible that your intended specification for each VM in the group is -// different from the current state of that VM. To learn how to apply an -// updated configuration to the VMs in a MIG, see Updating instances in -// a MIG. +// Delete: Deletes the specified instance template. Deleting an instance +// template is permanent and cannot be undone. It is not possible to +// delete templates that are already in use by a managed instance group. // -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of the zone where you want to create the managed -// instance group. -func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { - c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceTemplate: The name of the instance template to delete. +// - project: Project ID for this request. +func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { + c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager + c.instanceTemplate = instanceTemplate return c } @@ -100193,7 +104820,7 @@ func (r *InstanceGroupManagersService) Update(project string, zone string, insta // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceGroupManagersUpdateCall { +func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -100201,7 +104828,7 @@ func (c *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceG // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdateCall { +func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -100209,21 +104836,21 @@ func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *Instance // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersUpdateCall) Context(ctx context.Context) *InstanceGroupManagersUpdateCall { +func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersUpdateCall) Header() http.Header { +func (c *InstanceTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -100231,36 +104858,30 @@ func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "instanceTemplate": c.instanceTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.update" call. +// Do executes the "compute.instanceTemplates.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -100291,19 +104912,19 @@ func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "httpMethod": "PUT", - // "id": "compute.instanceGroupManagers.update", + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", + // "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", + // "httpMethod": "DELETE", + // "id": "compute.instanceTemplates.delete", // "parameterOrder": [ // "project", - // "zone", - // "instanceGroupManager" + // "instanceTemplate" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", + // "instanceTemplate": { + // "description": "The name of the instance template to delete.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -100318,18 +104939,9 @@ func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where you want to create the managed instance group.", - // "location": "path", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, + // "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", // "response": { // "$ref": "Operation" // }, @@ -100341,117 +104953,99 @@ func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.instanceGroupManagers.updatePerInstanceConfigs": +// method id "compute.instanceTemplates.get": -type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesGetCall struct { + s *Service + project string + instanceTemplate string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdatePerInstanceConfigs: Inserts or updates per-instance -// configurations for the managed instance group. perInstanceConfig.name -// serves as a key used to distinguish whether to perform insert or -// patch. +// Get: Returns the specified instance template. // -// - instanceGroupManager: The name of the managed instance group. It -// should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is -// located. It should conform to RFC1035. -func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceTemplate: The name of the instance template. +// - project: Project ID for this request. +func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { + c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersupdateperinstanceconfigsreq = instancegroupmanagersupdateperinstanceconfigsreq - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("requestId", requestId) + c.instanceTemplate = instanceTemplate return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { +func (c *InstanceTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, 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.instancegroupmanagersupdateperinstanceconfigsreq) - 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, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "instanceTemplate": c.instanceTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.updatePerInstanceConfigs" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceTemplates.get" call. +// Exactly one of *InstanceTemplate or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceTemplate.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -100470,7 +105064,7 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -100482,19 +105076,19 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - // "httpMethod": "POST", - // "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", + // "description": "Returns the specified instance template.", + // "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", + // "httpMethod": "GET", + // "id": "compute.instanceTemplates.get", // "parameterOrder": [ // "project", - // "zone", - // "instanceGroupManager" + // "instanceTemplate" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "instanceTemplate": { + // "description": "The name of the instance template.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -100504,61 +105098,217 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // } + // }, + // "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", + // "response": { + // "$ref": "InstanceTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instanceTemplates.getIamPolicy": + +type InstanceTemplatesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { + c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstanceTemplatesGetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceTemplates.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.instanceTemplates.getIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", // "location": "query", + // "type": "integer" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - // "request": { - // "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" - // }, + // "path": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceGroups.addInstances": +// method id "compute.instanceTemplates.insert": -type InstanceGroupsAddInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesInsertCall struct { + s *Service + project string + instancetemplate *InstanceTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddInstances: Adds a list of instances to the specified instance -// group. All of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. +// Insert: Creates an instance template in the specified project using +// the data that is included in the request. If you are creating a new +// template to update an existing instance group, your new instance +// template must use the same network or, if applicable, the same +// subnetwork as the original template. // -// - instanceGroup: The name of the instance group where you are adding -// instances. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { - c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { + c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest + c.instancetemplate = instancetemplate return c } @@ -100573,7 +105323,7 @@ func (r *InstanceGroupsService) AddInstances(project string, zone string, instan // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { +func (c *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -100581,7 +105331,7 @@ func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { +func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -100589,21 +105339,21 @@ func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceG // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { +func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsAddInstancesCall) Header() http.Header { +func (c *InstanceTemplatesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -100611,14 +105361,14 @@ func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -100626,21 +105376,19 @@ func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.addInstances" call. +// Do executes the "compute.instanceTemplates.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -100671,22 +105419,14 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", + // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", + // "flatPath": "projects/{project}/global/instanceTemplates", // "httpMethod": "POST", - // "id": "compute.instanceGroups.addInstances", + // "id": "compute.instanceTemplates.insert", // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" + // "project" // ], // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where you are adding instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -100698,17 +105438,11 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", + // "path": "projects/{project}/global/instanceTemplates", // "request": { - // "$ref": "InstanceGroupsAddInstancesRequest" + // "$ref": "InstanceTemplate" // }, // "response": { // "$ref": "Operation" @@ -100721,9 +105455,9 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.instanceGroups.aggregatedList": +// method id "compute.instanceTemplates.list": -type InstanceGroupsAggregatedListCall struct { +type InstanceTemplatesListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -100732,12 +105466,12 @@ type InstanceGroupsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves the list of instance groups and sorts them -// by zone. +// List: Retrieves a list of instance templates that are contained +// within the specified project. // // - project: Project ID for this request. -func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { - c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { + c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -100777,31 +105511,18 @@ func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAg // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *InstanceGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -100815,7 +105536,7 @@ func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *Instanc // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -100823,7 +105544,7 @@ func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGrou // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -100832,7 +105553,7 @@ func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *Instance // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *InstanceGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -100840,7 +105561,7 @@ func (c *InstanceGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -100850,7 +105571,7 @@ func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *Instanc // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { c.ifNoneMatch_ = entityTag return c } @@ -100858,21 +105579,21 @@ func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *Instan // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { +func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsAggregatedListCall) Header() http.Header { +func (c *InstanceTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -100885,7 +105606,7 @@ func (c *InstanceGroupsAggregatedListCall) 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, "projects/{project}/aggregated/instanceGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -100898,14 +105619,14 @@ func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.aggregatedList" call. -// Exactly one of *InstanceGroupAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.instanceTemplates.list" call. +// Exactly one of *InstanceTemplateList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceTemplateList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) { +func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -100924,7 +105645,7 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupAggregatedList{ + ret := &InstanceTemplateList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -100936,10 +105657,10 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In } return ret, nil // { - // "description": "Retrieves the list of instance groups and sorts them by zone.", - // "flatPath": "projects/{project}/aggregated/instanceGroups", + // "description": "Retrieves a list of instance templates that are contained within the specified project.", + // "flatPath": "projects/{project}/global/instanceTemplates", // "httpMethod": "GET", - // "id": "compute.instanceGroups.aggregatedList", + // "id": "compute.instanceTemplates.list", // "parameterOrder": [ // "project" // ], @@ -100949,11 +105670,6 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -100985,9 +105701,9 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/instanceGroups", + // "path": "projects/{project}/global/instanceTemplates", // "response": { - // "$ref": "InstanceGroupAggregatedList" + // "$ref": "InstanceTemplateList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -101001,7 +105717,7 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In // 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 *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { +func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -101019,54 +105735,35 @@ func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*In } } -// method id "compute.instanceGroups.delete": +// method id "compute.instanceTemplates.setIamPolicy": -type InstanceGroupsDeleteCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified instance group. The instances in the -// group are not deleted. Note that instance group must not belong to a -// backend service. Read Deleting an instance group for more -// information. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // -// - instanceGroup: The name of the instance group to delete. // - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { - c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { + c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { +func (c *InstanceTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -101074,21 +105771,21 @@ func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsD // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { +func (c *InstanceTemplatesSetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsDeleteCall) Header() http.Header { +func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -101096,31 +105793,35 @@ func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instanceTemplates.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -101139,7 +105840,7 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -101151,22 +105852,15 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "httpMethod": "DELETE", - // "id": "compute.instanceGroups.delete", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.instanceTemplates.setIamPolicy", // "parameterOrder": [ // "project", - // "zone", - // "instanceGroup" + // "resource" // ], // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group to delete.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -101174,21 +105868,20 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + // "path": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", + // "request": { + // "$ref": "GlobalSetPolicyRequest" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -101198,106 +105891,93 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.instanceGroups.get": +// method id "compute.instanceTemplates.testIamPermissions": -type InstanceGroupsGetCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceTemplatesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified zonal instance group. Get a list of -// available zonal instance groups by making a list() request. For -// managed instance groups, use the instanceGroupManagers or -// regionInstanceGroupManagers methods instead. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - instanceGroup: The name of the instance group. // - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { - c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { + c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instanceGroup = instanceGroup + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { +func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { +func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsGetCall) Header() http.Header { +func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.instanceTemplates.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { +func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -101316,7 +105996,7 @@ func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroup{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -101328,22 +106008,15 @@ func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup } return ret, nil // { - // "description": "Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.instanceTemplates.testIamPermissions", // "parameterOrder": [ // "project", - // "zone", - // "instanceGroup" + // "resource" // ], // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -101351,16 +106024,20 @@ func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + // "path": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "InstanceGroup" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -101371,29 +106048,34 @@ func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup } -// method id "compute.instanceGroups.insert": +// method id "compute.instances.addAccessConfig": -type InstanceGroupsInsertCall struct { - s *Service - project string - zone string - instancegroup *InstanceGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesAddAccessConfigCall struct { + s *Service + project string + zone string + instance string + accessconfig *AccessConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. +// AddAccessConfig: Adds an access config to an instance's network +// interface. // +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface to add to this +// instance. // - project: Project ID for this request. -// - zone: The name of the zone where you want to create the instance -// group. -func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { - c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { + c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instancegroup = instancegroup + c.instance = instance + c.urlParams_.Set("networkInterface", networkInterface) + c.accessconfig = accessconfig return c } @@ -101408,7 +106090,7 @@ func (r *InstanceGroupsService) Insert(project string, zone string, instancegrou // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { +func (c *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { c.urlParams_.Set("requestId", requestId) return c } @@ -101416,7 +106098,7 @@ func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsIn // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { +func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -101424,21 +106106,21 @@ func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsI // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { +func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsInsertCall) Header() http.Header { +func (c *InstancesAddAccessConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -101446,14 +106128,14 @@ func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -101461,20 +106143,21 @@ func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.insert" call. +// Do executes the "compute.instances.addAccessConfig" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -101505,15 +106188,30 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups", + // "description": "Adds an access config to an instance's network interface.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", // "httpMethod": "POST", - // "id": "compute.instanceGroups.insert", + // "id": "compute.instances.addAccessConfig", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "instance", + // "networkInterface" // ], // "parameters": { + // "instance": { + // "description": "The instance name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "networkInterface": { + // "description": "The name of the network interface to add to this instance.", + // "location": "query", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -101527,15 +106225,16 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // }, // "zone": { - // "description": "The name of the zone where you want to create the instance group.", + // "description": "The name of the zone for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", // "request": { - // "$ref": "InstanceGroup" + // "$ref": "AccessConfig" // }, // "response": { // "$ref": "Operation" @@ -101548,183 +106247,114 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.instanceGroups.list": +// method id "compute.instances.addResourcePolicies": -type InstanceGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesAddResourcePoliciesCall struct { + s *Service + project string + zone string + instance string + instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of zonal instance group resources contained -// within the specified zone. For managed instance groups, use the -// instanceGroupManagers or regionInstanceGroupManagers methods instead. +// AddResourcePolicies: Adds existing resource policies to an instance. +// You can only add one policy right now which will be applied to this +// instance for scheduling live migrations. // +// - instance: The instance name for this request. // - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { - c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) AddResourcePolicies(project string, zone string, instance string, instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest) *InstancesAddResourcePoliciesCall { + c := &InstancesAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.instance = instance + c.instancesaddresourcepoliciesrequest = instancesaddresourcepoliciesrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesAddResourcePoliciesCall) RequestId(requestId string) *InstancesAddResourcePoliciesCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { +func (c *InstancesAddResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesAddResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { +func (c *InstancesAddResourcePoliciesCall) Context(ctx context.Context) *InstancesAddResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsListCall) Header() http.Header { +func (c *InstancesAddResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response, 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.instancesaddresourcepoliciesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.list" call. -// Exactly one of *InstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) { +// Do executes the "compute.instances.addResourcePolicies" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -101743,7 +106373,7 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -101755,36 +106385,21 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou } return ret, nil // { - // "description": "Retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups", - // "httpMethod": "GET", - // "id": "compute.instanceGroups.list", + // "description": "Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", + // "httpMethod": "POST", + // "id": "compute.instances.addResourcePolicies", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "instance" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "instance": { + // "description": "The instance name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -101794,80 +106409,54 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the instance group is located.", + // "description": "The name of the zone for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", + // "request": { + // "$ref": "InstancesAddResourcePoliciesRequest" + // }, // "response": { - // "$ref": "InstanceGroupList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) 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 "compute.instanceGroups.listInstances": +// method id "compute.instances.aggregatedList": -type InstanceGroupsListInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ListInstances: Lists the instances in the specified instance group. -// The orderBy query parameter is not supported. The filter query -// parameter is supported, but only for expressions that use `eq` -// (equal) or `ne` (not equal) operators. +// AggregatedList: Retrieves an aggregated list of all of the instances +// in your project across all regions and zones. The performance of this +// method degrades when a filter is specified on a project that has a +// very large number of instances. // -// - instanceGroup: The name of the instance group from which you want -// to generate a list of included instances. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { - c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { + c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest return c } @@ -101906,18 +106495,31 @@ func (r *InstanceGroupsService) ListInstances(project string, zone string, insta // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { +func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *InstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstancesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { +func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -101931,7 +106533,7 @@ func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *Instance // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { +func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -101939,7 +106541,7 @@ func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroup // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { +func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -101948,7 +106550,7 @@ func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceG // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *InstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListInstancesCall { +func (c *InstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -101956,66 +106558,72 @@ func (c *InstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSucc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { +func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { +func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsListInstancesCall) Header() http.Header { +func (c *InstancesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, 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.instancegroupslistinstancesrequest) - 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, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instances") 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.listInstances" call. -// Exactly one of *InstanceGroupsListInstances or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupsListInstances.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.instances.aggregatedList" call. +// Exactly one of *InstanceAggregatedList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) { +func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -102034,7 +106642,7 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupsListInstances{ + ret := &InstanceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -102046,14 +106654,12 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins } return ret, nil // { - // "description": "Lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use `eq` (equal) or `ne` (not equal) operators.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.listInstances", + // "description": "Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.", + // "flatPath": "projects/{project}/aggregated/instances", + // "httpMethod": "GET", + // "id": "compute.instances.aggregatedList", // "parameterOrder": [ - // "project", - // "zone", - // "instanceGroup" + // "project" // ], // "parameters": { // "filter": { @@ -102061,11 +106667,10 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins // "location": "query", // "type": "string" // }, - // "instanceGroup": { - // "description": "The name of the instance group from which you want to generate a list of included instances.", - // "location": "path", - // "required": true, - // "type": "string" + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" // }, // "maxResults": { // "default": "500", @@ -102096,20 +106701,11 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" - // }, - // "zone": { - // "description": "The name of the zone where the instance group is located.", - // "location": "path", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "InstanceGroupsListInstancesRequest" - // }, + // "path": "projects/{project}/aggregated/instances", // "response": { - // "$ref": "InstanceGroupsListInstances" + // "$ref": "InstanceAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -102123,7 +106719,7 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins // 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 *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { +func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -102141,35 +106737,42 @@ func (c *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*Ins } } -// method id "compute.instanceGroups.removeInstances": +// method id "compute.instances.attachDisk": -type InstanceGroupsRemoveInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesAttachDiskCall struct { + s *Service + project string + zone string + instance string + attacheddisk *AttachedDisk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveInstances: Removes one or more instances from the specified -// instance group, but does not delete those instances. If the group is -// part of a backend service that has enabled connection draining, it -// can take up to 60 seconds after the connection draining duration -// before the VM instance is removed or deleted. +// AttachDisk: Attaches an existing Disk resource to an instance. You +// must first create the disk before you can attach it. It is not +// possible to create and attach a disk at the same time. For more +// information, read Adding a persistent disk to your instance. // -// - instanceGroup: The name of the instance group where the specified -// instances will be removed. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { - c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: The instance name for this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { + c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest + c.instance = instance + c.attacheddisk = attacheddisk + return c +} + +// ForceAttach sets the optional parameter "forceAttach": Whether to +// force attach the regional disk even if it's currently attached to +// another instance. If you try to force attach a zonal disk to an +// instance, you will receive an error. +func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { + c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) return c } @@ -102184,7 +106787,7 @@ func (r *InstanceGroupsService) RemoveInstances(project string, zone string, ins // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { +func (c *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { c.urlParams_.Set("requestId", requestId) return c } @@ -102192,7 +106795,7 @@ func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *Instanc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { +func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -102200,21 +106803,21 @@ func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *Instan // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { +func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { +func (c *InstancesAttachDiskCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -102222,14 +106825,14 @@ func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/attachDisk") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -102237,21 +106840,21 @@ func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.removeInstances" call. +// Do executes the "compute.instances.attachDisk" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -102282,19 +106885,25 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", + // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", // "httpMethod": "POST", - // "id": "compute.instanceGroups.removeInstances", + // "id": "compute.instances.attachDisk", // "parameterOrder": [ // "project", // "zone", - // "instanceGroup" + // "instance" // ], // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the specified instances will be removed.", + // "forceAttach": { + // "description": "Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.", + // "location": "query", + // "type": "boolean" + // }, + // "instance": { + // "description": "The instance name for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -102311,15 +106920,16 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the instance group is located.", + // "description": "The name of the zone for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", // "request": { - // "$ref": "InstanceGroupsRemoveInstancesRequest" + // "$ref": "AttachedDisk" // }, // "response": { // "$ref": "Operation" @@ -102332,31 +106942,29 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O } -// method id "compute.instanceGroups.setNamedPorts": +// method id "compute.instances.bulkInsert": -type InstanceGroupsSetNamedPortsCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesBulkInsertCall struct { + s *Service + project string + zone string + bulkinsertinstanceresource *BulkInsertInstanceResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetNamedPorts: Sets the named ports for the specified instance group. +// BulkInsert: Creates multiple instances. Count specifies the number of +// instances to create. For more information, see About bulk creation of +// VMs. // -// - instanceGroup: The name of the instance group where the named ports -// are updated. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { - c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) BulkInsert(project string, zone string, bulkinsertinstanceresource *BulkInsertInstanceResource) *InstancesBulkInsertCall { + c := &InstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest + c.bulkinsertinstanceresource = bulkinsertinstanceresource return c } @@ -102371,7 +106979,7 @@ func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, insta // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { +func (c *InstancesBulkInsertCall) RequestId(requestId string) *InstancesBulkInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -102379,7 +106987,7 @@ func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceG // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { +func (c *InstancesBulkInsertCall) Fields(s ...googleapi.Field) *InstancesBulkInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -102387,21 +106995,21 @@ func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *Instance // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { +func (c *InstancesBulkInsertCall) Context(ctx context.Context) *InstancesBulkInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { +func (c *InstancesBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -102409,14 +107017,14 @@ func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertinstanceresource) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/bulkInsert") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -102424,21 +107032,20 @@ func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.setNamedPorts" call. +// Do executes the "compute.instances.bulkInsert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -102469,22 +107076,15 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Sets the named ports for the specified instance group.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", + // "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", + // "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", // "httpMethod": "POST", - // "id": "compute.instanceGroups.setNamedPorts", + // "id": "compute.instances.bulkInsert", // "parameterOrder": [ // "project", - // "zone", - // "instanceGroup" + // "zone" // ], // "parameters": { - // "instanceGroup": { - // "description": "The name of the instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -102498,15 +107098,16 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope // "type": "string" // }, // "zone": { - // "description": "The name of the zone where the instance group is located.", + // "description": "The name of the zone for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", + // "path": "projects/{project}/zones/{zone}/instances/bulkInsert", // "request": { - // "$ref": "InstanceGroupsSetNamedPortsRequest" + // "$ref": "BulkInsertInstanceResource" // }, // "response": { // "$ref": "Operation" @@ -102519,38 +107120,52 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.instanceGroups.testIamPermissions": +// method id "compute.instances.delete": -type InstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesDeleteCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Delete: Deletes the specified Instance resource. For more +// information, see Deleting an instance. // +// - instance: Name of the instance resource to delete. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { - c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { + c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.instance = instance + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall { +func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -102558,21 +107173,21 @@ func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *Ins // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall { +func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { +func (c *InstancesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -102580,16 +107195,11 @@ func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -102597,19 +107207,19 @@ func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Resp googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.instances.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -102628,7 +107238,7 @@ func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -102640,16 +107250,23 @@ func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.instanceGroups.testIamPermissions", + // "description": "Deletes the specified Instance resource. For more information, see Deleting an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", + // "httpMethod": "DELETE", + // "id": "compute.instances.delete", // "parameterOrder": [ // "project", // "zone", - // "resource" + // "instance" // ], // "parameters": { + // "instance": { + // "description": "Name of the instance resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -102657,11 +107274,9 @@ func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // }, // "zone": { @@ -102672,207 +107287,122 @@ func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instanceTemplates.aggregatedList": +// method id "compute.instances.deleteAccessConfig": -type InstanceTemplatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesDeleteAccessConfigCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves the list of all InstanceTemplates -// resources, regional and global, available to the specified project. +// DeleteAccessConfig: Deletes an access config from an instance's +// network interface. // -// - project: Name of the project scoping this request. -func (r *InstanceTemplatesService) AggregatedList(project string) *InstanceTemplatesAggregatedListCall { - c := &InstanceTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstanceTemplatesAggregatedListCall) Filter(filter string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *InstanceTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstanceTemplatesAggregatedListCall) MaxResults(maxResults int64) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstanceTemplatesAggregatedListCall) OrderBy(orderBy string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstanceTemplatesAggregatedListCall) PageToken(pageToken string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) +// - accessConfig: The name of the access config to delete. +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { + c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.urlParams_.Set("accessConfig", accessConfig) + c.urlParams_.Set("networkInterface", networkInterface) return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstanceTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *InstanceTemplatesAggregatedListCall { +func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstanceTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *InstanceTemplatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesAggregatedListCall) Context(ctx context.Context) *InstanceTemplatesAggregatedListCall { +func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesAggregatedListCall) Header() http.Header { +func (c *InstancesDeleteAccessConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/aggregated/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") 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{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.aggregatedList" call. -// Exactly one of *InstanceTemplateAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *InstanceTemplateAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateAggregatedList, error) { +// Do executes the "compute.instances.deleteAccessConfig" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -102891,7 +107421,7 @@ func (c *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplateAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -102903,110 +107433,95 @@ func (c *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified project.", - // "flatPath": "projects/{project}/aggregated/instanceTemplates", - // "httpMethod": "GET", - // "id": "compute.instanceTemplates.aggregatedList", + // "description": "Deletes an access config from an instance's network interface.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", + // "httpMethod": "POST", + // "id": "compute.instances.deleteAccessConfig", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "instance", + // "accessConfig", + // "networkInterface" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "accessConfig": { + // "description": "The name of the access config to delete.", // "location": "query", + // "required": true, // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", + // "instance": { + // "description": "The instance name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "networkInterface": { + // "description": "The name of the network interface.", // "location": "query", + // "required": true, // "type": "string" // }, // "project": { - // "description": "Name of the project scoping this request.", + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/instanceTemplates", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", // "response": { - // "$ref": "InstanceTemplateAggregatedList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceTemplateAggregatedList) 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 "compute.instanceTemplates.delete": +// method id "compute.instances.detachDisk": -type InstanceTemplatesDeleteCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesDetachDiskCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified instance template. Deleting an instance -// template is permanent and cannot be undone. It is not possible to -// delete templates that are already in use by a managed instance group. +// DetachDisk: Detaches a disk from an instance. // -// - instanceTemplate: The name of the instance template to delete. -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { - c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - deviceName: The device name of the disk to detach. Make a get() +// request on the instance to view currently attached disks and device +// names. +// - instance: Instance name for this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { + c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.instanceTemplate = instanceTemplate + c.zone = zone + c.instance = instance + c.urlParams_.Set("deviceName", deviceName) return c } @@ -103021,7 +107536,7 @@ func (r *InstanceTemplatesService) Delete(project string, instanceTemplate strin // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { +func (c *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { c.urlParams_.Set("requestId", requestId) return c } @@ -103029,7 +107544,7 @@ func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTempl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { +func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -103037,21 +107552,21 @@ func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemp // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { +func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesDeleteCall) Header() http.Header { +func (c *InstancesDetachDiskCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -103061,28 +107576,29 @@ func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/detachDisk") 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{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.delete" call. +// Do executes the "compute.instances.detachDisk" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -103113,17 +107629,25 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", - // "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - // "httpMethod": "DELETE", - // "id": "compute.instanceTemplates.delete", + // "description": "Detaches a disk from an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", + // "httpMethod": "POST", + // "id": "compute.instances.detachDisk", // "parameterOrder": [ // "project", - // "instanceTemplate" + // "zone", + // "instance", + // "deviceName" // ], // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template to delete.", + // "deviceName": { + // "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.", + // "location": "query", + // "required": true, + // "type": "string" + // }, + // "instance": { + // "description": "Instance name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -103140,9 +107664,16 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", // "response": { // "$ref": "Operation" // }, @@ -103154,33 +107685,36 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } -// method id "compute.instanceTemplates.get": +// method id "compute.instances.get": -type InstanceTemplatesGetCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesGetCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified instance template. +// Get: Returns the specified Instance resource. // -// - instanceTemplate: The name of the instance template. +// - instance: Name of the instance resource to return. // - project: Project ID for this request. -func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { - c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { + c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.instanceTemplate = instanceTemplate + c.zone = zone + c.instance = instance return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { +func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -103190,7 +107724,7 @@ func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplat // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { +func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -103198,21 +107732,21 @@ func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTempla // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { +func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesGetCall) Header() http.Header { +func (c *InstancesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -103225,7 +107759,7 @@ func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -103233,20 +107767,21 @@ func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.get" call. -// Exactly one of *InstanceTemplate or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { +// Do executes the "compute.instances.get" call. +// Exactly one of *Instance or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Instance.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -103265,7 +107800,7 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplate{ + ret := &Instance{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -103277,17 +107812,18 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe } return ret, nil // { - // "description": "Returns the specified instance template.", - // "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", + // "description": "Returns the specified Instance resource.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", // "httpMethod": "GET", - // "id": "compute.instanceTemplates.get", + // "id": "compute.instances.get", // "parameterOrder": [ // "project", - // "instanceTemplate" + // "zone", + // "instance" // ], // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template.", + // "instance": { + // "description": "Name of the instance resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -103299,11 +107835,18 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", + // "path": "projects/{project}/zones/{zone}/instances/{instance}", // "response": { - // "$ref": "InstanceTemplate" + // "$ref": "Instance" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -103314,41 +107857,40 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe } -// method id "compute.instanceTemplates.getIamPolicy": +// method id "compute.instances.getEffectiveFirewalls": -type InstanceTemplatesGetIamPolicyCall struct { +type InstancesGetEffectiveFirewallsCall struct { s *Service project string - resource string + zone string + instance string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// GetEffectiveFirewalls: Returns effective firewalls applied to an +// interface of the instance. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { - c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance scoping this request. +// - networkInterface: The name of the network interface to get the +// effective firewalls. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) GetEffectiveFirewalls(project string, zone string, instance string, networkInterface string) *InstancesGetEffectiveFirewallsCall { + c := &InstancesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.zone = zone + c.instance = instance + c.urlParams_.Set("networkInterface", networkInterface) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetIamPolicyCall { +func (c *InstancesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *InstancesGetEffectiveFirewallsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -103358,7 +107900,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *Instan // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetIamPolicyCall { +func (c *InstancesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *InstancesGetEffectiveFirewallsCall { c.ifNoneMatch_ = entityTag return c } @@ -103366,21 +107908,21 @@ func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *Insta // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesGetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesGetIamPolicyCall { +func (c *InstancesGetEffectiveFirewallsCall) Context(ctx context.Context) *InstancesGetEffectiveFirewallsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { +func (c *InstancesGetEffectiveFirewallsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -103393,7 +107935,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -103402,19 +107944,21 @@ func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Respons req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "resource": c.resource, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.instances.getEffectiveFirewalls" call. +// Exactly one of *InstancesGetEffectiveFirewallsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *InstancesGetEffectiveFirewallsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*InstancesGetEffectiveFirewallsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -103433,7 +107977,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &InstancesGetEffectiveFirewallsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -103445,20 +107989,29 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", + // "description": "Returns effective firewalls applied to an interface of the instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", // "httpMethod": "GET", - // "id": "compute.instanceTemplates.getIamPolicy", + // "id": "compute.instances.getEffectiveFirewalls", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "instance", + // "networkInterface" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "networkInterface": { + // "description": "The name of the network interface to get the effective firewalls.", // "location": "query", - // "type": "integer" + // "required": true, + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -103467,17 +108020,17 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "The name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", // "response": { - // "$ref": "Policy" + // "$ref": "InstancesGetEffectiveFirewallsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -103488,108 +108041,117 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } -// method id "compute.instanceTemplates.insert": +// method id "compute.instances.getGuestAttributes": -type InstanceTemplatesInsertCall struct { - s *Service - project string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesGetGuestAttributesCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Creates an instance template in the specified project using -// the data that is included in the request. If you are creating a new -// template to update an existing instance group, your new instance -// template must use the same network or, if applicable, the same -// subnetwork as the original template. +// GetGuestAttributes: Returns the specified guest attributes entry. // +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. -func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { - c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { + c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.instancetemplate = instancetemplate + c.zone = zone + c.instance = instance return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { - c.urlParams_.Set("requestId", requestId) +// QueryPath sets the optional parameter "queryPath": Specifies the +// guest attributes path to be queried. +func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { + c.urlParams_.Set("queryPath", queryPath) + return c +} + +// VariableKey sets the optional parameter "variableKey": Specifies the +// key for the guest attributes entry. +func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { + c.urlParams_.Set("variableKey", variableKey) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { +func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { +func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesInsertCall) Header() http.Header { +func (c *InstancesGetGuestAttributesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, 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.instancetemplate) - 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, "projects/{project}/global/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes") 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{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.insert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.instances.getGuestAttributes" call. +// Exactly one of *GuestAttributes or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *GuestAttributes.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -103608,7 +108170,7 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &GuestAttributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -103620,14 +108182,23 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", - // "flatPath": "projects/{project}/global/instanceTemplates", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.insert", + // "description": "Returns the specified guest attributes entry.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", + // "httpMethod": "GET", + // "id": "compute.instances.getGuestAttributes", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "instance" // ], // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -103635,134 +108206,253 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "queryPath": { + // "description": "Specifies the guest attributes path to be queried.", + // "location": "query", + // "type": "string" + // }, + // "variableKey": { + // "description": "Specifies the key for the guest attributes entry.", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/instanceTemplates", - // "request": { - // "$ref": "InstanceTemplate" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", // "response": { - // "$ref": "Operation" + // "$ref": "GuestAttributes" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceTemplates.list": +// method id "compute.instances.getIamPolicy": -type InstanceTemplatesListCall struct { +type InstancesGetIamPolicyCall struct { s *Service project string + zone string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of instance templates that are contained -// within the specified project. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // // - project: Project ID for this request. -func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { - c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { + c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.resource = resource return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag return c } -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall { + c.ctx_ = ctx return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.instances.getIamPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instances.getScreenshot": + +type InstancesGetScreenshotCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetScreenshot: Returns the screenshot from the specified instance. +// +// - instance: Name of the instance scoping this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) GetScreenshot(project string, zone string, instance string) *InstancesGetScreenshotCall { + c := &InstancesGetScreenshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { +func (c *InstancesGetScreenshotCall) Fields(s ...googleapi.Field) *InstancesGetScreenshotCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -103772,7 +108462,7 @@ func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTempla // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { +func (c *InstancesGetScreenshotCall) IfNoneMatch(entityTag string) *InstancesGetScreenshotCall { c.ifNoneMatch_ = entityTag return c } @@ -103780,21 +108470,21 @@ func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTempl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { +func (c *InstancesGetScreenshotCall) Context(ctx context.Context) *InstancesGetScreenshotCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesListCall) Header() http.Header { +func (c *InstancesGetScreenshotCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetScreenshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -103807,7 +108497,7 @@ func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/screenshot") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -103815,19 +108505,21 @@ func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.list" call. -// Exactly one of *InstanceTemplateList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { +// Do executes the "compute.instances.getScreenshot" call. +// Exactly one of *Screenshot or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Screenshot.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screenshot, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -103846,7 +108538,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplateList{ + ret := &Screenshot{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -103858,35 +108550,21 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } return ret, nil // { - // "description": "Retrieves a list of instance templates that are contained within the specified project.", - // "flatPath": "projects/{project}/global/instanceTemplates", + // "description": "Returns the screenshot from the specified instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", // "httpMethod": "GET", - // "id": "compute.instanceTemplates.list", + // "id": "compute.instances.getScreenshot", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "instance" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -103896,15 +108574,17 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/instanceTemplates", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", // "response": { - // "$ref": "InstanceTemplateList" + // "$ref": "Screenshot" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -103915,114 +108595,129 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } -// 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 *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) 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 "compute.instanceTemplates.setIamPolicy": +// method id "compute.instances.getSerialPortOutput": -type InstanceTemplatesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesGetSerialPortOutputCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// GetSerialPortOutput: Returns the last 1 MB of serial port output from +// the specified instance. // +// - instance: Name of the instance for this request. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { - c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { + c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + c.zone = zone + c.instance = instance + return c +} + +// Port sets the optional parameter "port": Specifies which COM or +// serial port to retrieve data from. +func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { + c.urlParams_.Set("port", fmt.Sprint(port)) + return c +} + +// Start sets the optional parameter "start": Specifies the starting +// byte position of the output to return. To start with the first byte +// of output to the specified port, omit this field or set it to `0`. If +// the output for that byte position is available, this field matches +// the `start` parameter sent with the request. If the amount of serial +// console output exceeds the size of the buffer (1 MB), the oldest +// output is discarded and is no longer available. If the requested +// start position refers to discarded output, the start position is +// adjusted to the oldest output still available, and the adjusted start +// position is returned as the `start` property value. You can also +// provide a negative start position, which translates to the most +// recent number of bytes written to the serial port. For example, -3 is +// interpreted as the most recent 3 bytes written to the serial console. +func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { + c.urlParams_.Set("start", fmt.Sprint(start)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesSetIamPolicyCall { +func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesSetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesSetIamPolicyCall { +func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { +func (c *InstancesGetSerialPortOutputCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, 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.globalsetpolicyrequest) - 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, "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/serialPort") 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{ "project": c.project, - "resource": c.resource, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.instances.getSerialPortOutput" call. +// Exactly one of *SerialPortOutput or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *SerialPortOutput.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -104041,7 +108736,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &SerialPortOutput{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -104053,15 +108748,32 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.setIamPolicy", + // "description": "Returns the last 1 MB of serial port output from the specified instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", + // "httpMethod": "GET", + // "id": "compute.instances.getSerialPortOutput", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "instance" // ], // "parameters": { + // "instance": { + // "description": "Name of the instance for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "port": { + // "default": "1", + // "description": "Specifies which COM or serial port to retrieve data from.", + // "format": "int32", + // "location": "query", + // "maximum": "4", + // "minimum": "1", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -104069,116 +108781,131 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "start": { + // "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", - // "request": { - // "$ref": "GlobalSetPolicyRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", // "response": { - // "$ref": "Policy" + // "$ref": "SerialPortOutput" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instanceTemplates.testIamPermissions": +// method id "compute.instances.getShieldedInstanceIdentity": -type InstanceTemplatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesGetShieldedInstanceIdentityCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity +// of an instance // +// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { - c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { + c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.zone = zone + c.instance = instance return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { +func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { +func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { +func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - 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, "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") 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{ "project": c.project, - "resource": c.resource, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// Do executes the "compute.instances.getShieldedInstanceIdentity" call. +// Exactly one of *ShieldedInstanceIdentity or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ShieldedInstanceIdentity.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -104197,7 +108924,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &ShieldedInstanceIdentity{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -104209,15 +108936,23 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.instanceTemplates.testIamPermissions", + // "description": "Returns the Shielded Instance Identity of an instance", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", + // "httpMethod": "GET", + // "id": "compute.instances.getShieldedInstanceIdentity", // "parameterOrder": [ // "project", - // "resource" + // "zone", + // "instance" // ], // "parameters": { + // "instance": { + // "description": "Name or id of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -104225,20 +108960,17 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "The name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "ShieldedInstanceIdentity" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -104249,96 +108981,84 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } -// method id "compute.instances.addAccessConfig": +// method id "compute.instances.getShieldedVmIdentity": -type InstancesAddAccessConfigCall struct { +type InstancesGetShieldedVmIdentityCall struct { s *Service project string zone string instance string - accessconfig *AccessConfig urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AddAccessConfig: Adds an access config to an instance's network -// interface. +// GetShieldedVmIdentity: Returns the Shielded VM Identity of an +// instance // -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to add to this -// instance. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { - c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance scoping this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) GetShieldedVmIdentity(project string, zone string, instance string) *InstancesGetShieldedVmIdentityCall { + c := &InstancesGetShieldedVmIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { - c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { +func (c *InstancesGetShieldedVmIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedVmIdentityCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetShieldedVmIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedVmIdentityCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { +func (c *InstancesGetShieldedVmIdentityCall) Context(ctx context.Context) *InstancesGetShieldedVmIdentityCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesAddAccessConfigCall) Header() http.Header { +func (c *InstancesGetShieldedVmIdentityCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Response, 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.accessconfig) - 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, "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -104351,14 +109071,14 @@ func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.addAccessConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instances.getShieldedVmIdentity" call. +// Exactly one of *ShieldedVmIdentity or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ShieldedVmIdentity.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedVmIdentity, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -104377,7 +109097,7 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ShieldedVmIdentity{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -104389,30 +109109,23 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds an access config to an instance's network interface.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", - // "httpMethod": "POST", - // "id": "compute.instances.addAccessConfig", + // "description": "Returns the Shielded VM Identity of an instance", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", + // "httpMethod": "GET", + // "id": "compute.instances.getShieldedVmIdentity", // "parameterOrder": [ // "project", // "zone", - // "instance", - // "networkInterface" + // "instance" // ], // "parameters": { // "instance": { - // "description": "The instance name for this request.", + // "description": "Name of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "networkInterface": { - // "description": "The name of the network interface to add to this instance.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -104420,11 +109133,6 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -104433,47 +109141,41 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", - // "request": { - // "$ref": "AccessConfig" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", // "response": { - // "$ref": "Operation" + // "$ref": "ShieldedVmIdentity" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instances.addResourcePolicies": +// method id "compute.instances.insert": -type InstancesAddResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesInsertCall struct { + s *Service + project string + zone string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddResourcePolicies: Adds existing resource policies to an instance. -// You can only add one policy right now which will be applied to this -// instance for scheduling live migrations. +// Insert: Creates an instance resource in the specified project using +// the data included in the request. // -// - instance: The instance name for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) AddResourcePolicies(project string, zone string, instance string, instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest) *InstancesAddResourcePoliciesCall { - c := &InstancesAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { + c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancesaddresourcepoliciesrequest = instancesaddresourcepoliciesrequest return c } @@ -104488,15 +109190,41 @@ func (r *InstancesService) AddResourcePolicies(project string, zone string, inst // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesAddResourcePoliciesCall) RequestId(requestId string) *InstancesAddResourcePoliciesCall { +func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { c.urlParams_.Set("requestId", requestId) return c } +// SourceInstanceTemplate sets the optional parameter +// "sourceInstanceTemplate": Specifies instance template to create the +// instance. This field is optional. It can be a full or partial URL. +// For example, the following are all valid URLs to an instance +// template: - https://www.googleapis.com/compute/v1/projects/project +// /global/instanceTemplates/instanceTemplate - +// projects/project/global/instanceTemplates/instanceTemplate - +// global/instanceTemplates/instanceTemplate +func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { + c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) + return c +} + +// SourceMachineImage sets the optional parameter "sourceMachineImage": +// Specifies the machine image to use to create the instance. This field +// is optional. It can be a full or partial URL. For example, the +// following are all valid URLs to a machine image: - +// https://www.googleapis.com/compute/v1/projects/project/global/global +// /machineImages/machineImage - +// projects/project/global/global/machineImages/machineImage - +// global/machineImages/machineImage +func (c *InstancesInsertCall) SourceMachineImage(sourceMachineImage string) *InstancesInsertCall { + c.urlParams_.Set("sourceMachineImage", sourceMachineImage) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesAddResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesAddResourcePoliciesCall { +func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -104504,21 +109232,21 @@ func (c *InstancesAddResourcePoliciesCall) Fields(s ...googleapi.Field) *Instanc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesAddResourcePoliciesCall) Context(ctx context.Context) *InstancesAddResourcePoliciesCall { +func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesAddResourcePoliciesCall) Header() http.Header { +func (c *InstancesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -104526,14 +109254,14 @@ func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesaddresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -104541,21 +109269,20 @@ func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.addResourcePolicies" call. +// Do executes the "compute.instances.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -104586,23 +109313,15 @@ func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", + // "description": "Creates an instance resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/instances", // "httpMethod": "POST", - // "id": "compute.instances.addResourcePolicies", + // "id": "compute.instances.insert", // "parameterOrder": [ // "project", - // "zone", - // "instance" + // "zone" // ], // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -104615,6 +109334,16 @@ func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Op // "location": "query", // "type": "string" // }, + // "sourceInstanceTemplate": { + // "description": "Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate ", + // "location": "query", + // "type": "string" + // }, + // "sourceMachineImage": { + // "description": "Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage ", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -104623,9 +109352,9 @@ func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Op // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", + // "path": "projects/{project}/zones/{zone}/instances", // "request": { - // "$ref": "InstancesAddResourcePoliciesRequest" + // "$ref": "Instance" // }, // "response": { // "$ref": "Operation" @@ -104638,26 +109367,27 @@ func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Op } -// method id "compute.instances.aggregatedList": +// method id "compute.instances.list": -type InstancesAggregatedListCall struct { +type InstancesListCall struct { s *Service project string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of all of the instances -// in your project across all regions and zones. The performance of this -// method degrades when a filter is specified on a project that has a -// very large number of instances. +// List: Retrieves the list of instances contained within the specified +// zone. // // - project: Project ID for this request. -func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { - c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) List(project string, zone string) *InstancesListCall { + c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone return c } @@ -104696,31 +109426,18 @@ func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedLi // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { +func (c *InstancesListCall) Filter(filter string) *InstancesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *InstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstancesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { +func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -104734,7 +109451,7 @@ func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAgg // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { +func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -104742,7 +109459,7 @@ func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregat // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { +func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -104751,7 +109468,7 @@ func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggr // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *InstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesAggregatedListCall { +func (c *InstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -104759,7 +109476,7 @@ func (c *InstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { +func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -104769,7 +109486,7 @@ func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAgg // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { +func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { c.ifNoneMatch_ = entityTag return c } @@ -104777,21 +109494,21 @@ func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAg // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { +func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesAggregatedListCall) Header() http.Header { +func (c *InstancesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -104804,7 +109521,7 @@ func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -104813,18 +109530,19 @@ func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, err req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.aggregatedList" call. -// Exactly one of *InstanceAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) { +// Do executes the "compute.instances.list" call. +// Exactly one of *InstanceList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *InstanceList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -104843,7 +109561,7 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceAggregatedList{ + ret := &InstanceList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -104855,12 +109573,13 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.", - // "flatPath": "projects/{project}/aggregated/instances", + // "description": "Retrieves the list of instances contained within the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/instances", // "httpMethod": "GET", - // "id": "compute.instances.aggregatedList", + // "id": "compute.instances.list", // "parameterOrder": [ - // "project" + // "project", + // "zone" // ], // "parameters": { // "filter": { @@ -104868,11 +109587,6 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -104902,11 +109616,18 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/instances", + // "path": "projects/{project}/zones/{zone}/instances", // "response": { - // "$ref": "InstanceAggregatedList" + // "$ref": "InstanceList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -104920,7 +109641,7 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc // 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 *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { +func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -104938,469 +109659,170 @@ func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*Instanc } } -// method id "compute.instances.attachDisk": +// method id "compute.instances.listReferrers": -type InstancesAttachDiskCall struct { +type InstancesListReferrersCall struct { s *Service project string zone string instance string - attacheddisk *AttachedDisk urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AttachDisk: Attaches an existing Disk resource to an instance. You -// must first create the disk before you can attach it. It is not -// possible to create and attach a disk at the same time. For more -// information, read Adding a persistent disk to your instance. +// ListReferrers: Retrieves a list of resources that refer to the VM +// instance specified in the request. For example, if the VM instance is +// part of a managed or unmanaged instance group, the referrers list +// includes the instance group. For more information, read Viewing +// referrers to VM instances. // -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { - c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the target instance scoping this request, or '-' +// if the request should span over all instances in the container. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { + c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.attacheddisk = attacheddisk - return c -} - -// ForceAttach sets the optional parameter "forceAttach": Whether to -// force attach the regional disk even if it's currently attached to -// another instance. If you try to force attach a zonal disk to an -// instance, you will receive an error. -func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { - c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { + c.urlParams_.Set("filter", filter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { - c.ctx_ = ctx +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesAttachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, 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.attacheddisk) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/attachDisk") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.attachDisk" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", - // "httpMethod": "POST", - // "id": "compute.instances.attachDisk", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "forceAttach": { - // "description": "Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.", - // "location": "query", - // "type": "boolean" - // }, - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", - // "request": { - // "$ref": "AttachedDisk" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.bulkInsert": - -type InstancesBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertinstanceresource *BulkInsertInstanceResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Creates multiple instances. Count specifies the number of -// instances to create. For more information, see About bulk creation of -// VMs. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) BulkInsert(project string, zone string, bulkinsertinstanceresource *BulkInsertInstanceResource) *InstancesBulkInsertCall { - c := &InstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.bulkinsertinstanceresource = bulkinsertinstanceresource +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { + c.urlParams_.Set("pageToken", pageToken) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesBulkInsertCall) RequestId(requestId string) *InstancesBulkInsertCall { - c.urlParams_.Set("requestId", requestId) +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstancesListReferrersCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListReferrersCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesBulkInsertCall) Fields(s ...googleapi.Field) *InstancesBulkInsertCall { +func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { 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 *InstancesBulkInsertCall) Context(ctx context.Context) *InstancesBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesBulkInsertCall) doRequest(alt string) (*http.Response, 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.bulkinsertinstanceresource) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/bulkInsert") - 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{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.bulkInsert" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", - // "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", - // "httpMethod": "POST", - // "id": "compute.instances.bulkInsert", - // "parameterOrder": [ - // "project", - // "zone" - // ], - // "parameters": { - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/zones/{zone}/instances/bulkInsert", - // "request": { - // "$ref": "BulkInsertInstanceResource" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.instances.delete": - -type InstancesDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Instance resource. For more -// information, see Deleting an instance. -// -// - instance: Name of the instance resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { + c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { +func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { +func (c *InstancesListReferrersCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, 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()) + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/referrers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -105413,14 +109835,14 @@ func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instances.listReferrers" call. +// Exactly one of *InstanceListReferrers or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceListReferrers.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -105439,7 +109861,7 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceListReferrers{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -105451,23 +109873,46 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified Instance resource. For more information, see Deleting an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - // "httpMethod": "DELETE", - // "id": "compute.instances.delete", + // "description": "Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/referrers", + // "httpMethod": "GET", + // "id": "compute.instances.listReferrers", // "parameterOrder": [ // "project", // "zone", // "instance" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, // "instance": { - // "description": "Name of the instance resource to delete.", + // "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -105475,10 +109920,10 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, // "zone": { // "description": "The name of the zone for this request.", @@ -105488,45 +109933,64 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/referrers", // "response": { - // "$ref": "Operation" + // "$ref": "InstanceListReferrers" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instances.deleteAccessConfig": +// 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 *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) 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 InstancesDeleteAccessConfigCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instances.removeResourcePolicies": + +type InstancesRemoveResourcePoliciesCall struct { + s *Service + project string + zone string + instance string + instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeleteAccessConfig: Deletes an access config from an instance's -// network interface. +// RemoveResourcePolicies: Removes resource policies from an instance. // -// - accessConfig: The name of the access config to delete. // - instance: The instance name for this request. -// - networkInterface: The name of the network interface. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { - c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) RemoveResourcePolicies(project string, zone string, instance string, instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest) *InstancesRemoveResourcePoliciesCall { + c := &InstancesRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("accessConfig", accessConfig) - c.urlParams_.Set("networkInterface", networkInterface) + c.instancesremoveresourcepoliciesrequest = instancesremoveresourcepoliciesrequest return c } @@ -105541,7 +110005,7 @@ func (r *InstancesService) DeleteAccessConfig(project string, zone string, insta // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { +func (c *InstancesRemoveResourcePoliciesCall) RequestId(requestId string) *InstancesRemoveResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -105549,7 +110013,7 @@ func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *Instances // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { +func (c *InstancesRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesRemoveResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -105557,21 +110021,21 @@ func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *Instance // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { +func (c *InstancesRemoveResourcePoliciesCall) Context(ctx context.Context) *InstancesRemoveResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesDeleteAccessConfigCall) Header() http.Header { +func (c *InstancesRemoveResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -105579,9 +110043,14 @@ func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesremoveresourcepoliciesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -105596,14 +110065,14 @@ func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.deleteAccessConfig" call. +// Do executes the "compute.instances.removeResourcePolicies" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -105634,24 +110103,16 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes an access config from an instance's network interface.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", + // "description": "Removes resource policies from an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", // "httpMethod": "POST", - // "id": "compute.instances.deleteAccessConfig", + // "id": "compute.instances.removeResourcePolicies", // "parameterOrder": [ // "project", // "zone", - // "instance", - // "accessConfig", - // "networkInterface" + // "instance" // ], // "parameters": { - // "accessConfig": { - // "description": "The name of the access config to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "instance": { // "description": "The instance name for this request.", // "location": "path", @@ -105659,12 +110120,6 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope // "required": true, // "type": "string" // }, - // "networkInterface": { - // "description": "The name of the network interface.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -105685,7 +110140,10 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", + // "request": { + // "$ref": "InstancesRemoveResourcePoliciesRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -105697,9 +110155,9 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.instances.detachDisk": +// method id "compute.instances.reset": -type InstancesDetachDiskCall struct { +type InstancesResetCall struct { s *Service project string zone string @@ -105709,20 +110167,18 @@ type InstancesDetachDiskCall struct { header_ http.Header } -// DetachDisk: Detaches a disk from an instance. +// Reset: Performs a reset on the instance. This is a hard reset. The VM +// does not do a graceful shutdown. For more information, see Resetting +// an instance. // -// - deviceName: The device name of the disk to detach. Make a get() -// request on the instance to view currently attached disks and device -// names. -// - instance: Instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { - c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance scoping this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { + c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("deviceName", deviceName) return c } @@ -105737,7 +110193,7 @@ func (r *InstancesService) DetachDisk(project string, zone string, instance stri // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { +func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { c.urlParams_.Set("requestId", requestId) return c } @@ -105745,7 +110201,7 @@ func (c *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { +func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -105753,21 +110209,21 @@ func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachD // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { +func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesDetachDiskCall) Header() http.Header { +func (c *InstancesResetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -105777,7 +110233,7 @@ func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/detachDisk") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reset") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -105792,14 +110248,14 @@ func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.detachDisk" call. +// Do executes the "compute.instances.reset" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -105830,25 +110286,18 @@ func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Detaches a disk from an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", + // "description": "Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reset", // "httpMethod": "POST", - // "id": "compute.instances.detachDisk", + // "id": "compute.instances.reset", // "parameterOrder": [ // "project", // "zone", - // "instance", - // "deviceName" + // "instance" // ], // "parameters": { - // "deviceName": { - // "description": "The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "instance": { - // "description": "Instance name for this request.", + // "description": "Name of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -105874,7 +110323,7 @@ func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/reset", // "response": { // "$ref": "Operation" // }, @@ -105886,83 +110335,93 @@ func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.instances.get": +// method id "compute.instances.resume": -type InstancesGetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesResumeCall struct { + s *Service + project string + zone string + instance string + instancesresumerequest *InstancesResumeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified Instance resource. +// Resume: Resumes an instance that was suspended using the +// instances().suspend method. // -// - instance: Name of the instance resource to return. +// - instance: Name of the instance resource to resume. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Resume(project string, zone string, instance string, instancesresumerequest *InstancesResumeRequest) *InstancesResumeCall { + c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.instancesresumerequest = instancesresumerequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesResumeCall) RequestId(requestId string) *InstancesResumeCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { +func (c *InstancesResumeCall) Fields(s ...googleapi.Field) *InstancesResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { +func (c *InstancesResumeCall) Context(ctx context.Context) *InstancesResumeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesGetCall) Header() http.Header { +func (c *InstancesResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, 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.instancesresumerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/resume") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -105975,14 +110434,14 @@ func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.get" call. -// Exactly one of *Instance or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Instance.ServerResponse.Header or (if a response was returned at +// Do executes the "compute.instances.resume" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { +func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -106001,7 +110460,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Instance{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -106013,10 +110472,10 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { } return ret, nil // { - // "description": "Returns the specified Instance resource.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - // "httpMethod": "GET", - // "id": "compute.instances.get", + // "description": "Resumes an instance that was suspended using the instances().suspend method.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/resume", + // "httpMethod": "POST", + // "id": "compute.instances.resume", // "parameterOrder": [ // "project", // "zone", @@ -106024,7 +110483,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { // ], // "parameters": { // "instance": { - // "description": "Name of the instance resource to return.", + // "description": "Name of the instance resource to resume.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -106037,188 +110496,9 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}", - // "response": { - // "$ref": "Instance" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.getEffectiveFirewalls": - -type InstancesGetEffectiveFirewallsCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveFirewalls: Returns effective firewalls applied to an -// interface of the instance. -// -// - instance: Name of the instance scoping this request. -// - networkInterface: The name of the network interface to get the -// effective firewalls. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetEffectiveFirewalls(project string, zone string, instance string, networkInterface string) *InstancesGetEffectiveFirewallsCall { - c := &InstancesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *InstancesGetEffectiveFirewallsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *InstancesGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetEffectiveFirewallsCall) Context(ctx context.Context) *InstancesGetEffectiveFirewallsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetEffectiveFirewallsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getEffectiveFirewalls" call. -// Exactly one of *InstancesGetEffectiveFirewallsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *InstancesGetEffectiveFirewallsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*InstancesGetEffectiveFirewallsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &InstancesGetEffectiveFirewallsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns effective firewalls applied to an interface of the instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", - // "httpMethod": "GET", - // "id": "compute.instances.getEffectiveFirewalls", - // "parameterOrder": [ - // "project", - // "zone", - // "instance", - // "networkInterface" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface to get the effective firewalls.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, // "type": "string" // }, // "zone": { @@ -106229,110 +110509,84 @@ func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/resume", + // "request": { + // "$ref": "InstancesResumeRequest" + // }, // "response": { - // "$ref": "InstancesGetEffectiveFirewallsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instances.getGuestAttributes": +// method id "compute.instances.sendDiagnosticInterrupt": -type InstancesGetGuestAttributesCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesSendDiagnosticInterruptCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetGuestAttributes: Returns the specified guest attributes entry. +// SendDiagnosticInterrupt: Sends diagnostic interrupt to the instance. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { - c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SendDiagnosticInterrupt(project string, zone string, instance string) *InstancesSendDiagnosticInterruptCall { + c := &InstancesSendDiagnosticInterruptCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance return c } -// QueryPath sets the optional parameter "queryPath": Specifies the -// guest attributes path to be queried. -func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("queryPath", queryPath) - return c -} - -// VariableKey sets the optional parameter "variableKey": Specifies the -// key for the guest attributes entry. -func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("variableKey", variableKey) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { +func (c *InstancesSendDiagnosticInterruptCall) Fields(s ...googleapi.Field) *InstancesSendDiagnosticInterruptCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { +func (c *InstancesSendDiagnosticInterruptCall) Context(ctx context.Context) *InstancesSendDiagnosticInterruptCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesGetGuestAttributesCall) Header() http.Header { +func (c *InstancesSendDiagnosticInterruptCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -106345,48 +110599,23 @@ func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getGuestAttributes" call. -// Exactly one of *GuestAttributes or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *GuestAttributes.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, error) { +// Do executes the "compute.instances.sendDiagnosticInterrupt" call. +func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } if err != nil { - return nil, err + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GuestAttributes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil // { - // "description": "Returns the specified guest attributes entry.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - // "httpMethod": "GET", - // "id": "compute.instances.getGuestAttributes", + // "description": "Sends diagnostic interrupt to the instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", + // "httpMethod": "POST", + // "id": "compute.instances.sendDiagnosticInterrupt", // "parameterOrder": [ // "project", // "zone", @@ -106407,16 +110636,6 @@ func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*Gue // "required": true, // "type": "string" // }, - // "queryPath": { - // "description": "Specifies the guest attributes path to be queried.", - // "location": "query", - // "type": "string" - // }, - // "variableKey": { - // "description": "Specifies the key for the guest attributes entry.", - // "location": "query", - // "type": "string" - // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -106425,104 +110644,101 @@ func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*Gue // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - // "response": { - // "$ref": "GuestAttributes" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instances.getIamPolicy": +// method id "compute.instances.setDeletionProtection": -type InstancesGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesSetDeletionProtectionCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// SetDeletionProtection: Sets deletion protection on the instance. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { - c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { + c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.resource = resource return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// DeletionProtection sets the optional parameter "deletionProtection": +// Whether the resource should be protected against deletion. +func (c *InstancesSetDeletionProtectionCall) DeletionProtection(deletionProtection bool) *InstancesSetDeletionProtectionCall { + c.urlParams_.Set("deletionProtection", fmt.Sprint(deletionProtection)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesSetDeletionProtectionCall) RequestId(requestId string) *InstancesSetDeletionProtectionCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall { +func (c *InstancesSetDeletionProtectionCall) Fields(s ...googleapi.Field) *InstancesSetDeletionProtectionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall { +func (c *InstancesSetDeletionProtectionCall) Context(ctx context.Context) *InstancesSetDeletionProtectionCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesGetIamPolicyCall) Header() http.Header { +func (c *InstancesSetDeletionProtectionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -106535,14 +110751,14 @@ func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.instances.setDeletionProtection" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -106561,7 +110777,7 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -106573,21 +110789,21 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", - // "httpMethod": "GET", - // "id": "compute.instances.getIamPolicy", + // "description": "Sets deletion protection on the instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", + // "httpMethod": "POST", + // "id": "compute.instances.setDeletionProtection", // "parameterOrder": [ // "project", // "zone", // "resource" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", + // "deletionProtection": { + // "default": "true", + // "description": "Whether the resource should be protected against deletion.", // "location": "query", - // "type": "integer" + // "type": "boolean" // }, // "project": { // "description": "Project ID for this request.", @@ -106596,185 +110812,18 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // } - // }, - // "path": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" - // ] - // } - -} - -// method id "compute.instances.getScreenshot": - -type InstancesGetScreenshotCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetScreenshot: Returns the screenshot from the specified instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetScreenshot(project string, zone string, instance string) *InstancesGetScreenshotCall { - c := &InstancesGetScreenshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *InstancesGetScreenshotCall) Fields(s ...googleapi.Field) *InstancesGetScreenshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetScreenshotCall) IfNoneMatch(entityTag string) *InstancesGetScreenshotCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *InstancesGetScreenshotCall) Context(ctx context.Context) *InstancesGetScreenshotCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *InstancesGetScreenshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetScreenshotCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instances/{instance}/screenshot") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getScreenshot" call. -// Exactly one of *Screenshot or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Screenshot.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screenshot, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Screenshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the screenshot from the specified instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", - // "httpMethod": "GET", - // "id": "compute.instances.getScreenshot", - // "parameterOrder": [ - // "project", - // "zone", - // "instance" - // ], - // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -106783,122 +110832,105 @@ func (c *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screensh // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", + // "path": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", // "response": { - // "$ref": "Screenshot" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instances.getSerialPortOutput": +// method id "compute.instances.setDiskAutoDelete": -type InstancesGetSerialPortOutputCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesSetDiskAutoDeleteCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSerialPortOutput: Returns the last 1 MB of serial port output from -// the specified instance. +// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to +// an instance. // -// - instance: Name of the instance for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { - c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - autoDelete: Whether to auto-delete the disk when the instance is +// deleted. +// - deviceName: The device name of the disk to modify. Make a get() +// request on the instance to view currently attached disks and device +// names. +// - instance: The instance name for this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { + c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) + c.urlParams_.Set("deviceName", deviceName) return c } -// Port sets the optional parameter "port": Specifies which COM or -// serial port to retrieve data from. -func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("port", fmt.Sprint(port)) - return c -} - -// Start sets the optional parameter "start": Specifies the starting -// byte position of the output to return. To start with the first byte -// of output to the specified port, omit this field or set it to `0`. If -// the output for that byte position is available, this field matches -// the `start` parameter sent with the request. If the amount of serial -// console output exceeds the size of the buffer (1 MB), the oldest -// output is discarded and is no longer available. If the requested -// start position refers to discarded output, the start position is -// adjusted to the oldest output still available, and the adjusted start -// position is returned as the `start` property value. You can also -// provide a negative start position, which translates to the most -// recent number of bytes written to the serial port. For example, -3 is -// interpreted as the most recent 3 bytes written to the serial console. -func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("start", fmt.Sprint(start)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { +func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { +func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesGetSerialPortOutputCall) Header() http.Header { +func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/zones/{zone}/instances/{instance}/serialPort") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -106911,14 +110943,14 @@ func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getSerialPortOutput" call. -// Exactly one of *SerialPortOutput or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *SerialPortOutput.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) { +// Do executes the "compute.instances.setDiskAutoDelete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -106937,7 +110969,7 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SerialPortOutput{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -106949,32 +110981,38 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se } return ret, nil // { - // "description": "Returns the last 1 MB of serial port output from the specified instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", - // "httpMethod": "GET", - // "id": "compute.instances.getSerialPortOutput", + // "description": "Sets the auto-delete flag for a disk attached to an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", + // "httpMethod": "POST", + // "id": "compute.instances.setDiskAutoDelete", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "instance", + // "autoDelete", + // "deviceName" // ], // "parameters": { + // "autoDelete": { + // "description": "Whether to auto-delete the disk when the instance is deleted.", + // "location": "query", + // "required": true, + // "type": "boolean" + // }, + // "deviceName": { + // "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.", + // "location": "query", + // "pattern": "\\w[\\w.-]{0,254}", + // "required": true, + // "type": "string" + // }, // "instance": { - // "description": "Name of the instance for this request.", + // "description": "The instance name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "port": { - // "default": "1", - // "description": "Specifies which COM or serial port to retrieve data from.", - // "format": "int32", - // "location": "query", - // "maximum": "4", - // "minimum": "1", - // "type": "integer" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -106982,9 +111020,8 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se // "required": true, // "type": "string" // }, - // "start": { - // "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.", - // "format": "int64", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // }, @@ -106996,97 +111033,89 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", // "response": { - // "$ref": "SerialPortOutput" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instances.getShieldedInstanceIdentity": +// method id "compute.instances.setIamPolicy": -type InstancesGetShieldedInstanceIdentityCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity -// of an instance +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // -// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { - c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { + c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { +func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { +func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { +func (c *InstancesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.zonesetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -107094,19 +111123,19 @@ func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http. googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getShieldedInstanceIdentity" call. -// Exactly one of *ShieldedInstanceIdentity or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ShieldedInstanceIdentity.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, error) { +// Do executes the "compute.instances.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107125,7 +111154,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ShieldedInstanceIdentity{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -107137,27 +111166,27 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns the Shielded Instance Identity of an instance", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", - // "httpMethod": "GET", - // "id": "compute.instances.getShieldedInstanceIdentity", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.instances.setIamPolicy", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "resource" // ], // "parameters": { - // "instance": { - // "description": "Name or id of the instance scoping this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -107169,97 +111198,108 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", + // "path": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", + // "request": { + // "$ref": "ZoneSetPolicyRequest" + // }, // "response": { - // "$ref": "ShieldedInstanceIdentity" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instances.getShieldedVmIdentity": +// method id "compute.instances.setLabels": -type InstancesGetShieldedVmIdentityCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesSetLabelsCall struct { + s *Service + project string + zone string + instance string + instancessetlabelsrequest *InstancesSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetShieldedVmIdentity: Returns the Shielded VM Identity of an -// instance +// SetLabels: Sets labels on an instance. To learn more about labels, +// read the Labeling Resources documentation. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetShieldedVmIdentity(project string, zone string, instance string) *InstancesGetShieldedVmIdentityCall { - c := &InstancesGetShieldedVmIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { + c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.instancessetlabelsrequest = instancessetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesGetShieldedVmIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedVmIdentityCall { +func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesGetShieldedVmIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedVmIdentityCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesGetShieldedVmIdentityCall) Context(ctx context.Context) *InstancesGetShieldedVmIdentityCall { +func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesGetShieldedVmIdentityCall) Header() http.Header { +func (c *InstancesSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, 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.instancessetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -107272,14 +111312,14 @@ func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getShieldedVmIdentity" call. -// Exactly one of *ShieldedVmIdentity or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ShieldedVmIdentity.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedVmIdentity, error) { +// Do executes the "compute.instances.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107298,7 +111338,7 @@ func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ShieldedVmIdentity{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -107310,10 +111350,10 @@ func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns the Shielded VM Identity of an instance", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", - // "httpMethod": "GET", - // "id": "compute.instances.getShieldedVmIdentity", + // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", + // "httpMethod": "POST", + // "id": "compute.instances.setLabels", // "parameterOrder": [ // "project", // "zone", @@ -107334,6 +111374,11 @@ func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (* // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -107342,41 +111387,46 @@ func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", + // "request": { + // "$ref": "InstancesSetLabelsRequest" + // }, // "response": { - // "$ref": "ShieldedVmIdentity" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.instances.insert": +// method id "compute.instances.setMachineResources": -type InstancesInsertCall struct { - s *Service - project string - zone string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetMachineResourcesCall struct { + s *Service + project string + zone string + instance string + instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an instance resource in the specified project using -// the data included in the request. +// SetMachineResources: Changes the number and/or type of accelerator +// for a stopped instance to the values specified in the request. // +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { + c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest return c } @@ -107391,41 +111441,15 @@ func (r *InstancesService) Insert(project string, zone string, instance *Instanc // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { +func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { c.urlParams_.Set("requestId", requestId) return c } -// SourceInstanceTemplate sets the optional parameter -// "sourceInstanceTemplate": Specifies instance template to create the -// instance. This field is optional. It can be a full or partial URL. -// For example, the following are all valid URLs to an instance -// template: - https://www.googleapis.com/compute/v1/projects/project -// /global/instanceTemplates/instanceTemplate - -// projects/project/global/instanceTemplates/instanceTemplate - -// global/instanceTemplates/instanceTemplate -func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { - c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) - return c -} - -// SourceMachineImage sets the optional parameter "sourceMachineImage": -// Specifies the machine image to use to create the instance. This field -// is optional. It can be a full or partial URL. For example, the -// following are all valid URLs to a machine image: - -// https://www.googleapis.com/compute/v1/projects/project/global/global -// /machineImages/machineImage - -// projects/project/global/global/machineImages/machineImage - -// global/machineImages/machineImage -func (c *InstancesInsertCall) SourceMachineImage(sourceMachineImage string) *InstancesInsertCall { - c.urlParams_.Set("sourceMachineImage", sourceMachineImage) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { +func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -107433,21 +111457,21 @@ func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { +func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesInsertCall) Header() http.Header { +func (c *InstancesSetMachineResourcesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -107455,14 +111479,14 @@ func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -107470,20 +111494,21 @@ func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.insert" call. +// Do executes the "compute.instances.setMachineResources" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107514,15 +111539,23 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an instance resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/instances", + // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", // "httpMethod": "POST", - // "id": "compute.instances.insert", + // "id": "compute.instances.setMachineResources", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "instance" // ], // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -107535,16 +111568,6 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "location": "query", // "type": "string" // }, - // "sourceInstanceTemplate": { - // "description": "Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate ", - // "location": "query", - // "type": "string" - // }, - // "sourceMachineImage": { - // "description": "Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage ", - // "location": "query", - // "type": "string" - // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -107553,9 +111576,9 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", // "request": { - // "$ref": "Instance" + // "$ref": "InstancesSetMachineResourcesRequest" // }, // "response": { // "$ref": "Operation" @@ -107568,182 +111591,113 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.instances.list": +// method id "compute.instances.setMachineType": -type InstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesSetMachineTypeCall struct { + s *Service + project string + zone string + instance string + instancessetmachinetyperequest *InstancesSetMachineTypeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of instances contained within the specified -// zone. +// SetMachineType: Changes the machine type for a stopped instance to +// the machine type specified in the request. // +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) List(project string, zone string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { + c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.instance = instance + c.instancessetmachinetyperequest = instancessetmachinetyperequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { +func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { +func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesListCall) Header() http.Header { +func (c *InstancesSetMachineTypeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, 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.instancessetmachinetyperequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineType") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.list" call. -// Exactly one of *InstanceList or error will be non-nil. Any non-2xx +// Do executes the "compute.instances.setMachineType" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *InstanceList.ServerResponse.Header or (if a response was returned at +// *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) { +func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107762,7 +111716,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -107774,36 +111728,21 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err } return ret, nil // { - // "description": "Retrieves the list of instances contained within the specified zone.", - // "flatPath": "projects/{project}/zones/{zone}/instances", - // "httpMethod": "GET", - // "id": "compute.instances.list", + // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", + // "httpMethod": "POST", + // "id": "compute.instances.setMachineType", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "instance" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -107813,10 +111752,10 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { // "description": "The name of the zone for this request.", @@ -107826,204 +111765,108 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", + // "request": { + // "$ref": "InstancesSetMachineTypeRequest" + // }, // "response": { - // "$ref": "InstanceList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) 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 "compute.instances.listReferrers": +// method id "compute.instances.setMetadata": -type InstancesListReferrersCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesSetMetadataCall struct { + s *Service + project string + zone string + instance string + metadata *Metadata + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListReferrers: Retrieves a list of resources that refer to the VM -// instance specified in the request. For example, if the VM instance is -// part of a managed or unmanaged instance group, the referrers list -// includes the instance group. For more information, read Viewing -// referrers to VM instances. +// SetMetadata: Sets metadata for the specified instance to the data +// included in the request. // -// - instance: Name of the target instance scoping this request, or '-' -// if the request should span over all instances in the container. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { - c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance scoping this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { + c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.metadata = metadata return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *InstancesListReferrersCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListReferrersCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { +func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { +func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesListReferrersCall) Header() http.Header { +func (c *InstancesSetMetadataCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, 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.metadata) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/referrers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMetadata") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -108036,14 +111879,14 @@ func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.listReferrers" call. -// Exactly one of *InstanceListReferrers or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceListReferrers.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, error) { +// Do executes the "compute.instances.setMetadata" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -108062,7 +111905,7 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceListReferrers{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -108074,46 +111917,23 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance } return ret, nil // { - // "description": "Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/referrers", - // "httpMethod": "GET", - // "id": "compute.instances.listReferrers", + // "description": "Sets metadata for the specified instance to the data included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", + // "httpMethod": "POST", + // "id": "compute.instances.setMetadata", // "parameterOrder": [ // "project", // "zone", // "instance" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, // "instance": { - // "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.", + // "description": "Name of the instance scoping this request.", // "location": "path", - // "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -108121,10 +111941,10 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { // "description": "The name of the zone for this request.", @@ -108134,64 +111954,48 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/referrers", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", + // "request": { + // "$ref": "Metadata" + // }, // "response": { - // "$ref": "InstanceListReferrers" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) 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 "compute.instances.removeResourcePolicies": +// method id "compute.instances.setMinCpuPlatform": -type InstancesRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetMinCpuPlatformCall struct { + s *Service + project string + zone string + instance string + instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from an instance. +// SetMinCpuPlatform: Changes the minimum CPU platform that this +// instance should use. This method can only be called on a stopped +// instance. For more information, read Specifying a Minimum CPU +// Platform. // -// - instance: The instance name for this request. +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) RemoveResourcePolicies(project string, zone string, instance string, instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest) *InstancesRemoveResourcePoliciesCall { - c := &InstancesRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { + c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancesremoveresourcepoliciesrequest = instancesremoveresourcepoliciesrequest + c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest return c } @@ -108206,7 +112010,7 @@ func (r *InstancesService) RemoveResourcePolicies(project string, zone string, i // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesRemoveResourcePoliciesCall) RequestId(requestId string) *InstancesRemoveResourcePoliciesCall { +func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { c.urlParams_.Set("requestId", requestId) return c } @@ -108214,7 +112018,7 @@ func (c *InstancesRemoveResourcePoliciesCall) RequestId(requestId string) *Insta // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesRemoveResourcePoliciesCall { +func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -108222,21 +112026,21 @@ func (c *InstancesRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *Inst // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesRemoveResourcePoliciesCall) Context(ctx context.Context) *InstancesRemoveResourcePoliciesCall { +func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesRemoveResourcePoliciesCall) Header() http.Header { +func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -108244,14 +112048,14 @@ func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesremoveresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmincpuplatformrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -108266,14 +112070,14 @@ func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.removeResourcePolicies" call. +// Do executes the "compute.instances.setMinCpuPlatform" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -108304,10 +112108,10 @@ func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Removes resource policies from an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", + // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", // "httpMethod": "POST", - // "id": "compute.instances.removeResourcePolicies", + // "id": "compute.instances.setMinCpuPlatform", // "parameterOrder": [ // "project", // "zone", @@ -108315,7 +112119,7 @@ func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "instance": { - // "description": "The instance name for this request.", + // "description": "Name of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -108341,9 +112145,9 @@ func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", // "request": { - // "$ref": "InstancesRemoveResourcePoliciesRequest" + // "$ref": "InstancesSetMinCpuPlatformRequest" // }, // "response": { // "$ref": "Operation" @@ -108356,30 +112160,30 @@ func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) ( } -// method id "compute.instances.reset": +// method id "compute.instances.setName": -type InstancesResetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetNameCall struct { + s *Service + project string + zone string + instance string + instancessetnamerequest *InstancesSetNameRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Reset: Performs a reset on the instance. This is a hard reset. The VM -// does not do a graceful shutdown. For more information, see Resetting -// an instance. +// SetName: Sets name of an instance. // -// - instance: Name of the instance scoping this request. +// - instance: The instance name for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { - c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetName(project string, zone string, instance string, instancessetnamerequest *InstancesSetNameRequest) *InstancesSetNameCall { + c := &InstancesSetNameCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.instancessetnamerequest = instancessetnamerequest return c } @@ -108394,7 +112198,7 @@ func (r *InstancesService) Reset(project string, zone string, instance string) * // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { +func (c *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall { c.urlParams_.Set("requestId", requestId) return c } @@ -108402,7 +112206,7 @@ func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { +func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -108410,21 +112214,21 @@ func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { +func (c *InstancesSetNameCall) Context(ctx context.Context) *InstancesSetNameCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesResetCall) Header() http.Header { +func (c *InstancesSetNameCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -108432,9 +112236,14 @@ func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetnamerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reset") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setName") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -108449,14 +112258,14 @@ func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.reset" call. +// Do executes the "compute.instances.setName" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -108487,10 +112296,10 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reset", + // "description": "Sets name of an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setName", // "httpMethod": "POST", - // "id": "compute.instances.reset", + // "id": "compute.instances.setName", // "parameterOrder": [ // "project", // "zone", @@ -108498,7 +112307,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error // ], // "parameters": { // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "The instance name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -108524,7 +112333,10 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/reset", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setName", + // "request": { + // "$ref": "InstancesSetNameRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -108536,31 +112348,35 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } -// method id "compute.instances.resume": +// method id "compute.instances.setScheduling": -type InstancesResumeCall struct { - s *Service - project string - zone string - instance string - instancesresumerequest *InstancesResumeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetSchedulingCall struct { + s *Service + project string + zone string + instance string + scheduling *Scheduling + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resume: Resumes an instance that was suspended using the -// instances().suspend method. +// SetScheduling: Sets an instance's scheduling options. You can only +// call this method on a stopped instance, that is, a VM instance that +// is in a `TERMINATED` state. See Instance Life Cycle for more +// information on the possible instance states. For more information +// about setting scheduling options for a VM, see Set VM host +// maintenance policy. // -// - instance: Name of the instance resource to resume. +// - instance: Instance name for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Resume(project string, zone string, instance string, instancesresumerequest *InstancesResumeRequest) *InstancesResumeCall { - c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { + c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancesresumerequest = instancesresumerequest + c.scheduling = scheduling return c } @@ -108575,7 +112391,7 @@ func (r *InstancesService) Resume(project string, zone string, instance string, // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesResumeCall) RequestId(requestId string) *InstancesResumeCall { +func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { c.urlParams_.Set("requestId", requestId) return c } @@ -108583,7 +112399,7 @@ func (c *InstancesResumeCall) RequestId(requestId string) *InstancesResumeCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesResumeCall) Fields(s ...googleapi.Field) *InstancesResumeCall { +func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -108591,21 +112407,21 @@ func (c *InstancesResumeCall) Fields(s ...googleapi.Field) *InstancesResumeCall // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesResumeCall) Context(ctx context.Context) *InstancesResumeCall { +func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesResumeCall) Header() http.Header { +func (c *InstancesSetSchedulingCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -108613,14 +112429,14 @@ func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesresumerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setScheduling") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -108635,14 +112451,14 @@ func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.resume" call. +// Do executes the "compute.instances.setScheduling" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -108673,10 +112489,10 @@ func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Resumes an instance that was suspended using the instances().suspend method.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/resume", + // "description": "Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", // "httpMethod": "POST", - // "id": "compute.instances.resume", + // "id": "compute.instances.setScheduling", // "parameterOrder": [ // "project", // "zone", @@ -108684,7 +112500,7 @@ func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, erro // ], // "parameters": { // "instance": { - // "description": "Name of the instance resource to resume.", + // "description": "Instance name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -108710,9 +112526,9 @@ func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/resume", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", // "request": { - // "$ref": "InstancesResumeRequest" + // "$ref": "Scheduling" // }, // "response": { // "$ref": "Operation" @@ -108725,35 +112541,56 @@ func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.instances.sendDiagnosticInterrupt": +// method id "compute.instances.setSecurityPolicy": -type InstancesSendDiagnosticInterruptCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetSecurityPolicyCall struct { + s *Service + project string + zone string + instance string + instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SendDiagnosticInterrupt: Sends diagnostic interrupt to the instance. +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified instance. For more information, see Google Cloud Armor +// Overview // -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SendDiagnosticInterrupt(project string, zone string, instance string) *InstancesSendDiagnosticInterruptCall { - c := &InstancesSendDiagnosticInterruptCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the Instance resource to which the security +// policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - zone: Name of the zone scoping this request. +func (r *InstancesService) SetSecurityPolicy(project string, zone string, instance string, instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest) *InstancesSetSecurityPolicyCall { + c := &InstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.instancessetsecuritypolicyrequest = instancessetsecuritypolicyrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesSetSecurityPolicyCall) RequestId(requestId string) *InstancesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSendDiagnosticInterruptCall) Fields(s ...googleapi.Field) *InstancesSendDiagnosticInterruptCall { +func (c *InstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetSecurityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -108761,21 +112598,21 @@ func (c *InstancesSendDiagnosticInterruptCall) Fields(s ...googleapi.Field) *Ins // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSendDiagnosticInterruptCall) Context(ctx context.Context) *InstancesSendDiagnosticInterruptCall { +func (c *InstancesSetSecurityPolicyCall) Context(ctx context.Context) *InstancesSetSecurityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSendDiagnosticInterruptCall) Header() http.Header { +func (c *InstancesSetSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -108783,9 +112620,14 @@ func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetsecuritypolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -108800,23 +112642,48 @@ func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.sendDiagnosticInterrupt" call. -func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "compute.instances.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } if err != nil { - return err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil // { - // "description": "Sends diagnostic interrupt to the instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", + // "description": "Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", // "httpMethod": "POST", - // "id": "compute.instances.sendDiagnosticInterrupt", + // "id": "compute.instances.setSecurityPolicy", // "parameterOrder": [ // "project", // "zone", @@ -108824,9 +112691,8 @@ func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -108837,15 +112703,26 @@ func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { - // "description": "The name of the zone for this request.", + // "description": "Name of the zone scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", + // "request": { + // "$ref": "InstancesSetSecurityPolicyRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/compute" @@ -108854,35 +112731,32 @@ func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) } -// method id "compute.instances.setDeletionProtection": +// method id "compute.instances.setServiceAccount": -type InstancesSetDeletionProtectionCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetServiceAccountCall struct { + s *Service + project string + zone string + instance string + instancessetserviceaccountrequest *InstancesSetServiceAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetDeletionProtection: Sets deletion protection on the instance. +// SetServiceAccount: Sets the service account on the instance. For more +// information, read Changing the service account and access scopes for +// an instance. // +// - instance: Name of the instance resource to start. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { - c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { + c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - return c -} - -// DeletionProtection sets the optional parameter "deletionProtection": -// Whether the resource should be protected against deletion. -func (c *InstancesSetDeletionProtectionCall) DeletionProtection(deletionProtection bool) *InstancesSetDeletionProtectionCall { - c.urlParams_.Set("deletionProtection", fmt.Sprint(deletionProtection)) + c.instance = instance + c.instancessetserviceaccountrequest = instancessetserviceaccountrequest return c } @@ -108897,7 +112771,7 @@ func (c *InstancesSetDeletionProtectionCall) DeletionProtection(deletionProtecti // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetDeletionProtectionCall) RequestId(requestId string) *InstancesSetDeletionProtectionCall { +func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { c.urlParams_.Set("requestId", requestId) return c } @@ -108905,7 +112779,7 @@ func (c *InstancesSetDeletionProtectionCall) RequestId(requestId string) *Instan // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetDeletionProtectionCall) Fields(s ...googleapi.Field) *InstancesSetDeletionProtectionCall { +func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -108913,21 +112787,21 @@ func (c *InstancesSetDeletionProtectionCall) Fields(s ...googleapi.Field) *Insta // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetDeletionProtectionCall) Context(ctx context.Context) *InstancesSetDeletionProtectionCall { +func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetDeletionProtectionCall) Header() http.Header { +func (c *InstancesSetServiceAccountCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -108935,9 +112809,14 @@ func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -108947,19 +112826,19 @@ func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Respon googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setDeletionProtection" call. +// Do executes the "compute.instances.setServiceAccount" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -108990,21 +112869,22 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets deletion protection on the instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", + // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", // "httpMethod": "POST", - // "id": "compute.instances.setDeletionProtection", + // "id": "compute.instances.setServiceAccount", // "parameterOrder": [ // "project", // "zone", - // "resource" + // "instance" // ], // "parameters": { - // "deletionProtection": { - // "default": "true", - // "description": "Whether the resource should be protected against deletion.", - // "location": "query", - // "type": "boolean" + // "instance": { + // "description": "Name of the instance resource to start.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -109018,13 +112898,6 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* // "location": "query", // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -109033,7 +112906,10 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", + // "request": { + // "$ref": "InstancesSetServiceAccountRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -109045,36 +112921,33 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* } -// method id "compute.instances.setDiskAutoDelete": +// method id "compute.instances.setShieldedInstanceIntegrityPolicy": -type InstancesSetDiskAutoDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetShieldedInstanceIntegrityPolicyCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to -// an instance. +// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance +// integrity policy for an instance. You can only use this method on a +// running instance. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. // -// - autoDelete: Whether to auto-delete the disk when the instance is -// deleted. -// - deviceName: The device name of the disk to modify. Make a get() -// request on the instance to view currently attached disks and device -// names. -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { - c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name or id of the instance scoping this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) - c.urlParams_.Set("deviceName", deviceName) + c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy return c } @@ -109089,7 +112962,7 @@ func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instan // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -109097,7 +112970,7 @@ func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -109105,21 +112978,21 @@ func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *Instances // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -109127,11 +113000,16 @@ func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -109144,14 +113022,14 @@ func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setDiskAutoDelete" call. +// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -109182,33 +113060,18 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the auto-delete flag for a disk attached to an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - // "httpMethod": "POST", - // "id": "compute.instances.setDiskAutoDelete", + // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + // "httpMethod": "PATCH", + // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", // "parameterOrder": [ // "project", // "zone", - // "instance", - // "autoDelete", - // "deviceName" + // "instance" // ], // "parameters": { - // "autoDelete": { - // "description": "Whether to auto-delete the disk when the instance is deleted.", - // "location": "query", - // "required": true, - // "type": "boolean" - // }, - // "deviceName": { - // "description": "The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.", - // "location": "query", - // "pattern": "\\w[\\w.-]{0,254}", - // "required": true, - // "type": "string" - // }, // "instance": { - // "description": "The instance name for this request.", + // "description": "Name or id of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -109234,7 +113097,10 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + // "request": { + // "$ref": "ShieldedInstanceIntegrityPolicy" + // }, // "response": { // "$ref": "Operation" // }, @@ -109246,38 +113112,56 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.instances.setIamPolicy": +// method id "compute.instances.setShieldedVmIntegrityPolicy": -type InstancesSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetShieldedVmIntegrityPolicyCall struct { + s *Service + project string + zone string + instance string + shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// SetShieldedVmIntegrityPolicy: Sets the Shielded VM integrity policy +// for a VM instance. You can only use this method on a running VM +// instance. This method supports PATCH semantics and uses the JSON +// merge patch format and processing rules. // +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { - c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetShieldedVmIntegrityPolicy(project string, zone string, instance string, shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy) *InstancesSetShieldedVmIntegrityPolicyCall { + c := &InstancesSetShieldedVmIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest + c.instance = instance + c.shieldedvmintegritypolicy = shieldedvmintegritypolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesSetShieldedVmIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedVmIntegrityPolicyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall { +func (c *InstancesSetShieldedVmIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedVmIntegrityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -109285,21 +113169,21 @@ func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall { +func (c *InstancesSetShieldedVmIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedVmIntegrityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetIamPolicyCall) Header() http.Header { +func (c *InstancesSetShieldedVmIntegrityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -109307,16 +113191,16 @@ func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedvmintegritypolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -109324,19 +113208,19 @@ func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.instances.setShieldedVmIntegrityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -109355,7 +113239,7 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -109367,16 +113251,23 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", - // "httpMethod": "POST", - // "id": "compute.instances.setIamPolicy", + // "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", + // "httpMethod": "PATCH", + // "id": "compute.instances.setShieldedVmIntegrityPolicy", // "parameterOrder": [ // "project", // "zone", - // "resource" + // "instance" // ], // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -109384,11 +113275,9 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // }, // "zone": { @@ -109399,12 +113288,12 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", // "request": { - // "$ref": "ZoneSetPolicyRequest" + // "$ref": "ShieldedVmIntegrityPolicy" // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -109414,31 +113303,31 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } -// method id "compute.instances.setLabels": +// method id "compute.instances.setTags": -type InstancesSetLabelsCall struct { - s *Service - project string - zone string - instance string - instancessetlabelsrequest *InstancesSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetTagsCall struct { + s *Service + project string + zone string + instance string + tags *Tags + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets labels on an instance. To learn more about labels, -// read the Labeling Resources documentation. +// SetTags: Sets network tags for the specified instance to the data +// included in the request. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { - c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { + c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetlabelsrequest = instancessetlabelsrequest + c.tags = tags return c } @@ -109453,7 +113342,7 @@ func (r *InstancesService) SetLabels(project string, zone string, instance strin // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { +func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -109461,7 +113350,7 @@ func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabels // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { +func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -109469,21 +113358,21 @@ func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { +func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetLabelsCall) Header() http.Header { +func (c *InstancesSetTagsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -109491,14 +113380,14 @@ func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -109513,14 +113402,14 @@ func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setLabels" call. +// Do executes the "compute.instances.setTags" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -109551,10 +113440,10 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", + // "description": "Sets network tags for the specified instance to the data included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setTags", // "httpMethod": "POST", - // "id": "compute.instances.setLabels", + // "id": "compute.instances.setTags", // "parameterOrder": [ // "project", // "zone", @@ -109588,9 +113477,9 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setTags", // "request": { - // "$ref": "InstancesSetLabelsRequest" + // "$ref": "Tags" // }, // "response": { // "$ref": "Operation" @@ -109603,31 +113492,29 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } -// method id "compute.instances.setMachineResources": +// method id "compute.instances.simulateMaintenanceEvent": -type InstancesSetMachineResourcesCall struct { - s *Service - project string - zone string - instance string - instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSimulateMaintenanceEventCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMachineResources: Changes the number and/or type of accelerator -// for a stopped instance to the values specified in the request. +// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. +// For more information, see Simulate a host maintenance event. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { - c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { + c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest return c } @@ -109642,7 +113529,7 @@ func (r *InstancesService) SetMachineResources(project string, zone string, inst // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { +func (c *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { c.urlParams_.Set("requestId", requestId) return c } @@ -109650,7 +113537,7 @@ func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *Instance // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { +func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -109658,21 +113545,21 @@ func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *Instanc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { +func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetMachineResourcesCall) Header() http.Header { +func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -109680,14 +113567,9 @@ func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -109702,14 +113584,14 @@ func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMachineResources" call. +// Do executes the "compute.instances.simulateMaintenanceEvent" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -109740,10 +113622,10 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", + // "description": "Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", // "httpMethod": "POST", - // "id": "compute.instances.setMachineResources", + // "id": "compute.instances.simulateMaintenanceEvent", // "parameterOrder": [ // "project", // "zone", @@ -109777,10 +113659,7 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", - // "request": { - // "$ref": "InstancesSetMachineResourcesRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", // "response": { // "$ref": "Operation" // }, @@ -109792,31 +113671,29 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op } -// method id "compute.instances.setMachineType": +// method id "compute.instances.start": -type InstancesSetMachineTypeCall struct { - s *Service - project string - zone string - instance string - instancessetmachinetyperequest *InstancesSetMachineTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStartCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMachineType: Changes the machine type for a stopped instance to -// the machine type specified in the request. +// Start: Starts an instance that was stopped using the instances().stop +// method. For more information, see Restart an instance. // -// - instance: Name of the instance scoping this request. +// - instance: Name of the instance resource to start. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { - c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { + c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetmachinetyperequest = instancessetmachinetyperequest return c } @@ -109831,7 +113708,7 @@ func (r *InstancesService) SetMachineType(project string, zone string, instance // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { +func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { c.urlParams_.Set("requestId", requestId) return c } @@ -109839,7 +113716,7 @@ func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetM // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { +func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -109847,21 +113724,21 @@ func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSet // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { +func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetMachineTypeCall) Header() http.Header { +func (c *InstancesStartCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -109869,14 +113746,9 @@ func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineType") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -109891,14 +113763,14 @@ func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMachineType" call. +// Do executes the "compute.instances.start" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -109929,10 +113801,10 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/start", // "httpMethod": "POST", - // "id": "compute.instances.setMachineType", + // "id": "compute.instances.start", // "parameterOrder": [ // "project", // "zone", @@ -109940,7 +113812,7 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati // ], // "parameters": { // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "Name of the instance resource to start.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -109966,10 +113838,7 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", - // "request": { - // "$ref": "InstancesSetMachineTypeRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/start", // "response": { // "$ref": "Operation" // }, @@ -109981,31 +113850,32 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati } -// method id "compute.instances.setMetadata": +// method id "compute.instances.startWithEncryptionKey": -type InstancesSetMetadataCall struct { - s *Service - project string - zone string - instance string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStartWithEncryptionKeyCall struct { + s *Service + project string + zone string + instance string + instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMetadata: Sets metadata for the specified instance to the data -// included in the request. +// StartWithEncryptionKey: Starts an instance that was stopped using the +// instances().stop method. For more information, see Restart an +// instance. // -// - instance: Name of the instance scoping this request. +// - instance: Name of the instance resource to start. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { - c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { + c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.metadata = metadata + c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest return c } @@ -110020,7 +113890,7 @@ func (r *InstancesService) SetMetadata(project string, zone string, instance str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { +func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -110028,7 +113898,7 @@ func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMeta // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { +func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -110036,21 +113906,21 @@ func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMet // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { +func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetMetadataCall) Header() http.Header { +func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -110058,14 +113928,14 @@ func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMetadata") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -110080,14 +113950,14 @@ func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMetadata" call. +// Do executes the "compute.instances.startWithEncryptionKey" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -110118,10 +113988,10 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets metadata for the specified instance to the data included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", // "httpMethod": "POST", - // "id": "compute.instances.setMetadata", + // "id": "compute.instances.startWithEncryptionKey", // "parameterOrder": [ // "project", // "zone", @@ -110129,7 +113999,7 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, // ], // "parameters": { // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "Name of the instance resource to start.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -110155,9 +114025,9 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", // "request": { - // "$ref": "Metadata" + // "$ref": "InstancesStartWithEncryptionKeyRequest" // }, // "response": { // "$ref": "Operation" @@ -110170,33 +114040,41 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.instances.setMinCpuPlatform": +// method id "compute.instances.stop": -type InstancesSetMinCpuPlatformCall struct { - s *Service - project string - zone string - instance string - instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStopCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMinCpuPlatform: Changes the minimum CPU platform that this -// instance should use. This method can only be called on a stopped -// instance. For more information, read Specifying a Minimum CPU -// Platform. +// Stop: Stops a running instance, shutting it down cleanly, and allows +// you to restart the instance at a later time. Stopped instances do not +// incur VM usage charges while they are stopped. However, resources +// that the VM is using, such as persistent disks and static IP +// addresses, will continue to be charged until they are deleted. For +// more information, see Stopping an instance. // -// - instance: Name of the instance scoping this request. +// - instance: Name of the instance resource to stop. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { - c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { + c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest + return c +} + +// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If +// true, discard the contents of any attached localSSD partitions. +// Default value is false. +func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { + c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) return c } @@ -110211,7 +114089,7 @@ func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instan // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { +func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { c.urlParams_.Set("requestId", requestId) return c } @@ -110219,7 +114097,7 @@ func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { +func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -110227,21 +114105,21 @@ func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *Instances // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { +func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { +func (c *InstancesStopCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -110249,14 +114127,9 @@ func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmincpuplatformrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -110271,14 +114144,14 @@ func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMinCpuPlatform" call. +// Do executes the "compute.instances.stop" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -110309,18 +114182,23 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", + // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/stop", // "httpMethod": "POST", - // "id": "compute.instances.setMinCpuPlatform", + // "id": "compute.instances.stop", // "parameterOrder": [ // "project", // "zone", // "instance" // ], // "parameters": { + // "discardLocalSsd": { + // "description": "If true, discard the contents of any attached localSSD partitions. Default value is false.", + // "location": "query", + // "type": "boolean" + // }, // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "Name of the instance resource to stop.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -110346,10 +114224,7 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - // "request": { - // "$ref": "InstancesSetMinCpuPlatformRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/stop", // "response": { // "$ref": "Operation" // }, @@ -110361,30 +114236,43 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.instances.setName": +// method id "compute.instances.suspend": -type InstancesSetNameCall struct { - s *Service - project string - zone string - instance string - instancessetnamerequest *InstancesSetNameRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSuspendCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetName: Sets name of an instance. +// Suspend: This method suspends a running instance, saving its state to +// persistent storage, and allows you to resume the instance at a later +// time. Suspended instances have no compute costs (cores or RAM), and +// incur only storage charges for the saved VM memory and localSSD data. +// Any charged resources the virtual machine was using, such as +// persistent disks and static IP addresses, will continue to be charged +// while the instance is suspended. For more information, see Suspending +// and resuming an instance. // -// - instance: The instance name for this request. +// - instance: Name of the instance resource to suspend. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetName(project string, zone string, instance string, instancessetnamerequest *InstancesSetNameRequest) *InstancesSetNameCall { - c := &InstancesSetNameCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { + c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetnamerequest = instancessetnamerequest + return c +} + +// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If +// true, discard the contents of any attached localSSD partitions. +// Default value is false. +func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesSuspendCall { + c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) return c } @@ -110399,7 +114287,7 @@ func (r *InstancesService) SetName(project string, zone string, instance string, // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall { +func (c *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall { c.urlParams_.Set("requestId", requestId) return c } @@ -110407,7 +114295,7 @@ func (c *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCall { +func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -110415,21 +114303,21 @@ func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetNameCall) Context(ctx context.Context) *InstancesSetNameCall { +func (c *InstancesSuspendCall) Context(ctx context.Context) *InstancesSuspendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetNameCall) Header() http.Header { +func (c *InstancesSuspendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -110437,14 +114325,9 @@ func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetnamerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setName") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/suspend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -110459,14 +114342,14 @@ func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setName" call. +// Do executes the "compute.instances.suspend" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -110497,18 +114380,23 @@ func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Sets name of an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setName", + // "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/suspend", // "httpMethod": "POST", - // "id": "compute.instances.setName", + // "id": "compute.instances.suspend", // "parameterOrder": [ // "project", // "zone", // "instance" // ], // "parameters": { + // "discardLocalSsd": { + // "description": "If true, discard the contents of any attached localSSD partitions. Default value is false.", + // "location": "query", + // "type": "boolean" + // }, // "instance": { - // "description": "The instance name for this request.", + // "description": "Name of the instance resource to suspend.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -110534,10 +114422,7 @@ func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, err // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setName", - // "request": { - // "$ref": "InstancesSetNameRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/suspend", // "response": { // "$ref": "Operation" // }, @@ -110549,58 +114434,38 @@ func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, err } -// method id "compute.instances.setScheduling": +// method id "compute.instances.testIamPermissions": -type InstancesSetSchedulingCall struct { - s *Service - project string - zone string - instance string - scheduling *Scheduling - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetScheduling: Sets an instance's scheduling options. You can only -// call this method on a stopped instance, that is, a VM instance that -// is in a `TERMINATED` state. See Instance Life Cycle for more -// information on the possible instance states. For more information -// about setting scheduling options for a VM, see Set VM host -// maintenance policy. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - instance: Instance name for this request. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { - c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { + c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.scheduling = scheduling - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { +func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -110608,21 +114473,21 @@ func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetS // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { +func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetSchedulingCall) Header() http.Header { +func (c *InstancesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -110630,14 +114495,14 @@ func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setScheduling") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -110647,19 +114512,19 @@ func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, erro googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setScheduling" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instances.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -110678,7 +114543,7 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -110690,23 +114555,16 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.instances.setScheduling", + // "id": "compute.instances.testIamPermissions", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "resource" // ], // "parameters": { - // "instance": { - // "description": "Instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -110714,9 +114572,11 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { @@ -110727,47 +114587,83 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", + // "path": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", // "request": { - // "$ref": "Scheduling" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instances.setServiceAccount": +// method id "compute.instances.update": -type InstancesSetServiceAccountCall struct { - s *Service - project string - zone string - instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateCall struct { + s *Service + project string + zone string + instance string + instance2 *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetServiceAccount: Sets the service account on the instance. For more -// information, read Changing the service account and access scopes for -// an instance. +// Update: Updates an instance only if the necessary resources are +// available. This method can update only a specific set of instance +// properties. See Updating a running instance for a list of updatable +// instance properties. // -// - instance: Name of the instance resource to start. +// - instance: Name of the instance resource to update. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Update(project string, zone string, instance string, instance2 *Instance) *InstancesUpdateCall { + c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest + c.instance2 = instance2 + return c +} + +// MinimalAction sets the optional parameter "minimalAction": Specifies +// the action to take when updating an instance even if the updated +// properties do not require it. If not specified, then Compute Engine +// acts based on the minimum action that the updated properties require. +// +// Possible values: +// +// "INVALID" +// "NO_EFFECT" - No changes can be made to the instance. +// "REFRESH" - The instance will not restart. +// "RESTART" - The instance will restart. +func (c *InstancesUpdateCall) MinimalAction(minimalAction string) *InstancesUpdateCall { + c.urlParams_.Set("minimalAction", minimalAction) + return c +} + +// MostDisruptiveAllowedAction sets the optional parameter +// "mostDisruptiveAllowedAction": Specifies the most disruptive action +// that can be taken on the instance as part of the update. Compute +// Engine returns an error if the instance properties require a more +// disruptive action as part of the instance update. Valid options from +// lowest to highest are NO_EFFECT, REFRESH, and RESTART. +// +// Possible values: +// +// "INVALID" +// "NO_EFFECT" - No changes can be made to the instance. +// "REFRESH" - The instance will not restart. +// "RESTART" - The instance will restart. +func (c *InstancesUpdateCall) MostDisruptiveAllowedAction(mostDisruptiveAllowedAction string) *InstancesUpdateCall { + c.urlParams_.Set("mostDisruptiveAllowedAction", mostDisruptiveAllowedAction) return c } @@ -110782,7 +114678,7 @@ func (r *InstancesService) SetServiceAccount(project string, zone string, instan // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { +func (c *InstancesUpdateCall) RequestId(requestId string) *InstancesUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -110790,7 +114686,7 @@ func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { +func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -110798,21 +114694,21 @@ func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *Instances // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { +func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { +func (c *InstancesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -110820,16 +114716,16 @@ func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance2) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -110842,14 +114738,14 @@ func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setServiceAccount" call. +// Do executes the "compute.instances.update" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -110880,10 +114776,10 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", - // "httpMethod": "POST", - // "id": "compute.instances.setServiceAccount", + // "description": "Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", + // "httpMethod": "PUT", + // "id": "compute.instances.update", // "parameterOrder": [ // "project", // "zone", @@ -110891,12 +114787,46 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper // ], // "parameters": { // "instance": { - // "description": "Name of the instance resource to start.", + // "description": "Name of the instance resource to update.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, + // "minimalAction": { + // "description": "Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.", + // "enum": [ + // "INVALID", + // "NO_EFFECT", + // "REFRESH", + // "RESTART" + // ], + // "enumDescriptions": [ + // "", + // "No changes can be made to the instance.", + // "The instance will not restart.", + // "The instance will restart." + // ], + // "location": "query", + // "type": "string" + // }, + // "mostDisruptiveAllowedAction": { + // "description": "Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.", + // "enum": [ + // "INVALID", + // "NO_EFFECT", + // "REFRESH", + // "RESTART" + // ], + // "enumDescriptions": [ + // "", + // "No changes can be made to the instance.", + // "The instance will not restart.", + // "The instance will restart." + // ], + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -110917,9 +114847,9 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", + // "path": "projects/{project}/zones/{zone}/instances/{instance}", // "request": { - // "$ref": "InstancesSetServiceAccountRequest" + // "$ref": "Instance" // }, // "response": { // "$ref": "Operation" @@ -110932,33 +114862,36 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.instances.setShieldedInstanceIntegrityPolicy": +// method id "compute.instances.updateAccessConfig": -type InstancesSetShieldedInstanceIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateAccessConfigCall struct { + s *Service + project string + zone string + instance string + accessconfig *AccessConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance -// integrity policy for an instance. You can only use this method on a -// running instance. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// UpdateAccessConfig: Updates the specified access config from an +// instance's network interface with the data included in the request. +// This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. // -// - instance: Name or id of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface where the +// access config is attached. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { + c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy + c.urlParams_.Set("networkInterface", networkInterface) + c.accessconfig = accessconfig return c } @@ -110973,7 +114906,7 @@ func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zo // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { c.urlParams_.Set("requestId", requestId) return c } @@ -110981,7 +114914,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -110989,21 +114922,21 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) 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 *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { +func (c *InstancesUpdateAccessConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -111011,16 +114944,16 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -111033,14 +114966,14 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. +// Do executes the "compute.instances.updateAccessConfig" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -111071,23 +115004,30 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", - // "httpMethod": "PATCH", - // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", + // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", + // "httpMethod": "POST", + // "id": "compute.instances.updateAccessConfig", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "instance", + // "networkInterface" // ], // "parameters": { // "instance": { - // "description": "Name or id of the instance scoping this request.", + // "description": "The instance name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, + // "networkInterface": { + // "description": "The name of the network interface where the access config is attached.", + // "location": "query", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -111108,9 +115048,9 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", // "request": { - // "$ref": "ShieldedInstanceIntegrityPolicy" + // "$ref": "AccessConfig" // }, // "response": { // "$ref": "Operation" @@ -111123,33 +115063,33 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C } -// method id "compute.instances.setShieldedVmIntegrityPolicy": +// method id "compute.instances.updateDisplayDevice": -type InstancesSetShieldedVmIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateDisplayDeviceCall struct { + s *Service + project string + zone string + instance string + displaydevice *DisplayDevice + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetShieldedVmIntegrityPolicy: Sets the Shielded VM integrity policy -// for a VM instance. You can only use this method on a running VM -// instance. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// UpdateDisplayDevice: Updates the Display config for a VM instance. +// You can only use this method on a stopped VM instance. This method +// supports PATCH semantics and uses the JSON merge patch format and +// processing rules. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedVmIntegrityPolicy(project string, zone string, instance string, shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy) *InstancesSetShieldedVmIntegrityPolicyCall { - c := &InstancesSetShieldedVmIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { + c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.shieldedvmintegritypolicy = shieldedvmintegritypolicy + c.displaydevice = displaydevice return c } @@ -111164,7 +115104,7 @@ func (r *InstancesService) SetShieldedVmIntegrityPolicy(project string, zone str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetShieldedVmIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedVmIntegrityPolicyCall { +func (c *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -111172,7 +115112,7 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) RequestId(requestId string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedVmIntegrityPolicyCall { +func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -111180,21 +115120,21 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) 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 *InstancesSetShieldedVmIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedVmIntegrityPolicyCall { +func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Header() http.Header { +func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -111202,14 +115142,14 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedvmintegritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.displaydevice) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -111224,14 +115164,14 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setShieldedVmIntegrityPolicy" call. +// Do executes the "compute.instances.updateDisplayDevice" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -111262,10 +115202,10 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", + // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", // "httpMethod": "PATCH", - // "id": "compute.instances.setShieldedVmIntegrityPolicy", + // "id": "compute.instances.updateDisplayDevice", // "parameterOrder": [ // "project", // "zone", @@ -111275,7 +115215,7 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOpt // "instance": { // "description": "Name of the instance scoping this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -111299,9 +115239,9 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOpt // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", // "request": { - // "$ref": "ShieldedVmIntegrityPolicy" + // "$ref": "DisplayDevice" // }, // "response": { // "$ref": "Operation" @@ -111314,31 +115254,37 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOpt } -// method id "compute.instances.setTags": +// method id "compute.instances.updateNetworkInterface": -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateNetworkInterfaceCall struct { + s *Service + project string + zone string + instance string + networkinterface *NetworkInterface + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetTags: Sets network tags for the specified instance to the data -// included in the request. +// UpdateNetworkInterface: Updates an instance's network interface. This +// method can only update an interface's alias IP range and attached +// network. See Modifying alias IP ranges for an existing instance for +// instructions on changing alias IP ranges. See Migrating a VM between +// networks for instructions on migrating an interface. This method +// follows PATCH semantics. // -// - instance: Name of the instance scoping this request. +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface to update. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { + c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.tags = tags + c.urlParams_.Set("networkInterface", networkInterface) + c.networkinterface = networkinterface return c } @@ -111353,7 +115299,7 @@ func (r *InstancesService) SetTags(project string, zone string, instance string, // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { +func (c *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -111361,7 +115307,7 @@ func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { +func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -111369,21 +115315,21 @@ func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { +func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { +func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -111391,16 +115337,16 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkinterface) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -111413,14 +115359,14 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setTags" call. +// Do executes the "compute.instances.updateNetworkInterface" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -111451,23 +115397,30 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Sets network tags for the specified instance to the data included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setTags", - // "httpMethod": "POST", - // "id": "compute.instances.setTags", + // "description": "Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", + // "httpMethod": "PATCH", + // "id": "compute.instances.updateNetworkInterface", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "instance", + // "networkInterface" // ], // "parameters": { // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "The instance name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, + // "networkInterface": { + // "description": "The name of the network interface to update.", + // "location": "query", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -111488,9 +115441,9 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setTags", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", // "request": { - // "$ref": "Tags" + // "$ref": "NetworkInterface" // }, // "response": { // "$ref": "Operation" @@ -111503,29 +115456,33 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err } -// method id "compute.instances.simulateMaintenanceEvent": +// method id "compute.instances.updateShieldedInstanceConfig": -type InstancesSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateShieldedInstanceConfigCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceconfig *ShieldedInstanceConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. -// For more information, see Simulate a host maintenance event. +// UpdateShieldedInstanceConfig: Updates the Shielded Instance config +// for an instance. You can only use this method on a stopped instance. +// This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. // -// - instance: Name of the instance scoping this request. +// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { - c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { + c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.shieldedinstanceconfig = shieldedinstanceconfig return c } @@ -111540,7 +115497,7 @@ func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { c.urlParams_.Set("requestId", requestId) return c } @@ -111548,7 +115505,7 @@ func (c *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *Ins // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -111556,21 +115513,21 @@ func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *In // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { +func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -111578,11 +115535,16 @@ func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -111595,14 +115557,14 @@ func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.simulateMaintenanceEvent" call. +// Do executes the "compute.instances.updateShieldedInstanceConfig" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -111633,10 +115595,10 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", - // "httpMethod": "POST", - // "id": "compute.instances.simulateMaintenanceEvent", + // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", + // "httpMethod": "PATCH", + // "id": "compute.instances.updateShieldedInstanceConfig", // "parameterOrder": [ // "project", // "zone", @@ -111644,7 +115606,7 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "Name or id of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -111670,7 +115632,10 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", + // "request": { + // "$ref": "ShieldedInstanceConfig" + // }, // "response": { // "$ref": "Operation" // }, @@ -111682,29 +115647,33 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) } -// method id "compute.instances.start": +// method id "compute.instances.updateShieldedVmConfig": -type InstancesStartCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateShieldedVmConfigCall struct { + s *Service + project string + zone string + instance string + shieldedvmconfig *ShieldedVmConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Start: Starts an instance that was stopped using the instances().stop -// method. For more information, see Restart an instance. +// UpdateShieldedVmConfig: Updates the Shielded VM config for a VM +// instance. You can only use this method on a stopped VM instance. This +// method supports PATCH semantics and uses the JSON merge patch format +// and processing rules. // -// - instance: Name of the instance resource to start. +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) UpdateShieldedVmConfig(project string, zone string, instance string, shieldedvmconfig *ShieldedVmConfig) *InstancesUpdateShieldedVmConfigCall { + c := &InstancesUpdateShieldedVmConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.shieldedvmconfig = shieldedvmconfig return c } @@ -111719,7 +115688,7 @@ func (r *InstancesService) Start(project string, zone string, instance string) * // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { +func (c *InstancesUpdateShieldedVmConfigCall) RequestId(requestId string) *InstancesUpdateShieldedVmConfigCall { c.urlParams_.Set("requestId", requestId) return c } @@ -111727,7 +115696,7 @@ func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { +func (c *InstancesUpdateShieldedVmConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedVmConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -111735,21 +115704,21 @@ func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { +func (c *InstancesUpdateShieldedVmConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedVmConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesStartCall) Header() http.Header { +func (c *InstancesUpdateShieldedVmConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -111757,11 +115726,16 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedvmconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -111774,14 +115748,14 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.start" call. +// Do executes the "compute.instances.updateShieldedVmConfig" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -111812,10 +115786,10 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/start", - // "httpMethod": "POST", - // "id": "compute.instances.start", + // "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", + // "httpMethod": "PATCH", + // "id": "compute.instances.updateShieldedVmConfig", // "parameterOrder": [ // "project", // "zone", @@ -111823,7 +115797,7 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error // ], // "parameters": { // "instance": { - // "description": "Name of the instance resource to start.", + // "description": "Name of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -111849,7 +115823,10 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/start", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", + // "request": { + // "$ref": "ShieldedVmConfig" + // }, // "response": { // "$ref": "Operation" // }, @@ -111861,114 +115838,190 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error } -// method id "compute.instances.startWithEncryptionKey": +// method id "compute.instantSnapshots.aggregatedList": -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StartWithEncryptionKey: Starts an instance that was stopped using the -// instances().stop method. For more information, see Restart an -// instance. +// AggregatedList: Retrieves an aggregated list of instantSnapshots. // -// - instance: Name of the instance resource to start. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) AggregatedList(project string) *InstantSnapshotsAggregatedListCall { + c := &InstantSnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstantSnapshotsAggregatedListCall) Filter(filter string) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *InstantSnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstantSnapshotsAggregatedListCall) MaxResults(maxResults int64) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstantSnapshotsAggregatedListCall) OrderBy(orderBy string) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstantSnapshotsAggregatedListCall) PageToken(pageToken string) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstantSnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { +func (c *InstantSnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *InstantSnapshotsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstantSnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *InstantSnapshotsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { +func (c *InstantSnapshotsAggregatedListCall) Context(ctx context.Context) *InstantSnapshotsAggregatedListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { +func (c *InstantSnapshotsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, 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.instancesstartwithencryptionkeyrequest) - 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, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instantSnapshots") 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.startWithEncryptionKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instantSnapshots.aggregatedList" call. +// Exactly one of *InstantSnapshotAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *InstantSnapshotAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstantSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -111987,7 +116040,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstantSnapshotAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -111999,21 +116052,40 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - // "httpMethod": "POST", - // "id": "compute.instances.startWithEncryptionKey", + // "description": "Retrieves an aggregated list of instantSnapshots.", + // "flatPath": "projects/{project}/aggregated/instantSnapshots", + // "httpMethod": "GET", + // "id": "compute.instantSnapshots.aggregatedList", // "parameterOrder": [ - // "project", - // "zone", - // "instance" + // "project" // ], // "parameters": { - // "instance": { - // "description": "Name of the instance resource to start.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -112023,69 +116095,73 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" + // "type": "boolean" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - // "request": { - // "$ref": "InstancesStartWithEncryptionKeyRequest" - // }, + // "path": "projects/{project}/aggregated/instantSnapshots", // "response": { - // "$ref": "Operation" + // "$ref": "InstantSnapshotAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instances.stop": +// 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 *InstantSnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*InstantSnapshotAggregatedList) 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 InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instantSnapshots.delete": + +type InstantSnapshotsDeleteCall struct { + s *Service + project string + zone string + instantSnapshot string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Stop: Stops a running instance, shutting it down cleanly, and allows -// you to restart the instance at a later time. Stopped instances do not -// incur VM usage charges while they are stopped. However, resources -// that the VM is using, such as persistent disks and static IP -// addresses, will continue to be charged until they are deleted. For -// more information, see Stopping an instance. +// Delete: Deletes the specified InstantSnapshot resource. Keep in mind +// that deleting a single instantSnapshot might not necessarily delete +// all the data on that instantSnapshot. If any data on the +// instantSnapshot that is marked for deletion is needed for subsequent +// instantSnapshots, the data will be moved to the next corresponding +// instantSnapshot. For more information, see Deleting instantSnapshots. // -// - instance: Name of the instance resource to stop. +// - instantSnapshot: Name of the InstantSnapshot resource to delete. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) Delete(project string, zone string, instantSnapshot string) *InstantSnapshotsDeleteCall { + c := &InstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If -// true, discard the contents of any attached localSSD partitions. -// Default value is false. -func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) + c.instantSnapshot = instantSnapshot return c } @@ -112100,7 +116176,7 @@ func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStop // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { +func (c *InstantSnapshotsDeleteCall) RequestId(requestId string) *InstantSnapshotsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -112108,7 +116184,7 @@ func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { +func (c *InstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *InstantSnapshotsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -112116,21 +116192,21 @@ func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { +func (c *InstantSnapshotsDeleteCall) Context(ctx context.Context) *InstantSnapshotsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesStopCall) Header() http.Header { +func (c *InstantSnapshotsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -112140,29 +116216,29 @@ func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.stop" call. +// Do executes the "compute.instantSnapshots.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstantSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -112193,23 +116269,18 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/stop", - // "httpMethod": "POST", - // "id": "compute.instances.stop", + // "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", + // "httpMethod": "DELETE", + // "id": "compute.instantSnapshots.delete", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "instantSnapshot" // ], // "parameters": { - // "discardLocalSsd": { - // "description": "If true, discard the contents of any attached localSSD partitions. Default value is false.", - // "location": "query", - // "type": "boolean" - // }, - // "instance": { - // "description": "Name of the instance resource to stop.", + // "instantSnapshot": { + // "description": "Name of the InstantSnapshot resource to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -112235,7 +116306,7 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/stop", + // "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", // "response": { // "$ref": "Operation" // }, @@ -112247,43 +116318,31 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) } -// method id "compute.instances.suspend": +// method id "compute.instantSnapshots.export": -type InstancesSuspendCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsExportCall struct { + s *Service + project string + zone string + instantSnapshot string + instantsnapshotsexportrequest *InstantSnapshotsExportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Suspend: This method suspends a running instance, saving its state to -// persistent storage, and allows you to resume the instance at a later -// time. Suspended instances have no compute costs (cores or RAM), and -// incur only storage charges for the saved VM memory and localSSD data. -// Any charged resources the virtual machine was using, such as -// persistent disks and static IP addresses, will continue to be charged -// while the instance is suspended. For more information, see Suspending -// and resuming an instance. +// Export: Export the changed blocks between two instant snapshots to a +// customer's bucket in the user specified format. // -// - instance: Name of the instance resource to suspend. +// - instantSnapshot: Name of the instant snapshot to export. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { - c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) Export(project string, zone string, instantSnapshot string, instantsnapshotsexportrequest *InstantSnapshotsExportRequest) *InstantSnapshotsExportCall { + c := &InstantSnapshotsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If -// true, discard the contents of any attached localSSD partitions. -// Default value is false. -func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesSuspendCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) + c.instantSnapshot = instantSnapshot + c.instantsnapshotsexportrequest = instantsnapshotsexportrequest return c } @@ -112298,7 +116357,7 @@ func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesS // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall { +func (c *InstantSnapshotsExportCall) RequestId(requestId string) *InstantSnapshotsExportCall { c.urlParams_.Set("requestId", requestId) return c } @@ -112306,7 +116365,7 @@ func (c *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCall { +func (c *InstantSnapshotsExportCall) Fields(s ...googleapi.Field) *InstantSnapshotsExportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -112314,21 +116373,21 @@ func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSuspendCall) Context(ctx context.Context) *InstancesSuspendCall { +func (c *InstantSnapshotsExportCall) Context(ctx context.Context) *InstantSnapshotsExportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSuspendCall) Header() http.Header { +func (c *InstantSnapshotsExportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -112336,9 +116395,14 @@ func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantsnapshotsexportrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/suspend") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}/export") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -112346,21 +116410,21 @@ func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.suspend" call. +// Do executes the "compute.instantSnapshots.export" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstantSnapshotsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -112391,23 +116455,18 @@ func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/suspend", + // "description": "Export the changed blocks between two instant snapshots to a customer's bucket in the user specified format.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}/export", // "httpMethod": "POST", - // "id": "compute.instances.suspend", + // "id": "compute.instantSnapshots.export", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "instantSnapshot" // ], // "parameters": { - // "discardLocalSsd": { - // "description": "If true, discard the contents of any attached localSSD partitions. Default value is false.", - // "location": "query", - // "type": "boolean" - // }, - // "instance": { - // "description": "Name of the instance resource to suspend.", + // "instantSnapshot": { + // "description": "Name of the instant snapshot to export.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -112433,7 +116492,10 @@ func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, err // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/suspend", + // "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}/export", + // "request": { + // "$ref": "InstantSnapshotsExportRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -112445,97 +116507,104 @@ func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, err } -// method id "compute.instances.testIamPermissions": +// method id "compute.instantSnapshots.get": -type InstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsGetCall struct { + s *Service + project string + zone string + instantSnapshot string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Get: Returns the specified InstantSnapshot resource in the specified +// zone. // +// - instantSnapshot: Name of the InstantSnapshot resource to return. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { - c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) Get(project string, zone string, instantSnapshot string) *InstantSnapshotsGetCall { + c := &InstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.instantSnapshot = instantSnapshot return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { +func (c *InstantSnapshotsGetCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstantSnapshotsGetCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { +func (c *InstantSnapshotsGetCall) Context(ctx context.Context) *InstantSnapshotsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesTestIamPermissionsCall) Header() http.Header { +func (c *InstantSnapshotsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsGetCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) - 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, "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.instantSnapshots.get" call. +// Exactly one of *InstantSnapshot or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *InstantSnapshot.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *InstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -112554,7 +116623,7 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &InstantSnapshot{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -112566,27 +116635,27 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.instances.testIamPermissions", + // "description": "Returns the specified InstantSnapshot resource in the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", + // "httpMethod": "GET", + // "id": "compute.instantSnapshots.get", // "parameterOrder": [ // "project", // "zone", - // "resource" + // "instantSnapshot" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "instantSnapshot": { + // "description": "Name of the InstantSnapshot resource to return.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, @@ -112598,12 +116667,9 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "InstantSnapshot" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -112614,129 +116680,91 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } -// method id "compute.instances.update": +// method id "compute.instantSnapshots.getIamPolicy": -type InstancesUpdateCall struct { - s *Service - project string - zone string - instance string - instance2 *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsGetIamPolicyCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an instance only if the necessary resources are -// available. This method can update only a specific set of instance -// properties. See Updating a running instance for a list of updatable -// instance properties. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - instance: Name of the instance resource to update. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Update(project string, zone string, instance string, instance2 *Instance) *InstancesUpdateCall { - c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) GetIamPolicy(project string, zone string, resource string) *InstantSnapshotsGetIamPolicyCall { + c := &InstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.instance2 = instance2 - return c -} - -// MinimalAction sets the optional parameter "minimalAction": Specifies -// the action to take when updating an instance even if the updated -// properties do not require it. If not specified, then Compute Engine -// acts based on the minimum action that the updated properties require. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MinimalAction(minimalAction string) *InstancesUpdateCall { - c.urlParams_.Set("minimalAction", minimalAction) - return c -} - -// MostDisruptiveAllowedAction sets the optional parameter -// "mostDisruptiveAllowedAction": Specifies the most disruptive action -// that can be taken on the instance as part of the update. Compute -// Engine returns an error if the instance properties require a more -// disruptive action as part of the instance update. Valid options from -// lowest to highest are NO_EFFECT, REFRESH, and RESTART. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MostDisruptiveAllowedAction(mostDisruptiveAllowedAction string) *InstancesUpdateCall { - c.urlParams_.Set("mostDisruptiveAllowedAction", mostDisruptiveAllowedAction) + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateCall) RequestId(requestId string) *InstancesUpdateCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstantSnapshotsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { +func (c *InstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { +func (c *InstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesUpdateCall) Header() http.Header { +func (c *InstantSnapshotsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, 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.instance2) - 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, "projects/{project}/zones/{zone}/instances/{instance}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -112744,19 +116772,19 @@ func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instantSnapshots.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *InstantSnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -112775,7 +116803,7 @@ func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -112787,56 +116815,21 @@ func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - // "httpMethod": "PUT", - // "id": "compute.instances.update", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.instantSnapshots.getIamPolicy", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "resource" // ], // "parameters": { - // "instance": { - // "description": "Name of the instance resource to update.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "minimalAction": { - // "description": "Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.", - // "enum": [ - // "INVALID", - // "NO_EFFECT", - // "REFRESH", - // "RESTART" - // ], - // "enumDescriptions": [ - // "", - // "No changes can be made to the instance.", - // "The instance will not restart.", - // "The instance will restart." - // ], - // "location": "query", - // "type": "string" - // }, - // "mostDisruptiveAllowedAction": { - // "description": "Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.", - // "enum": [ - // "INVALID", - // "NO_EFFECT", - // "REFRESH", - // "RESTART" - // ], - // "enumDescriptions": [ - // "", - // "No changes can be made to the instance.", - // "The instance will not restart.", - // "The instance will restart." - // ], + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, // "project": { // "description": "Project ID for this request.", @@ -112845,9 +116838,11 @@ func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { @@ -112858,51 +116853,40 @@ func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}", - // "request": { - // "$ref": "Instance" - // }, + // "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instances.updateAccessConfig": +// method id "compute.instantSnapshots.insert": -type InstancesUpdateAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsInsertCall struct { + s *Service + project string + zone string + instantsnapshot *InstantSnapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateAccessConfig: Updates the specified access config from an -// instance's network interface with the data included in the request. -// This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// Insert: Creates an instant snapshot in the specified zone. // -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface where the -// access config is attached. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { - c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *InstantSnapshotsService) Insert(project string, zone string, instantsnapshot *InstantSnapshot) *InstantSnapshotsInsertCall { + c := &InstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig + c.instantsnapshot = instantsnapshot return c } @@ -112917,7 +116901,7 @@ func (r *InstancesService) UpdateAccessConfig(project string, zone string, insta // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { +func (c *InstantSnapshotsInsertCall) RequestId(requestId string) *InstantSnapshotsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -112925,7 +116909,7 @@ func (c *InstancesUpdateAccessConfigCall) RequestId(requestId string) *Instances // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { +func (c *InstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *InstantSnapshotsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -112933,21 +116917,21 @@ func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *Instance // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { +func (c *InstantSnapshotsInsertCall) Context(ctx context.Context) *InstantSnapshotsInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesUpdateAccessConfigCall) Header() http.Header { +func (c *InstantSnapshotsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -112955,14 +116939,14 @@ func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantsnapshot) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -112970,21 +116954,20 @@ func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateAccessConfig" call. +// Do executes the "compute.instantSnapshots.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstantSnapshotsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -113015,30 +116998,15 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", + // "description": "Creates an instant snapshot in the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", // "httpMethod": "POST", - // "id": "compute.instances.updateAccessConfig", + // "id": "compute.instantSnapshots.insert", // "parameterOrder": [ // "project", - // "zone", - // "instance", - // "networkInterface" + // "zone" // ], // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface where the access config is attached.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -113052,16 +117020,16 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope // "type": "string" // }, // "zone": { - // "description": "The name of the zone for this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", + // "path": "projects/{project}/zones/{zone}/instantSnapshots", // "request": { - // "$ref": "AccessConfig" + // "$ref": "InstantSnapshot" // }, // "response": { // "$ref": "Operation" @@ -113074,115 +117042,182 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.instances.updateDisplayDevice": +// method id "compute.instantSnapshots.list": -type InstancesUpdateDisplayDeviceCall struct { - s *Service - project string - zone string - instance string - displaydevice *DisplayDevice - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateDisplayDevice: Updates the Display config for a VM instance. -// You can only use this method on a stopped VM instance. This method -// supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// List: Retrieves the list of InstantSnapshot resources contained +// within the specified zone. // -// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { - c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) List(project string, zone string) *InstantSnapshotsListCall { + c := &InstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.displaydevice = displaydevice return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InstantSnapshotsListCall) Filter(filter string) *InstantSnapshotsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InstantSnapshotsListCall) MaxResults(maxResults int64) *InstantSnapshotsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InstantSnapshotsListCall) OrderBy(orderBy string) *InstantSnapshotsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InstantSnapshotsListCall) PageToken(pageToken string) *InstantSnapshotsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall { +func (c *InstantSnapshotsListCall) Fields(s ...googleapi.Field) *InstantSnapshotsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstantSnapshotsListCall) IfNoneMatch(entityTag string) *InstantSnapshotsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall { +func (c *InstantSnapshotsListCall) Context(ctx context.Context) *InstantSnapshotsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { +func (c *InstantSnapshotsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsListCall) doRequest(alt string) (*http.Response, 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.displaydevice) - 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, "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateDisplayDevice" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instantSnapshots.list" call. +// Exactly one of *InstantSnapshotList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstantSnapshotList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -113201,7 +117236,7 @@ func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstantSnapshotList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -113213,21 +117248,36 @@ func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", - // "httpMethod": "PATCH", - // "id": "compute.instances.updateDisplayDevice", + // "description": "Retrieves the list of InstantSnapshot resources contained within the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", + // "httpMethod": "GET", + // "id": "compute.instantSnapshots.list", // "parameterOrder": [ // "project", - // "zone", - // "instance" + // "zone" // ], // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -113237,10 +117287,10 @@ func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Op // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, // "zone": { // "description": "The name of the zone for this request.", @@ -113250,75 +117300,72 @@ func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Op // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", - // "request": { - // "$ref": "DisplayDevice" - // }, + // "path": "projects/{project}/zones/{zone}/instantSnapshots", // "response": { - // "$ref": "Operation" + // "$ref": "InstantSnapshotList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.instances.updateNetworkInterface": +// 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 *InstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) 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 InstancesUpdateNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - networkinterface *NetworkInterface - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.instantSnapshots.setIamPolicy": + +type InstantSnapshotsSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateNetworkInterface: Updates an instance's network interface. This -// method can only update an interface's alias IP range and attached -// network. See Modifying alias IP ranges for an existing instance for -// instructions on changing alias IP ranges. See Migrating a VM between -// networks for instructions on migrating an interface. This method -// follows PATCH semantics. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to update. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { - c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstantSnapshotsSetIamPolicyCall { + c := &InstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.networkinterface = networkinterface - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { +func (c *InstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -113326,21 +117373,21 @@ func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *Inst // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { +func (c *InstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { +func (c *InstantSnapshotsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -113348,16 +117395,16 @@ func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkinterface) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -113365,19 +117412,19 @@ func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Respo googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateNetworkInterface" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instantSnapshots.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *InstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -113396,7 +117443,7 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -113408,30 +117455,16 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", - // "httpMethod": "PATCH", - // "id": "compute.instances.updateNetworkInterface", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.instantSnapshots.setIamPolicy", // "parameterOrder": [ // "project", // "zone", - // "instance", - // "networkInterface" + // "resource" // ], // "parameters": { - // "instance": { - // "description": "The instance name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "networkInterface": { - // "description": "The name of the network interface to update.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -113439,9 +117472,11 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { @@ -113452,12 +117487,12 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", + // "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", // "request": { - // "$ref": "NetworkInterface" + // "$ref": "ZoneSetPolicyRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -113467,33 +117502,31 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( } -// method id "compute.instances.updateShieldedInstanceConfig": +// method id "compute.instantSnapshots.setLabels": -type InstancesUpdateShieldedInstanceConfigCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceconfig *ShieldedInstanceConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsSetLabelsCall struct { + s *Service + project string + zone string + resource string + zonesetlabelsrequest *ZoneSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateShieldedInstanceConfig: Updates the Shielded Instance config -// for an instance. You can only use this method on a stopped instance. -// This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// SetLabels: Sets the labels on a instantSnapshot in the given zone. To +// learn more about labels, read the Labeling Resources documentation. // -// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { - c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *InstantSnapshotsSetLabelsCall { + c := &InstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.shieldedinstanceconfig = shieldedinstanceconfig + c.resource = resource + c.zonesetlabelsrequest = zonesetlabelsrequest return c } @@ -113508,7 +117541,7 @@ func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { +func (c *InstantSnapshotsSetLabelsCall) RequestId(requestId string) *InstantSnapshotsSetLabelsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -113516,7 +117549,7 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { +func (c *InstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -113524,21 +117557,21 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) 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 *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { +func (c *InstantSnapshotsSetLabelsCall) Context(ctx context.Context) *InstantSnapshotsSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { +func (c *InstantSnapshotsSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -113546,16 +117579,16 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -113563,19 +117596,19 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateShieldedInstanceConfig" call. +// Do executes the "compute.instantSnapshots.setLabels" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -113606,23 +117639,16 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", - // "httpMethod": "PATCH", - // "id": "compute.instances.updateShieldedInstanceConfig", + // "description": "Sets the labels on a instantSnapshot in the given zone. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.instantSnapshots.setLabels", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "resource" // ], // "parameters": { - // "instance": { - // "description": "Name or id of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -113635,6 +117661,13 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt // "location": "query", // "type": "string" // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -113643,9 +117676,9 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", + // "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", // "request": { - // "$ref": "ShieldedInstanceConfig" + // "$ref": "ZoneSetLabelsRequest" // }, // "response": { // "$ref": "Operation" @@ -113658,56 +117691,38 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt } -// method id "compute.instances.updateShieldedVmConfig": +// method id "compute.instantSnapshots.testIamPermissions": -type InstancesUpdateShieldedVmConfigCall struct { - s *Service - project string - zone string - instance string - shieldedvmconfig *ShieldedVmConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateShieldedVmConfig: Updates the Shielded VM config for a VM -// instance. You can only use this method on a stopped VM instance. This -// method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - instance: Name of the instance scoping this request. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) UpdateShieldedVmConfig(project string, zone string, instance string, shieldedvmconfig *ShieldedVmConfig) *InstancesUpdateShieldedVmConfigCall { - c := &InstancesUpdateShieldedVmConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstantSnapshotsTestIamPermissionsCall { + c := &InstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.shieldedvmconfig = shieldedvmconfig - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesUpdateShieldedVmConfigCall) RequestId(requestId string) *InstancesUpdateShieldedVmConfigCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesUpdateShieldedVmConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedVmConfigCall { +func (c *InstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstantSnapshotsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -113715,21 +117730,21 @@ func (c *InstancesUpdateShieldedVmConfigCall) Fields(s ...googleapi.Field) *Inst // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesUpdateShieldedVmConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedVmConfigCall { +func (c *InstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *InstantSnapshotsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesUpdateShieldedVmConfigCall) Header() http.Header { +func (c *InstantSnapshotsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -113737,16 +117752,16 @@ func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedvmconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -113754,19 +117769,19 @@ func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Respo googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateShieldedVmConfig" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instantSnapshots.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -113785,7 +117800,7 @@ func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -113797,23 +117812,16 @@ func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", - // "httpMethod": "PATCH", - // "id": "compute.instances.updateShieldedVmConfig", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.instantSnapshots.testIamPermissions", // "parameterOrder": [ // "project", // "zone", - // "instance" + // "resource" // ], // "parameters": { - // "instance": { - // "description": "Name of the instance scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -113821,9 +117829,11 @@ func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) ( // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { @@ -113834,16 +117844,17 @@ func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", + // "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", // "request": { - // "$ref": "ShieldedVmConfig" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } @@ -115972,6 +119983,449 @@ func (c *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*Inter } } +// method id "compute.interconnectRemoteLocations.get": + +type InterconnectRemoteLocationsGetCall struct { + s *Service + project string + interconnectRemoteLocation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details for the specified interconnect remote +// location. Gets a list of available interconnect remote locations by +// making a list() request. +// +// - interconnectRemoteLocation: Name of the interconnect remote +// location to return. +// - project: Project ID for this request. +func (r *InterconnectRemoteLocationsService) Get(project string, interconnectRemoteLocation string) *InterconnectRemoteLocationsGetCall { + c := &InterconnectRemoteLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnectRemoteLocation = interconnectRemoteLocation + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectRemoteLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InterconnectRemoteLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InterconnectRemoteLocationsGetCall) Context(ctx context.Context) *InterconnectRemoteLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InterconnectRemoteLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectRemoteLocationsGetCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}") + 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{ + "project": c.project, + "interconnectRemoteLocation": c.interconnectRemoteLocation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectRemoteLocations.get" call. +// Exactly one of *InterconnectRemoteLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *InterconnectRemoteLocation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &InterconnectRemoteLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details for the specified interconnect remote location. Gets a list of available interconnect remote locations by making a list() request.", + // "flatPath": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + // "httpMethod": "GET", + // "id": "compute.interconnectRemoteLocations.get", + // "parameterOrder": [ + // "project", + // "interconnectRemoteLocation" + // ], + // "parameters": { + // "interconnectRemoteLocation": { + // "description": "Name of the interconnect remote location to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + // "response": { + // "$ref": "InterconnectRemoteLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.interconnectRemoteLocations.list": + +type InterconnectRemoteLocationsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of interconnect remote locations available +// to the specified project. +// +// - project: Project ID for this request. +func (r *InterconnectRemoteLocationsService) List(project string) *InterconnectRemoteLocationsListCall { + c := &InterconnectRemoteLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InterconnectRemoteLocationsListCall) Filter(filter string) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InterconnectRemoteLocationsListCall) MaxResults(maxResults int64) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InterconnectRemoteLocationsListCall) OrderBy(orderBy string) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InterconnectRemoteLocationsListCall) PageToken(pageToken string) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InterconnectRemoteLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectRemoteLocationsListCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InterconnectRemoteLocationsListCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InterconnectRemoteLocationsListCall) Context(ctx context.Context) *InterconnectRemoteLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InterconnectRemoteLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectRemoteLocationsListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/interconnectRemoteLocations") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectRemoteLocations.list" call. +// Exactly one of *InterconnectRemoteLocationList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *InterconnectRemoteLocationList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectRemoteLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocationList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &InterconnectRemoteLocationList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of interconnect remote locations available to the specified project.", + // "flatPath": "projects/{project}/global/interconnectRemoteLocations", + // "httpMethod": "GET", + // "id": "compute.interconnectRemoteLocations.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/global/interconnectRemoteLocations", + // "response": { + // "$ref": "InterconnectRemoteLocationList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *InterconnectRemoteLocationsListCall) Pages(ctx context.Context, f func(*InterconnectRemoteLocationList) 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 "compute.interconnects.delete": type InterconnectsDeleteCall struct { @@ -158516,7 +162970,1025 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + 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 *RegionInstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.listPerInstanceConfigs" call. +// Exactly one of *RegionInstanceGroupManagersListInstanceConfigsResp or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *RegionInstanceGroupManagersListInstanceConfigsResp.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 *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstanceConfigsResp, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RegionInstanceGroupManagersListInstanceConfigsResp{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request, should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", + // "response": { + // "$ref": "RegionInstanceGroupManagersListInstanceConfigsResp" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstanceConfigsResp) 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 "compute.regionInstanceGroupManagers.patch": + +type RegionInstanceGroupManagersPatchCall struct { + s *Service + project string + region string + instanceGroupManager string + instancegroupmanager *InstanceGroupManager + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a managed instance group using the information that +// you specify in the request. This operation is marked as DONE when the +// group is patched even if the instances in the group are still in the +// process of being patched. You must separately verify the status of +// the individual instances with the listmanagedinstances method. This +// method supports PATCH semantics and uses the JSON merge patch format +// and processing rules. If you update your group to specify a new +// template or instance configuration, it's possible that your intended +// specification for each VM in the group is different from the current +// state of that VM. To learn how to apply an updated configuration to +// the VMs in a MIG, see Updating instances in a MIG. +// +// - instanceGroupManager: The name of the instance group manager. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { + c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanager = instancegroupmanager + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { + 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 *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, 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.instancegroupmanager) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", + // "httpMethod": "PATCH", + // "id": "compute.regionInstanceGroupManagers.patch", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "The name of the instance group manager.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", + // "request": { + // "$ref": "InstanceGroupManager" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionInstanceGroupManagers.patchPerInstanceConfigs": + +type RegionInstanceGroupManagersPatchPerInstanceConfigsCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PatchPerInstanceConfigs: Inserts or patches per-instance +// configurations for the managed instance group. perInstanceConfig.name +// serves as a key used to distinguish whether to perform insert or +// patch. +// +// - instanceGroupManager: The name of the managed instance group. It +// should conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request, should conform to +// RFC1035. +func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + c := &RegionInstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagerpatchinstanceconfigreq = regioninstancegroupmanagerpatchinstanceconfigreq + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + 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 *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, 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.regioninstancegroupmanagerpatchinstanceconfigreq) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.patchPerInstanceConfigs" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request, should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", + // "request": { + // "$ref": "RegionInstanceGroupManagerPatchInstanceConfigReq" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionInstanceGroupManagers.recreateInstances": + +type RegionInstanceGroupManagersRecreateInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RecreateInstances: Flags the specified VM instances in the managed +// instance group to be immediately recreated. Each instance is +// recreated using the group's current configuration. This operation is +// marked as DONE when the flag is set even if the instances have not +// yet been recreated. You must separately verify the status of each +// instance by checking its currentAction field; for more information, +// see Checking the status of managed instances. If the group is part of +// a backend service that has enabled connection draining, it can take +// up to 60 seconds after the connection draining duration has elapsed +// before the VM instance is removed or deleted. You can specify a +// maximum of 1000 instances with this method per request. +// +// - instanceGroupManager: Name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { + c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { + 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 *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, 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.regioninstancegroupmanagersrecreaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.recreateInstances", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "Name of the managed instance group.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", + // "request": { + // "$ref": "RegionInstanceGroupManagersRecreateRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionInstanceGroupManagers.resize": + +type RegionInstanceGroupManagersResizeCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resize: Changes the intended size of the managed instance group. If +// you increase the size, the group creates new instances using the +// current instance template. If you decrease the size, the group +// deletes one or more instances. The resize operation is marked DONE if +// the resize request is successful. The underlying actions take +// additional time. You must separately verify the status of the +// creating or deleting actions with the listmanagedinstances method. If +// the group is part of a backend service that has enabled connection +// draining, it can take up to 60 seconds after the connection draining +// duration has elapsed before the VM instance is removed or deleted. +// +// - instanceGroupManager: Name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - size: Number of instances that should exist in this instance group +// manager. +func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { + c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.urlParams_.Set("size", fmt.Sprint(size)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { + 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 *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.resize" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.resize", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager", + // "size" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "Name of the managed instance group.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "size": { + // "description": "Number of instances that should exist in this instance group manager.", + // "format": "int32", + // "location": "query", + // "minimum": "0", + // "required": true, + // "type": "integer" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionInstanceGroupManagers.resizeAdvanced": + +type RegionInstanceGroupManagersResizeAdvancedCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ResizeAdvanced: Resizes the regional managed instance group with +// advanced configuration options like disabling creation retries. This +// is an extended version of the resize method. If you increase the +// size, the group creates new instances using the current instance +// template. If you decrease the size, the group deletes one or more +// instances. The resize operation is marked DONE if the resize request +// is successful. The underlying actions take additional time. You must +// separately verify the status of the creating or deleting actions with +// the get or listmanagedinstances method. If the group is part of a +// backend service that has enabled connection draining, it can take up +// to 60 seconds after the connection draining duration has elapsed +// before the VM instance is removed or deleted. +// +// - instanceGroupManager: The name of the managed instance group. It +// must be a string that meets the requirements in RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. It must be a +// string that meets the requirements in RFC1035. +func (r *RegionInstanceGroupManagersService) ResizeAdvanced(project string, region string, instanceGroupManager string, regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest) *RegionInstanceGroupManagersResizeAdvancedCall { + c := &RegionInstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagersresizeadvancedrequest = regioninstancegroupmanagersresizeadvancedrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeAdvancedCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeAdvancedCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -158524,21 +163996,21 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeAdvancedCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { +func (c *RegionInstanceGroupManagersResizeAdvancedCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -158546,9 +164018,14 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersresizeadvancedrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -158563,16 +164040,14 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.listPerInstanceConfigs" call. -// Exactly one of *RegionInstanceGroupManagersListInstanceConfigsResp or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *RegionInstanceGroupManagersListInstanceConfigsResp.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 *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstanceConfigsResp, error) { +// Do executes the "compute.regionInstanceGroupManagers.resizeAdvanced" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -158591,7 +164066,7 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionInstanceGroupManagersListInstanceConfigsResp{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -158603,45 +164078,22 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googl } return ret, nil // { - // "description": "Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", + // "description": "Resizes the regional managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the get or listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", + // "id": "compute.regionInstanceGroupManagers.resizeAdvanced", // "parameterOrder": [ // "project", // "region", // "instanceGroupManager" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035.", // "location": "path", // "required": true, // "type": "string" // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -158650,85 +164102,58 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googl // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request, should conform to RFC1035.", + // "description": "Name of the region scoping this request. It must be a string that meets the requirements in RFC1035.", // "location": "path", // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", + // "request": { + // "$ref": "RegionInstanceGroupManagersResizeAdvancedRequest" + // }, // "response": { - // "$ref": "RegionInstanceGroupManagersListInstanceConfigsResp" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstanceConfigsResp) 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 "compute.regionInstanceGroupManagers.patch": +// method id "compute.regionInstanceGroupManagers.setAutoHealingPolicies": -type RegionInstanceGroupManagersPatchCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is patched even if the instances in the group are still in the -// process of being patched. You must separately verify the status of -// the individual instances with the listmanagedinstances method. This -// method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. If you update your group to specify a new -// template or instance configuration, it's possible that your intended -// specification for each VM in the group is different from the current -// state of that VM. To learn how to apply an updated configuration to -// the VMs in a MIG, see Updating instances in a MIG. +// SetAutoHealingPolicies: Modifies the autohealing policy for the +// instances in this managed instance group. [Deprecated] This method is +// deprecated. Use regionInstanceGroupManagers.patch instead. // -// - instanceGroupManager: The name of the instance group manager. +// - instanceGroupManager: Name of the managed instance group. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { - c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { + c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager + c.regioninstancegroupmanagerssetautohealingrequest = regioninstancegroupmanagerssetautohealingrequest return c } @@ -158743,7 +164168,7 @@ func (r *RegionInstanceGroupManagersService) Patch(project string, region string // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { +func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -158751,7 +164176,7 @@ func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *Regi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { +func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -158759,21 +164184,21 @@ func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *Reg // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { +func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { +func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -158781,16 +164206,16 @@ func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssetautohealingrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -158803,14 +164228,14 @@ func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.patch" call. +// Do executes the "compute.regionInstanceGroupManagers.setAutoHealingPolicies" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -158841,10 +164266,11 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "httpMethod": "PATCH", - // "id": "compute.regionInstanceGroupManagers.patch", + // "deprecated": true, + // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", // "parameterOrder": [ // "project", // "region", @@ -158852,7 +164278,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the instance group manager.", + // "description": "Name of the managed instance group.", // "location": "path", // "required": true, // "type": "string" @@ -158876,9 +164302,9 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", // "request": { - // "$ref": "InstanceGroupManager" + // "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" // }, // "response": { // "$ref": "Operation" @@ -158891,35 +164317,32 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) } -// method id "compute.regionInstanceGroupManagers.patchPerInstanceConfigs": +// method id "compute.regionInstanceGroupManagers.setInstanceTemplate": -type RegionInstanceGroupManagersPatchPerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersSetInstanceTemplateCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PatchPerInstanceConfigs: Inserts or patches per-instance -// configurations for the managed instance group. perInstanceConfig.name -// serves as a key used to distinguish whether to perform insert or -// patch. +// SetInstanceTemplate: Sets the instance template to use when creating +// new instances or recreating instances in this group. Existing +// instances are not affected. // -// - instanceGroupManager: The name of the managed instance group. It -// should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { + c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerpatchinstanceconfigreq = regioninstancegroupmanagerpatchinstanceconfigreq + c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest return c } @@ -158934,7 +164357,7 @@ func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -158942,7 +164365,7 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(reque // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -158950,21 +164373,21 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -158972,14 +164395,14 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerpatchinstanceconfigreq) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -158994,14 +164417,14 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.patchPerInstanceConfigs" call. +// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -159032,10 +164455,10 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...goog } return ret, nil // { - // "description": "Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", + // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", + // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ // "project", // "region", @@ -159043,7 +164466,7 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...goog // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "description": "The name of the managed instance group.", // "location": "path", // "required": true, // "type": "string" @@ -159056,7 +164479,7 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...goog // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request, should conform to RFC1035.", + // "description": "Name of the region scoping this request.", // "location": "path", // "required": true, // "type": "string" @@ -159067,9 +164490,9 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...goog // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", // "request": { - // "$ref": "RegionInstanceGroupManagerPatchInstanceConfigReq" + // "$ref": "RegionInstanceGroupManagersSetTemplateRequest" // }, // "response": { // "$ref": "Operation" @@ -159082,40 +164505,32 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...goog } -// method id "compute.regionInstanceGroupManagers.recreateInstances": +// method id "compute.regionInstanceGroupManagers.setTargetPools": -type RegionInstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersSetTargetPoolsCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RecreateInstances: Flags the specified VM instances in the managed -// instance group to be immediately recreated. Each instance is -// recreated using the group's current configuration. This operation is -// marked as DONE when the flag is set even if the instances have not -// yet been recreated. You must separately verify the status of each -// instance by checking its currentAction field; for more information, -// see Checking the status of managed instances. If the group is part of -// a backend service that has enabled connection draining, it can take -// up to 60 seconds after the connection draining duration has elapsed -// before the VM instance is removed or deleted. You can specify a -// maximum of 1000 instances with this method per request. +// SetTargetPools: Modifies the target pools to which all new instances +// in this group are assigned. Existing instances in the group are not +// affected. // // - instanceGroupManager: Name of the managed instance group. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { - c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { + c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest + c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest return c } @@ -159130,7 +164545,7 @@ func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, r // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -159138,7 +164553,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -159146,21 +164561,21 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) 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 *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -159168,14 +164583,14 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersrecreaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -159190,14 +164605,14 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. +// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -159228,10 +164643,10 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", + // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.recreateInstances", + // "id": "compute.regionInstanceGroupManagers.setTargetPools", // "parameterOrder": [ // "project", // "region", @@ -159263,9 +164678,9 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", // "request": { - // "$ref": "RegionInstanceGroupManagersRecreateRequest" + // "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" // }, // "response": { // "$ref": "Operation" @@ -159278,40 +164693,208 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. } -// method id "compute.regionInstanceGroupManagers.resize": +// method id "compute.regionInstanceGroupManagers.testIamPermissions": -type RegionInstanceGroupManagersResizeCall struct { +type RegionInstanceGroupManagersTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { + c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersTestIamPermissionsCall { + 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 *RegionInstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupManagersTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionInstanceGroupManagers.update": + +type RegionInstanceGroupManagersUpdateCall struct { s *Service project string region string instanceGroupManager string + instancegroupmanager *InstanceGroupManager urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Resize: Changes the intended size of the managed instance group. If -// you increase the size, the group creates new instances using the -// current instance template. If you decrease the size, the group -// deletes one or more instances. The resize operation is marked DONE if -// the resize request is successful. The underlying actions take -// additional time. You must separately verify the status of the -// creating or deleting actions with the listmanagedinstances method. If -// the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. +// Update: Updates a managed instance group using the information that +// you specify in the request. This operation is marked as DONE when the +// group is updated even if the instances in the group have not yet been +// updated. You must separately verify the status of the individual +// instances with the listmanagedinstances method. If you update your +// group to specify a new template or instance configuration, it's +// possible that your intended specification for each VM in the group is +// different from the current state of that VM. To learn how to apply an +// updated configuration to the VMs in a MIG, see Updating instances in +// a MIG. // -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - size: Number of instances that should exist in this instance group -// manager. -func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { - c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the instance group manager. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { + c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) + c.instancegroupmanager = instancegroupmanager return c } @@ -159326,7 +164909,7 @@ func (r *RegionInstanceGroupManagersService) Resize(project string, region strin // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { +func (c *RegionInstanceGroupManagersUpdateCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -159334,7 +164917,7 @@ func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { +func (c *RegionInstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -159342,21 +164925,21 @@ func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *Re // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { +func (c *RegionInstanceGroupManagersUpdateCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { +func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -159364,11 +164947,16 @@ func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -159381,14 +164969,14 @@ func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.resize" call. +// Do executes the "compute.regionInstanceGroupManagers.update" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -159419,19 +165007,18 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.resize", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", + // "httpMethod": "PUT", + // "id": "compute.regionInstanceGroupManagers.update", // "parameterOrder": [ // "project", // "region", - // "instanceGroupManager", - // "size" + // "instanceGroupManager" // ], // "parameters": { // "instanceGroupManager": { - // "description": "Name of the managed instance group.", + // "description": "The name of the instance group manager.", // "location": "path", // "required": true, // "type": "string" @@ -159453,17 +165040,12 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "size": { - // "description": "Number of instances that should exist in this instance group manager.", - // "format": "int32", - // "location": "query", - // "minimum": "0", - // "required": true, - // "type": "integer" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", + // "request": { + // "$ref": "InstanceGroupManager" + // }, // "response": { // "$ref": "Operation" // }, @@ -159475,43 +165057,35 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) } -// method id "compute.regionInstanceGroupManagers.resizeAdvanced": +// method id "compute.regionInstanceGroupManagers.updatePerInstanceConfigs": -type RegionInstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersUpdatePerInstanceConfigsCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResizeAdvanced: Resizes the regional managed instance group with -// advanced configuration options like disabling creation retries. This -// is an extended version of the resize method. If you increase the -// size, the group creates new instances using the current instance -// template. If you decrease the size, the group deletes one or more -// instances. The resize operation is marked DONE if the resize request -// is successful. The underlying actions take additional time. You must -// separately verify the status of the creating or deleting actions with -// the get or listmanagedinstances method. If the group is part of a -// backend service that has enabled connection draining, it can take up -// to 60 seconds after the connection draining duration has elapsed -// before the VM instance is removed or deleted. +// UpdatePerInstanceConfigs: Inserts or updates per-instance +// configurations for the managed instance group. perInstanceConfig.name +// serves as a key used to distinguish whether to perform insert or +// patch. // // - instanceGroupManager: The name of the managed instance group. It -// must be a string that meets the requirements in RFC1035. +// should conform to RFC1035. // - project: Project ID for this request. -// - region: Name of the region scoping this request. It must be a -// string that meets the requirements in RFC1035. -func (r *RegionInstanceGroupManagersService) ResizeAdvanced(project string, region string, instanceGroupManager string, regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest) *RegionInstanceGroupManagersResizeAdvancedCall { - c := &RegionInstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request, should conform to +// RFC1035. +func (r *RegionInstanceGroupManagersService) UpdatePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { + c := &RegionInstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersresizeadvancedrequest = regioninstancegroupmanagersresizeadvancedrequest + c.regioninstancegroupmanagerupdateinstanceconfigreq = regioninstancegroupmanagerupdateinstanceconfigreq return c } @@ -159526,7 +165100,7 @@ func (r *RegionInstanceGroupManagersService) ResizeAdvanced(project string, regi // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeAdvancedCall { +func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -159534,7 +165108,7 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) RequestId(requestId stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeAdvancedCall { +func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -159542,21 +165116,21 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) 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 *RegionInstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeAdvancedCall { +func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Header() http.Header { +func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -159564,14 +165138,14 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersresizeadvancedrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerupdateinstanceconfigreq) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -159586,14 +165160,14 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.resizeAdvanced" call. +// Do executes the "compute.regionInstanceGroupManagers.updatePerInstanceConfigs" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -159624,10 +165198,10 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Resizes the regional managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the get or listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", + // "description": "Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.resizeAdvanced", + // "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", // "parameterOrder": [ // "project", // "region", @@ -159635,7 +165209,7 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "instanceGroupManager": { - // "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035.", + // "description": "The name of the managed instance group. It should conform to RFC1035.", // "location": "path", // "required": true, // "type": "string" @@ -159648,7 +165222,7 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.Cal // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request. It must be a string that meets the requirements in RFC1035.", + // "description": "Name of the region scoping this request, should conform to RFC1035.", // "location": "path", // "required": true, // "type": "string" @@ -159659,9 +165233,9 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.Cal // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", + // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", // "request": { - // "$ref": "RegionInstanceGroupManagersResizeAdvancedRequest" + // "$ref": "RegionInstanceGroupManagerUpdateInstanceConfigReq" // }, // "response": { // "$ref": "Operation" @@ -159674,114 +165248,103 @@ func (c *RegionInstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.Cal } -// method id "compute.regionInstanceGroupManagers.setAutoHealingPolicies": +// method id "compute.regionInstanceGroups.get": -type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupsGetCall struct { + s *Service + project string + region string + instanceGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetAutoHealingPolicies: Modifies the autohealing policy for the -// instances in this managed instance group. [Deprecated] This method is -// deprecated. Use regionInstanceGroupManagers.patch instead. +// Get: Returns the specified instance group resource. // -// - instanceGroupManager: Name of the managed instance group. +// - instanceGroup: Name of the instance group resource to return. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { + c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssetautohealingrequest = regioninstancegroupmanagerssetautohealingrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("requestId", requestId) + c.instanceGroup = instanceGroup return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { +func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { +func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { +func (c *RegionInstanceGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, 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.regioninstancegroupmanagerssetautohealingrequest) - 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, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}") 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.setAutoHealingPolicies" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.regionInstanceGroups.get" call. +// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *InstanceGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -159800,7 +165363,7 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -159812,22 +165375,286 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googl } return ret, nil // { - // "deprecated": true, - // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", + // "description": "Returns the specified instance group resource.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", + // "httpMethod": "GET", + // "id": "compute.regionInstanceGroups.get", // "parameterOrder": [ // "project", // "region", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", + // "instanceGroup": { + // "description": "Name of the instance group resource to return.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", // "location": "path", // "required": true, // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", + // "response": { + // "$ref": "InstanceGroup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionInstanceGroups.list": + +type RegionInstanceGroupsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of instance group resources contained within +// the specified region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { + c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *RegionInstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/instanceGroups") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroups.list" call. +// Exactly one of *RegionInstanceGroupList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *RegionInstanceGroupList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RegionInstanceGroupList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of instance group resources contained within the specified region.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroups", + // "httpMethod": "GET", + // "id": "compute.regionInstanceGroups.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -159842,76 +165669,164 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googl // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - // "request": { - // "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" - // }, + // "path": "projects/{project}/regions/{region}/instanceGroups", // "response": { - // "$ref": "Operation" + // "$ref": "RegionInstanceGroupList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.regionInstanceGroupManagers.setInstanceTemplate": +// 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 *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) 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 RegionInstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.regionInstanceGroups.listInstances": + +type RegionInstanceGroupsListInstancesCall struct { + s *Service + project string + region string + instanceGroup string + regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetInstanceTemplate: Sets the instance template to use when creating -// new instances or recreating instances in this group. Existing -// instances are not affected. +// ListInstances: Lists the instances in the specified instance group +// and displays information about the named ports. Depending on the +// specified options, this method can list all instances or only the +// instances that are running. The orderBy query parameter is not +// supported. // -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: Name of the regional instance group for which we +// want to list the instances. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { + c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest + c.instanceGroup = instanceGroup + c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *RegionInstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListInstancesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { +func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -159919,21 +165834,21 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { +func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { +func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -159941,14 +165856,14 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupslistinstancesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -159956,21 +165871,22 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.regionInstanceGroups.listInstances" call. +// Exactly one of *RegionInstanceGroupsListInstances or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RegionInstanceGroupsListInstances.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -159989,7 +165905,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &RegionInstanceGroupsListInstances{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -160001,22 +165917,45 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. The orderBy query parameter is not supported.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", + // "id": "compute.regionInstanceGroups.listInstances", // "parameterOrder": [ // "project", // "region", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group.", + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "instanceGroup": { + // "description": "Name of the regional instance group for which we want to list the instances.", // "location": "path", // "required": true, // "type": "string" // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -160030,53 +165969,75 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + // "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", // "request": { - // "$ref": "RegionInstanceGroupManagersSetTemplateRequest" + // "$ref": "RegionInstanceGroupsListInstancesRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "RegionInstanceGroupsListInstances" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.regionInstanceGroupManagers.setTargetPools": +// 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 *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) 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 RegionInstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.regionInstanceGroups.setNamedPorts": + +type RegionInstanceGroupsSetNamedPortsCall struct { + s *Service + project string + region string + instanceGroup string + regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetTargetPools: Modifies the target pools to which all new instances -// in this group are assigned. Existing instances in the group are not -// affected. +// SetNamedPorts: Sets the named ports for the specified regional +// instance group. // -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { - c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the regional instance group where the +// named ports are updated. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { + c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest + c.instanceGroup = instanceGroup + c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest return c } @@ -160091,7 +166052,7 @@ func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, regi // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { +func (c *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -160099,7 +166060,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { +func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -160107,21 +166068,21 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) 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 *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { +func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { +func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -160129,14 +166090,14 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupssetnamedportsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -160144,21 +166105,21 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. +// Do executes the "compute.regionInstanceGroups.setNamedPorts" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -160189,18 +166150,18 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + // "description": "Sets the named ports for the specified regional instance group.", + // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.setTargetPools", + // "id": "compute.regionInstanceGroups.setNamedPorts", // "parameterOrder": [ // "project", // "region", - // "instanceGroupManager" + // "instanceGroup" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "Name of the managed instance group.", + // "instanceGroup": { + // "description": "The name of the regional instance group where the named ports are updated.", // "location": "path", // "required": true, // "type": "string" @@ -160224,9 +166185,9 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.Cal // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + // "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", // "request": { - // "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" + // "$ref": "RegionInstanceGroupsSetNamedPortsRequest" // }, // "response": { // "$ref": "Operation" @@ -160239,9 +166200,9 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.Cal } -// method id "compute.regionInstanceGroupManagers.testIamPermissions": +// method id "compute.regionInstanceGroups.testIamPermissions": -type RegionInstanceGroupManagersTestIamPermissionsCall struct { +type RegionInstanceGroupsTestIamPermissionsCall struct { s *Service project string region string @@ -160258,8 +166219,8 @@ type RegionInstanceGroupManagersTestIamPermissionsCall struct { // - project: Project ID for this request. // - region: The name of the region for this request. // - resource: Name or id of the resource for this request. -func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { - c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { + c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.resource = resource @@ -160270,7 +166231,7 @@ func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersTestIamPermissionsCall { +func (c *RegionInstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -160278,21 +166239,21 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) 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 *RegionInstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupManagersTestIamPermissionsCall { +func (c *RegionInstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header { +func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -160307,7 +166268,7 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) 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, "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -160322,14 +166283,14 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.testIamPermissions" call. +// Do executes the "compute.regionInstanceGroups.testIamPermissions" call. // Exactly one of *TestPermissionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -160361,9 +166322,9 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", + // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.testIamPermissions", + // "id": "compute.regionInstanceGroups.testIamPermissions", // "parameterOrder": [ // "project", // "region", @@ -160392,7 +166353,7 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", + // "path": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", // "request": { // "$ref": "TestPermissionsRequest" // }, @@ -160408,230 +166369,29 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi } -// method id "compute.regionInstanceGroupManagers.update": +// method id "compute.regionInstanceTemplates.delete": -type RegionInstanceGroupManagersUpdateCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceTemplatesDeleteCall struct { + s *Service + project string + region string + instanceTemplate string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates a managed instance group using the information that -// you specify in the request. This operation is marked as DONE when the -// group is updated even if the instances in the group have not yet been -// updated. You must separately verify the status of the individual -// instances with the listmanagedinstances method. If you update your -// group to specify a new template or instance configuration, it's -// possible that your intended specification for each VM in the group is -// different from the current state of that VM. To learn how to apply an -// updated configuration to the VMs in a MIG, see Updating instances in -// a MIG. +// Delete: Deletes the specified instance template. Deleting an instance +// template is permanent and cannot be undone. // -// - instanceGroupManager: The name of the instance group manager. +// - instanceTemplate: The name of the instance template to delete. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { - c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersUpdateCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *RegionInstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdateCall { - 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 *RegionInstanceGroupManagersUpdateCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, 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.instancegroupmanager) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "httpMethod": "PUT", - // "id": "compute.regionInstanceGroupManagers.update", - // "parameterOrder": [ - // "project", - // "region", - // "instanceGroupManager" - // ], - // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the instance group manager.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" - // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - // "request": { - // "$ref": "InstanceGroupManager" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" - // ] - // } - -} - -// method id "compute.regionInstanceGroupManagers.updatePerInstanceConfigs": - -type RegionInstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePerInstanceConfigs: Inserts or updates per-instance -// configurations for the managed instance group. perInstanceConfig.name -// serves as a key used to distinguish whether to perform insert or -// patch. -// -// - instanceGroupManager: The name of the managed instance group. It -// should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) UpdatePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionInstanceTemplatesService) Delete(project string, region string, instanceTemplate string) *RegionInstanceTemplatesDeleteCall { + c := &RegionInstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerupdateinstanceconfigreq = regioninstancegroupmanagerupdateinstanceconfigreq + c.instanceTemplate = instanceTemplate return c } @@ -160646,7 +166406,7 @@ func (r *RegionInstanceGroupManagersService) UpdatePerInstanceConfigs(project st // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *RegionInstanceTemplatesDeleteCall) RequestId(requestId string) *RegionInstanceTemplatesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -160654,7 +166414,7 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *RegionInstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -160662,21 +166422,21 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...go // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *RegionInstanceTemplatesDeleteCall) Context(ctx context.Context) *RegionInstanceTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { +func (c *RegionInstanceTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -160684,36 +166444,31 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerupdateinstanceconfigreq) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, + "instanceTemplate": c.instanceTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.updatePerInstanceConfigs" call. +// Do executes the "compute.regionInstanceTemplates.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -160744,19 +166499,20 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...goo } return ret, nil // { - // "description": "Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "httpMethod": "DELETE", + // "id": "compute.regionInstanceTemplates.delete", // "parameterOrder": [ // "project", // "region", - // "instanceGroupManager" + // "instanceTemplate" // ], // "parameters": { - // "instanceGroupManager": { - // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "instanceTemplate": { + // "description": "The name of the instance template to delete.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -160768,8 +166524,9 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...goo // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request, should conform to RFC1035.", + // "description": "The name of the region for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -160779,10 +166536,7 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...goo // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - // "request": { - // "$ref": "RegionInstanceGroupManagerUpdateInstanceConfigReq" - // }, + // "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", // "response": { // "$ref": "Operation" // }, @@ -160794,36 +166548,36 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...goo } -// method id "compute.regionInstanceGroups.get": +// method id "compute.regionInstanceTemplates.get": -type RegionInstanceGroupsGetCall struct { - s *Service - project string - region string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionInstanceTemplatesGetCall struct { + s *Service + project string + region string + instanceTemplate string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified instance group resource. +// Get: Returns the specified instance template. // -// - instanceGroup: Name of the instance group resource to return. +// - instanceTemplate: The name of the instance template. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { - c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionInstanceTemplatesService) Get(project string, region string, instanceTemplate string) *RegionInstanceTemplatesGetCall { + c := &RegionInstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroup = instanceGroup + c.instanceTemplate = instanceTemplate return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall { +func (c *RegionInstanceTemplatesGetCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -160833,7 +166587,7 @@ func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstan // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall { +func (c *RegionInstanceTemplatesGetCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -160841,21 +166595,21 @@ func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInsta // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall { +func (c *RegionInstanceTemplatesGetCall) Context(ctx context.Context) *RegionInstanceTemplatesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupsGetCall) Header() http.Header { +func (c *RegionInstanceTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -160868,7 +166622,7 @@ func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -160876,21 +166630,21 @@ func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, + "project": c.project, + "region": c.region, + "instanceTemplate": c.instanceTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroups.get" call. -// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.regionInstanceTemplates.get" call. +// Exactly one of *InstanceTemplate or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceTemplate.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { +func (c *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -160909,7 +166663,7 @@ func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instanc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroup{ + ret := &InstanceTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -160921,19 +166675,20 @@ func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Returns the specified instance group resource.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", + // "description": "Returns the specified instance template.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.get", + // "id": "compute.regionInstanceTemplates.get", // "parameterOrder": [ // "project", // "region", - // "instanceGroup" + // "instanceTemplate" // ], // "parameters": { - // "instanceGroup": { - // "description": "Name of the instance group resource to return.", + // "instanceTemplate": { + // "description": "The name of the instance template.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -160945,15 +166700,16 @@ func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instanc // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "description": "The name of the region for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", + // "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", // "response": { - // "$ref": "InstanceGroup" + // "$ref": "InstanceTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -160964,163 +166720,91 @@ func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instanc } -// method id "compute.regionInstanceGroups.list": +// method id "compute.regionInstanceTemplates.insert": -type RegionInstanceGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionInstanceTemplatesInsertCall struct { + s *Service + project string + region string + instancetemplate *InstanceTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of instance group resources contained within -// the specified region. +// Insert: Creates an instance template in the specified project and +// region using the global instance template whose URL is included in +// the request. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { - c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionInstanceTemplatesService) Insert(project string, region string, instancetemplate *InstanceTemplate) *RegionInstanceTemplatesInsertCall { + c := &RegionInstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.instancetemplate = instancetemplate return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *RegionInstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceTemplatesInsertCall) RequestId(requestId string) *RegionInstanceTemplatesInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall { +func (c *RegionInstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall { +func (c *RegionInstanceTemplatesInsertCall) Context(ctx context.Context) *RegionInstanceTemplatesInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupsListCall) Header() http.Header { +func (c *RegionInstanceTemplatesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, 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.instancetemplate) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -161132,14 +166816,14 @@ func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroups.list" call. -// Exactly one of *RegionInstanceGroupList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, error) { +// Do executes the "compute.regionInstanceTemplates.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -161158,7 +166842,7 @@ func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*Region if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionInstanceGroupList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -161170,38 +166854,15 @@ func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*Region } return ret, nil // { - // "description": "Retrieves the list of instance group resources contained within the specified region.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroups", - // "httpMethod": "GET", - // "id": "compute.regionInstanceGroups.list", + // "description": "Creates an instance template in the specified project and region using the global instance template whose URL is included in the request.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + // "httpMethod": "POST", + // "id": "compute.regionInstanceTemplates.insert", // "parameterOrder": [ // "project", // "region" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -161210,80 +166871,54 @@ func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*Region // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "description": "The name of the region for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroups", + // "path": "projects/{project}/regions/{region}/instanceTemplates", + // "request": { + // "$ref": "InstanceTemplate" + // }, // "response": { - // "$ref": "RegionInstanceGroupList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) 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 "compute.regionInstanceGroups.listInstances": +// method id "compute.regionInstanceTemplates.list": -type RegionInstanceGroupsListInstancesCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceTemplatesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ListInstances: Lists the instances in the specified instance group -// and displays information about the named ports. Depending on the -// specified options, this method can list all instances or only the -// instances that are running. The orderBy query parameter is not -// supported. +// List: Retrieves a list of instance templates that are contained +// within the specified project and region. // -// - instanceGroup: Name of the regional instance group for which we -// want to list the instances. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { - c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the regions for this request. +func (r *RegionInstanceTemplatesService) List(project string, region string) *RegionInstanceTemplatesListCall { + c := &RegionInstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest return c } @@ -161322,7 +166957,7 @@ func (r *RegionInstanceGroupsService) ListInstances(project string, region strin // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall { +func (c *RegionInstanceTemplatesListCall) Filter(filter string) *RegionInstanceTemplatesListCall { c.urlParams_.Set("filter", filter) return c } @@ -161333,7 +166968,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionIns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall { +func (c *RegionInstanceTemplatesListCall) MaxResults(maxResults int64) *RegionInstanceTemplatesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -161347,7 +166982,7 @@ func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *Re // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall { +func (c *RegionInstanceTemplatesListCall) OrderBy(orderBy string) *RegionInstanceTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -161355,7 +166990,7 @@ func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionI // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall { +func (c *RegionInstanceTemplatesListCall) PageToken(pageToken string) *RegionInstanceTemplatesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -161364,7 +166999,7 @@ func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *Reg // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *RegionInstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListInstancesCall { +func (c *RegionInstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceTemplatesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -161372,67 +167007,73 @@ func (c *RegionInstanceGroupsListInstancesCall) ReturnPartialSuccess(returnParti // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall { +func (c *RegionInstanceTemplatesListCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionInstanceTemplatesListCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall { +func (c *RegionInstanceTemplatesListCall) Context(ctx context.Context) *RegionInstanceTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { +func (c *RegionInstanceTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceTemplatesListCall) doRequest(alt string) (*http.Response, 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.regioninstancegroupslistinstancesrequest) - 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, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") 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{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroups.listInstances" call. -// Exactly one of *RegionInstanceGroupsListInstances or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *RegionInstanceGroupsListInstances.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, error) { +// Do executes the "compute.regionInstanceTemplates.list" call. +// Exactly one of *InstanceTemplateList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceTemplateList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -161451,7 +167092,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionInstanceGroupsListInstances{ + ret := &InstanceTemplateList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -161463,14 +167104,13 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. The orderBy query parameter is not supported.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.listInstances", + // "description": "Retrieves a list of instance templates that are contained within the specified project and region.", + // "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + // "httpMethod": "GET", + // "id": "compute.regionInstanceTemplates.list", // "parameterOrder": [ // "project", - // "region", - // "instanceGroup" + // "region" // ], // "parameters": { // "filter": { @@ -161478,12 +167118,6 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) // "location": "query", // "type": "string" // }, - // "instanceGroup": { - // "description": "Name of the regional instance group for which we want to list the instances.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -161510,8 +167144,9 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "description": "The name of the regions for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -161521,12 +167156,9 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - // "request": { - // "$ref": "RegionInstanceGroupsListInstancesRequest" - // }, + // "path": "projects/{project}/regions/{region}/instanceTemplates", // "response": { - // "$ref": "RegionInstanceGroupsListInstances" + // "$ref": "InstanceTemplateList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -161540,7 +167172,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) error) error { +func (c *RegionInstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -161558,32 +167190,28 @@ func (c *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f fun } } -// method id "compute.regionInstanceGroups.setNamedPorts": +// method id "compute.regionInstances.bulkInsert": -type RegionInstanceGroupsSetNamedPortsCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstancesBulkInsertCall struct { + s *Service + project string + region string + bulkinsertinstanceresource *BulkInsertInstanceResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetNamedPorts: Sets the named ports for the specified regional -// instance group. +// BulkInsert: Creates multiple instances in a given region. Count +// specifies the number of instances to create. // -// - instanceGroup: The name of the regional instance group where the -// named ports are updated. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { - c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionInstancesService) BulkInsert(project string, region string, bulkinsertinstanceresource *BulkInsertInstanceResource) *RegionInstancesBulkInsertCall { + c := &RegionInstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest + c.bulkinsertinstanceresource = bulkinsertinstanceresource return c } @@ -161598,7 +167226,7 @@ func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region strin // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall { +func (c *RegionInstancesBulkInsertCall) RequestId(requestId string) *RegionInstancesBulkInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -161606,7 +167234,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall { +func (c *RegionInstancesBulkInsertCall) Fields(s ...googleapi.Field) *RegionInstancesBulkInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -161614,21 +167242,21 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *Re // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall { +func (c *RegionInstancesBulkInsertCall) Context(ctx context.Context) *RegionInstancesBulkInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { +func (c *RegionInstancesBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -161636,14 +167264,14 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupssetnamedportsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertinstanceresource) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instances/bulkInsert") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -161651,21 +167279,20 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroups.setNamedPorts" call. +// Do executes the "compute.regionInstances.bulkInsert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -161696,22 +167323,15 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the named ports for the specified regional instance group.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", + // "description": "Creates multiple instances in a given region. Count specifies the number of instances to create.", + // "flatPath": "projects/{project}/regions/{region}/instances/bulkInsert", // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.setNamedPorts", + // "id": "compute.regionInstances.bulkInsert", // "parameterOrder": [ // "project", - // "region", - // "instanceGroup" + // "region" // ], // "parameters": { - // "instanceGroup": { - // "description": "The name of the regional instance group where the named ports are updated.", - // "location": "path", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -161720,8 +167340,9 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "description": "The name of the region for this request.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -161731,9 +167352,9 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", + // "path": "projects/{project}/regions/{region}/instances/bulkInsert", // "request": { - // "$ref": "RegionInstanceGroupsSetNamedPortsRequest" + // "$ref": "BulkInsertInstanceResource" // }, // "response": { // "$ref": "Operation" @@ -161746,38 +167367,56 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) } -// method id "compute.regionInstanceGroups.testIamPermissions": +// method id "compute.regionInstantSnapshots.delete": -type RegionInstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstantSnapshotsDeleteCall struct { + s *Service + project string + region string + instantSnapshot string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Delete: Deletes the specified InstantSnapshot resource. Keep in mind +// that deleting a single instantSnapshot might not necessarily delete +// all the data on that instantSnapshot. If any data on the +// instantSnapshot that is marked for deletion is needed for subsequent +// instantSnapshots, the data will be moved to the next corresponding +// instantSnapshot. For more information, see Deleting instantSnapshots. // +// - instantSnapshot: Name of the InstantSnapshot resource to delete. // - project: Project ID for this request. // - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { - c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstantSnapshotsService) Delete(project string, region string, instantSnapshot string) *RegionInstantSnapshotsDeleteCall { + c := &RegionInstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.instantSnapshot = instantSnapshot + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstantSnapshotsDeleteCall) RequestId(requestId string) *RegionInstantSnapshotsDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsTestIamPermissionsCall { +func (c *RegionInstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -161785,21 +167424,21 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) 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 *RegionInstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupsTestIamPermissionsCall { +func (c *RegionInstantSnapshotsDeleteCall) Context(ctx context.Context) *RegionInstantSnapshotsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { +func (c *RegionInstantSnapshotsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -161807,36 +167446,31 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroups.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.regionInstantSnapshots.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstantSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -161855,7 +167489,7 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -161867,16 +167501,23 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.regionInstanceGroups.testIamPermissions", + // "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting a single instantSnapshot might not necessarily delete all the data on that instantSnapshot. If any data on the instantSnapshot that is marked for deletion is needed for subsequent instantSnapshots, the data will be moved to the next corresponding instantSnapshot. For more information, see Deleting instantSnapshots.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", + // "httpMethod": "DELETE", + // "id": "compute.regionInstantSnapshots.delete", // "parameterOrder": [ // "project", // "region", - // "resource" + // "instantSnapshot" // ], // "parameters": { + // "instantSnapshot": { + // "description": "Name of the InstantSnapshot resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -161891,53 +167532,49 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOp // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.regionInstanceTemplates.delete": +// method id "compute.regionInstantSnapshots.export": -type RegionInstanceTemplatesDeleteCall struct { - s *Service - project string - region string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstantSnapshotsExportCall struct { + s *Service + project string + region string + instantSnapshot string + regioninstantsnapshotsexportrequest *RegionInstantSnapshotsExportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified instance template. Deleting an instance -// template is permanent and cannot be undone. +// Export: Export the changed blocks between two instant snapshots to a +// customer's bucket in the user specified format. // -// - instanceTemplate: The name of the instance template to delete. +// - instantSnapshot: Name of the instant snapshot to export. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Delete(project string, region string, instanceTemplate string) *RegionInstanceTemplatesDeleteCall { - c := &RegionInstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the zone for this request. +func (r *RegionInstantSnapshotsService) Export(project string, region string, instantSnapshot string, regioninstantsnapshotsexportrequest *RegionInstantSnapshotsExportRequest) *RegionInstantSnapshotsExportCall { + c := &RegionInstantSnapshotsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceTemplate = instanceTemplate + c.instantSnapshot = instantSnapshot + c.regioninstantsnapshotsexportrequest = regioninstantsnapshotsexportrequest return c } @@ -161952,7 +167589,7 @@ func (r *RegionInstanceTemplatesService) Delete(project string, region string, i // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceTemplatesDeleteCall) RequestId(requestId string) *RegionInstanceTemplatesDeleteCall { +func (c *RegionInstantSnapshotsExportCall) RequestId(requestId string) *RegionInstantSnapshotsExportCall { c.urlParams_.Set("requestId", requestId) return c } @@ -161960,7 +167597,7 @@ func (c *RegionInstanceTemplatesDeleteCall) RequestId(requestId string) *RegionI // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesDeleteCall { +func (c *RegionInstantSnapshotsExportCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsExportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -161968,21 +167605,21 @@ func (c *RegionInstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *Region // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceTemplatesDeleteCall) Context(ctx context.Context) *RegionInstanceTemplatesDeleteCall { +func (c *RegionInstantSnapshotsExportCall) Context(ctx context.Context) *RegionInstantSnapshotsExportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceTemplatesDeleteCall) Header() http.Header { +func (c *RegionInstantSnapshotsExportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstantSnapshotsExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -161990,31 +167627,36 @@ func (c *RegionInstanceTemplatesDeleteCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstantsnapshotsexportrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}/export") 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{ - "project": c.project, - "region": c.region, - "instanceTemplate": c.instanceTemplate, + "project": c.project, + "region": c.region, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceTemplates.delete" call. +// Do executes the "compute.regionInstantSnapshots.export" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstantSnapshotsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -162045,18 +167687,18 @@ func (c *RegionInstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone.", - // "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - // "httpMethod": "DELETE", - // "id": "compute.regionInstanceTemplates.delete", + // "description": "Export the changed blocks between two instant snapshots to a customer's bucket in the user specified format.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}/export", + // "httpMethod": "POST", + // "id": "compute.regionInstantSnapshots.export", // "parameterOrder": [ // "project", // "region", - // "instanceTemplate" + // "instantSnapshot" // ], // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template to delete.", + // "instantSnapshot": { + // "description": "Name of the instant snapshot to export.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -162070,7 +167712,7 @@ func (c *RegionInstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*O // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "The name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -162082,7 +167724,10 @@ func (c *RegionInstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*O // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}/export", + // "request": { + // "$ref": "RegionInstantSnapshotsExportRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -162094,36 +167739,37 @@ func (c *RegionInstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*O } -// method id "compute.regionInstanceTemplates.get": +// method id "compute.regionInstantSnapshots.get": -type RegionInstanceTemplatesGetCall struct { - s *Service - project string - region string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionInstantSnapshotsGetCall struct { + s *Service + project string + region string + instantSnapshot string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified instance template. +// Get: Returns the specified InstantSnapshot resource in the specified +// region. // -// - instanceTemplate: The name of the instance template. +// - instantSnapshot: Name of the InstantSnapshot resource to return. // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Get(project string, region string, instanceTemplate string) *RegionInstanceTemplatesGetCall { - c := &RegionInstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstantSnapshotsService) Get(project string, region string, instantSnapshot string) *RegionInstantSnapshotsGetCall { + c := &RegionInstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceTemplate = instanceTemplate + c.instantSnapshot = instantSnapshot return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceTemplatesGetCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesGetCall { +func (c *RegionInstantSnapshotsGetCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -162133,7 +167779,7 @@ func (c *RegionInstanceTemplatesGetCall) Fields(s ...googleapi.Field) *RegionIns // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *RegionInstanceTemplatesGetCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesGetCall { +func (c *RegionInstantSnapshotsGetCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -162141,21 +167787,21 @@ func (c *RegionInstanceTemplatesGetCall) IfNoneMatch(entityTag string) *RegionIn // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceTemplatesGetCall) Context(ctx context.Context) *RegionInstanceTemplatesGetCall { +func (c *RegionInstantSnapshotsGetCall) Context(ctx context.Context) *RegionInstantSnapshotsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceTemplatesGetCall) Header() http.Header { +func (c *RegionInstantSnapshotsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstantSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -162168,7 +167814,7 @@ func (c *RegionInstanceTemplatesGetCall) 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, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -162176,21 +167822,21 @@ func (c *RegionInstanceTemplatesGetCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceTemplate": c.instanceTemplate, + "project": c.project, + "region": c.region, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceTemplates.get" call. -// Exactly one of *InstanceTemplate or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.regionInstantSnapshots.get" call. +// Exactly one of *InstantSnapshot or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *InstantSnapshot.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { +func (c *RegionInstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -162209,7 +167855,7 @@ func (c *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*Inst if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplate{ + ret := &InstantSnapshot{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -162221,18 +167867,18 @@ func (c *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*Inst } return ret, nil // { - // "description": "Returns the specified instance template.", - // "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "description": "Returns the specified InstantSnapshot resource in the specified region.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", // "httpMethod": "GET", - // "id": "compute.regionInstanceTemplates.get", + // "id": "compute.regionInstantSnapshots.get", // "parameterOrder": [ // "project", // "region", - // "instanceTemplate" + // "instantSnapshot" // ], // "parameters": { - // "instanceTemplate": { - // "description": "The name of the instance template.", + // "instantSnapshot": { + // "description": "Name of the InstantSnapshot resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -162253,9 +167899,9 @@ func (c *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*Inst // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", + // "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", // "response": { - // "$ref": "InstanceTemplate" + // "$ref": "InstantSnapshot" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -162266,29 +167912,213 @@ func (c *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*Inst } -// method id "compute.regionInstanceTemplates.insert": +// method id "compute.regionInstantSnapshots.getIamPolicy": -type RegionInstanceTemplatesInsertCall struct { - s *Service - project string - region string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstantSnapshotsGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Creates an instance template in the specified project and -// region using the global instance template whose URL is included in -// the request. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Insert(project string, region string, instancetemplate *InstanceTemplate) *RegionInstanceTemplatesInsertCall { - c := &RegionInstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotsService) GetIamPolicy(project string, region string, resource string) *RegionInstantSnapshotsGetIamPolicyCall { + c := &RegionInstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instancetemplate = instancetemplate + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionInstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionInstantSnapshotsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionInstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstantSnapshotsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshots.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RegionInstantSnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.regionInstantSnapshots.getIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionInstantSnapshots.insert": + +type RegionInstantSnapshotsInsertCall struct { + s *Service + project string + region string + instantsnapshot *InstantSnapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates an instant snapshot in the specified region. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionInstantSnapshotsService) Insert(project string, region string, instantsnapshot *InstantSnapshot) *RegionInstantSnapshotsInsertCall { + c := &RegionInstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instantsnapshot = instantsnapshot return c } @@ -162303,7 +168133,7 @@ func (r *RegionInstanceTemplatesService) Insert(project string, region string, i // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceTemplatesInsertCall) RequestId(requestId string) *RegionInstanceTemplatesInsertCall { +func (c *RegionInstantSnapshotsInsertCall) RequestId(requestId string) *RegionInstantSnapshotsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -162311,7 +168141,7 @@ func (c *RegionInstanceTemplatesInsertCall) RequestId(requestId string) *RegionI // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesInsertCall { +func (c *RegionInstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -162319,21 +168149,21 @@ func (c *RegionInstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *Region // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceTemplatesInsertCall) Context(ctx context.Context) *RegionInstanceTemplatesInsertCall { +func (c *RegionInstantSnapshotsInsertCall) Context(ctx context.Context) *RegionInstantSnapshotsInsertCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceTemplatesInsertCall) Header() http.Header { +func (c *RegionInstantSnapshotsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -162341,14 +168171,14 @@ func (c *RegionInstanceTemplatesInsertCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantsnapshot) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -162362,14 +168192,14 @@ func (c *RegionInstanceTemplatesInsertCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceTemplates.insert" call. +// Do executes the "compute.regionInstantSnapshots.insert" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstantSnapshotsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -162400,10 +168230,10 @@ func (c *RegionInstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates an instance template in the specified project and region using the global instance template whose URL is included in the request.", - // "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + // "description": "Creates an instant snapshot in the specified region.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots", // "httpMethod": "POST", - // "id": "compute.regionInstanceTemplates.insert", + // "id": "compute.regionInstantSnapshots.insert", // "parameterOrder": [ // "project", // "region" @@ -162417,7 +168247,7 @@ func (c *RegionInstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*O // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -162429,9 +168259,9 @@ func (c *RegionInstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*O // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instanceTemplates", + // "path": "projects/{project}/regions/{region}/instantSnapshots", // "request": { - // "$ref": "InstanceTemplate" + // "$ref": "InstantSnapshot" // }, // "response": { // "$ref": "Operation" @@ -162444,9 +168274,9 @@ func (c *RegionInstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*O } -// method id "compute.regionInstanceTemplates.list": +// method id "compute.regionInstantSnapshots.list": -type RegionInstanceTemplatesListCall struct { +type RegionInstantSnapshotsListCall struct { s *Service project string region string @@ -162456,13 +168286,13 @@ type RegionInstanceTemplatesListCall struct { header_ http.Header } -// List: Retrieves a list of instance templates that are contained -// within the specified project and region. +// List: Retrieves the list of InstantSnapshot resources contained +// within the specified region. // // - project: Project ID for this request. -// - region: The name of the regions for this request. -func (r *RegionInstanceTemplatesService) List(project string, region string) *RegionInstanceTemplatesListCall { - c := &RegionInstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionInstantSnapshotsService) List(project string, region string) *RegionInstantSnapshotsListCall { + c := &RegionInstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -162503,7 +168333,7 @@ func (r *RegionInstanceTemplatesService) List(project string, region string) *Re // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *RegionInstanceTemplatesListCall) Filter(filter string) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) Filter(filter string) *RegionInstantSnapshotsListCall { c.urlParams_.Set("filter", filter) return c } @@ -162514,7 +168344,7 @@ func (c *RegionInstanceTemplatesListCall) Filter(filter string) *RegionInstanceT // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *RegionInstanceTemplatesListCall) MaxResults(maxResults int64) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) MaxResults(maxResults int64) *RegionInstantSnapshotsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -162528,7 +168358,7 @@ func (c *RegionInstanceTemplatesListCall) MaxResults(maxResults int64) *RegionIn // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *RegionInstanceTemplatesListCall) OrderBy(orderBy string) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) OrderBy(orderBy string) *RegionInstantSnapshotsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -162536,7 +168366,7 @@ func (c *RegionInstanceTemplatesListCall) OrderBy(orderBy string) *RegionInstanc // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *RegionInstanceTemplatesListCall) PageToken(pageToken string) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) PageToken(pageToken string) *RegionInstantSnapshotsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -162545,7 +168375,7 @@ func (c *RegionInstanceTemplatesListCall) PageToken(pageToken string) *RegionIns // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *RegionInstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstantSnapshotsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -162553,7 +168383,7 @@ func (c *RegionInstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSucc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstanceTemplatesListCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -162563,7 +168393,7 @@ func (c *RegionInstanceTemplatesListCall) Fields(s ...googleapi.Field) *RegionIn // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *RegionInstanceTemplatesListCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsListCall { c.ifNoneMatch_ = entityTag return c } @@ -162571,21 +168401,21 @@ func (c *RegionInstanceTemplatesListCall) IfNoneMatch(entityTag string) *RegionI // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstanceTemplatesListCall) Context(ctx context.Context) *RegionInstanceTemplatesListCall { +func (c *RegionInstantSnapshotsListCall) Context(ctx context.Context) *RegionInstantSnapshotsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstanceTemplatesListCall) Header() http.Header { +func (c *RegionInstantSnapshotsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -162598,7 +168428,7 @@ func (c *RegionInstanceTemplatesListCall) 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, "projects/{project}/regions/{region}/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -162612,14 +168442,14 @@ func (c *RegionInstanceTemplatesListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceTemplates.list" call. -// Exactly one of *InstanceTemplateList or error will be non-nil. Any +// Do executes the "compute.regionInstantSnapshots.list" call. +// Exactly one of *InstantSnapshotList or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.ServerResponse.Header or (if a response was +// *InstantSnapshotList.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { +func (c *RegionInstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -162638,7 +168468,7 @@ func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*Ins if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplateList{ + ret := &InstantSnapshotList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -162650,10 +168480,10 @@ func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*Ins } return ret, nil // { - // "description": "Retrieves a list of instance templates that are contained within the specified project and region.", - // "flatPath": "projects/{project}/regions/{region}/instanceTemplates", + // "description": "Retrieves the list of InstantSnapshot resources contained within the specified region.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots", // "httpMethod": "GET", - // "id": "compute.regionInstanceTemplates.list", + // "id": "compute.regionInstantSnapshots.list", // "parameterOrder": [ // "project", // "region" @@ -162690,7 +168520,7 @@ func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*Ins // "type": "string" // }, // "region": { - // "description": "The name of the regions for this request.", + // "description": "The name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -162702,9 +168532,9 @@ func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*Ins // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/instanceTemplates", + // "path": "projects/{project}/regions/{region}/instantSnapshots", // "response": { - // "$ref": "InstanceTemplateList" + // "$ref": "InstantSnapshotList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -162718,7 +168548,7 @@ func (c *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*Ins // 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 *RegionInstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { +func (c *RegionInstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -162736,28 +168566,200 @@ func (c *RegionInstanceTemplatesListCall) Pages(ctx context.Context, f func(*Ins } } -// method id "compute.regionInstances.bulkInsert": +// method id "compute.regionInstantSnapshots.setIamPolicy": -type RegionInstancesBulkInsertCall struct { - s *Service - project string - region string - bulkinsertinstanceresource *BulkInsertInstanceResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstantSnapshotsSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BulkInsert: Creates multiple instances in a given region. Count -// specifies the number of instances to create. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionInstancesService) BulkInsert(project string, region string, bulkinsertinstanceresource *BulkInsertInstanceResource) *RegionInstancesBulkInsertCall { - c := &RegionInstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionInstantSnapshotsSetIamPolicyCall { + c := &RegionInstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.bulkinsertinstanceresource = bulkinsertinstanceresource + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetIamPolicyCall { + 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 *RegionInstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstantSnapshotsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.regionsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshots.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RegionInstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.regionInstantSnapshots.setIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", + // "request": { + // "$ref": "RegionSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionInstantSnapshots.setLabels": + +type RegionInstantSnapshotsSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on a instantSnapshot in the given region. +// To learn more about labels, read the Labeling Resources +// documentation. +// +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionInstantSnapshotsSetLabelsCall { + c := &RegionInstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest return c } @@ -162772,7 +168774,7 @@ func (r *RegionInstancesService) BulkInsert(project string, region string, bulki // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstancesBulkInsertCall) RequestId(requestId string) *RegionInstancesBulkInsertCall { +func (c *RegionInstantSnapshotsSetLabelsCall) RequestId(requestId string) *RegionInstantSnapshotsSetLabelsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -162780,7 +168782,7 @@ func (c *RegionInstancesBulkInsertCall) RequestId(requestId string) *RegionInsta // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RegionInstancesBulkInsertCall) Fields(s ...googleapi.Field) *RegionInstancesBulkInsertCall { +func (c *RegionInstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -162788,21 +168790,21 @@ func (c *RegionInstancesBulkInsertCall) Fields(s ...googleapi.Field) *RegionInst // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RegionInstancesBulkInsertCall) Context(ctx context.Context) *RegionInstancesBulkInsertCall { +func (c *RegionInstantSnapshotsSetLabelsCall) Context(ctx context.Context) *RegionInstantSnapshotsSetLabelsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RegionInstancesBulkInsertCall) Header() http.Header { +func (c *RegionInstantSnapshotsSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -162810,14 +168812,14 @@ func (c *RegionInstancesBulkInsertCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertinstanceresource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instances/bulkInsert") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -162825,20 +168827,21 @@ func (c *RegionInstancesBulkInsertCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstances.bulkInsert" call. +// Do executes the "compute.regionInstantSnapshots.setLabels" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *RegionInstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -162869,13 +168872,14 @@ func (c *RegionInstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates multiple instances in a given region. Count specifies the number of instances to create.", - // "flatPath": "projects/{project}/regions/{region}/instances/bulkInsert", + // "description": "Sets the labels on a instantSnapshot in the given region. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", // "httpMethod": "POST", - // "id": "compute.regionInstances.bulkInsert", + // "id": "compute.regionInstantSnapshots.setLabels", // "parameterOrder": [ // "project", - // "region" + // "region", + // "resource" // ], // "parameters": { // "project": { @@ -162886,7 +168890,7 @@ func (c *RegionInstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Opera // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "The region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -162896,11 +168900,18 @@ func (c *RegionInstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Opera // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/instances/bulkInsert", + // "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", // "request": { - // "$ref": "BulkInsertInstanceResource" + // "$ref": "RegionSetLabelsRequest" // }, // "response": { // "$ref": "Operation" @@ -162913,6 +168924,175 @@ func (c *RegionInstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Opera } +// method id "compute.regionInstantSnapshots.testIamPermissions": + +type RegionInstantSnapshotsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstantSnapshotsTestIamPermissionsCall { + c := &RegionInstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsTestIamPermissionsCall { + 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 *RegionInstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstantSnapshotsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstantSnapshotsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshots.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.regionInstantSnapshots.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.regionNetworkEndpointGroups.delete": type RegionNetworkEndpointGroupsDeleteCall struct { @@ -203241,6 +209421,196 @@ func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInsta } } +// method id "compute.targetInstances.setSecurityPolicy": + +type TargetInstancesSetSecurityPolicyCall struct { + s *Service + project string + zone string + targetInstance string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified target instance. For more information, see Google Cloud +// Armor Overview +// +// - project: Project ID for this request. +// - targetInstance: Name of the TargetInstance resource to which the +// security policy should be set. The name should conform to RFC1035. +// - zone: Name of the zone scoping this request. +func (r *TargetInstancesService) SetSecurityPolicy(project string, zone string, targetInstance string, securitypolicyreference *SecurityPolicyReference) *TargetInstancesSetSecurityPolicyCall { + c := &TargetInstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.targetInstance = targetInstance + c.securitypolicyreference = securitypolicyreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *TargetInstancesSetSecurityPolicyCall) RequestId(requestId string) *TargetInstancesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetInstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetInstancesSetSecurityPolicyCall { + 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 *TargetInstancesSetSecurityPolicyCall) Context(ctx context.Context) *TargetInstancesSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetInstancesSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetInstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, 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.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy") + 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{ + "project": c.project, + "zone": c.zone, + "targetInstance": c.targetInstance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.targetInstances.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *TargetInstancesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.targetInstances.setSecurityPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "targetInstance" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetInstance": { + // "description": "Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.targetInstances.testIamPermissions": type TargetInstancesTestIamPermissionsCall struct { @@ -205651,6 +212021,196 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, } +// method id "compute.targetPools.setSecurityPolicy": + +type TargetPoolsSetSecurityPolicyCall struct { + s *Service + project string + region string + targetPool string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified target pool. For more information, see Google Cloud +// Armor Overview +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - targetPool: Name of the TargetPool resource to which the security +// policy should be set. The name should conform to RFC1035. +func (r *TargetPoolsService) SetSecurityPolicy(project string, region string, targetPool string, securitypolicyreference *SecurityPolicyReference) *TargetPoolsSetSecurityPolicyCall { + c := &TargetPoolsSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetPool = targetPool + c.securitypolicyreference = securitypolicyreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsSetSecurityPolicyCall) RequestId(requestId string) *TargetPoolsSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetPoolsSetSecurityPolicyCall { + 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 *TargetPoolsSetSecurityPolicyCall) Context(ctx context.Context) *TargetPoolsSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetPoolsSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetPoolsSetSecurityPolicyCall) doRequest(alt string) (*http.Response, 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.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy") + 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{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.targetPools.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *TargetPoolsSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.targetPools.setSecurityPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.targetPools.testIamPermissions": type TargetPoolsTestIamPermissionsCall struct { diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 2f0b6679b19..e090d8c62e7 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -11766,6 +11766,100 @@ } } }, + "interconnectRemoteLocations": { + "methods": { + "get": { + "description": "Returns the details for the specified interconnect remote location. Gets a list of available interconnect remote locations by making a list() request.", + "flatPath": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + "httpMethod": "GET", + "id": "compute.interconnectRemoteLocations.get", + "parameterOrder": [ + "project", + "interconnectRemoteLocation" + ], + "parameters": { + "interconnectRemoteLocation": { + "description": "Name of the interconnect remote location to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + "response": { + "$ref": "InterconnectRemoteLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Retrieves the list of interconnect remote locations available to the specified project.", + "flatPath": "projects/{project}/global/interconnectRemoteLocations", + "httpMethod": "GET", + "id": "compute.interconnectRemoteLocations.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/interconnectRemoteLocations", + "response": { + "$ref": "InterconnectRemoteLocationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "interconnects": { "methods": { "delete": { @@ -33275,7 +33369,7 @@ } } }, - "revision": "20230425", + "revision": "20230502", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -35981,6 +36075,13 @@ "$ref": "Duration", "description": "Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED." }, + "metadatas": { + "additionalProperties": { + "type": "string" + }, + "description": "Deployment metadata associated with the resource to be set by a GKE hub controller and read by the backend RCTH", + "type": "object" + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -42769,6 +42870,10 @@ }, "type": "array" }, + "pathTemplateMatch": { + "description": "If specified, the route is a pattern match expression that must match the :path header once the query string is removed. A pattern match allows you to match - The value must be between 1 and 1024 characters - The pattern must start with a leading slash (\"/\") - There may be no more than 5 operators in pattern Precisely one of prefix_match, full_path_match, regex_match or path_template_match must be set.", + "type": "string" + }, "prefixMatch": { "description": "For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be from 1 to 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.", "type": "string" @@ -46791,6 +46896,10 @@ "format": "int32", "type": "integer" }, + "remoteLocation": { + "description": "Indicates that this is a Cross-Cloud Interconnect. This field specifies the location outside of Google's network that the interconnect is connected to.", + "type": "string" + }, "requestedLinkCount": { "description": "Target number of physical links in the link bundle, as requested by the customer.", "format": "int32", @@ -46885,6 +46994,10 @@ "description": "This field is not available.", "type": "string" }, + "configurationConstraints": { + "$ref": "InterconnectAttachmentConfigurationConstraints", + "description": "[Output Only] Constraints for this attachment, if any. The attachment does not work if these constraints are not met." + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -47016,6 +47129,10 @@ "description": "[Output Only] URL of the region where the regional interconnect attachment resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", "type": "string" }, + "remoteService": { + "description": "[Output Only] If the attachment is on a Cross-Cloud Interconnect connection, this field contains the interconnect's remote location service provider. Example values: \"Amazon Web Services\" \"Microsoft Azure\". The field is set only for attachments on Cross-Cloud Interconnect connections. Its value is copied from the InterconnectRemoteLocation remoteService field.", + "type": "string" + }, "router": { "description": "URL of the Cloud Router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.", "type": "string" @@ -47062,6 +47179,11 @@ ], "type": "string" }, + "subnetLength": { + "description": "Length of the IPv4 subnet mask. Allowed values: - 29 (default) - 30 The default value is 29, except for Cross-Cloud Interconnect connections that use an InterconnectRemoteLocation with a constraints.subnetLengthRange.min equal to 30. For example, connections that use an Azure remote location fall into this category. In these cases, the default value is 30, and requesting 29 returns an error. Where both 29 and 30 are allowed, 29 is preferred, because it gives Google Cloud Support more debugging visibility. ", + "format": "int32", + "type": "integer" + }, "type": { "description": "The type of interconnect attachment this is, which can take one of the following values: - DEDICATED: an attachment to a Dedicated Interconnect. - PARTNER: an attachment to a Partner Interconnect, created by the customer. - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by the partner. ", "enum": [ @@ -47211,6 +47333,47 @@ }, "type": "object" }, + "InterconnectAttachmentConfigurationConstraints": { + "id": "InterconnectAttachmentConfigurationConstraints", + "properties": { + "bgpMd5": { + "description": "[Output Only] Whether the attachment's BGP session requires/allows/disallows BGP MD5 authentication. This can take one of the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. For example, a Cross-Cloud Interconnect connection to a remote cloud provider that requires BGP MD5 authentication has the interconnectRemoteLocation attachment_configuration_constraints.bgp_md5 field set to MD5_REQUIRED, and that property is propagated to the attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if MD5 is requested.", + "enum": [ + "MD5_OPTIONAL", + "MD5_REQUIRED", + "MD5_UNSUPPORTED" + ], + "enumDescriptions": [ + "MD5_OPTIONAL: BGP MD5 authentication is supported and can optionally be configured.", + "MD5_REQUIRED: BGP MD5 authentication must be configured.", + "MD5_UNSUPPORTED: BGP MD5 authentication must not be configured" + ], + "type": "string" + }, + "bgpPeerAsnRanges": { + "description": "[Output Only] List of ASN ranges that the remote location is known to support. Formatted as an array of inclusive ranges {min: min-value, max: max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}] allows the peer ASN to be 123 or anything in the range 64512-65534. This field is only advisory. Although the API accepts other ranges, these are the ranges that we recommend.", + "items": { + "$ref": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" + }, + "type": "array" + } + }, + "type": "object" + }, + "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange": { + "id": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", + "properties": { + "max": { + "format": "uint32", + "type": "integer" + }, + "min": { + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, "InterconnectAttachmentList": { "description": "Response to the list request, and contains a list of interconnect attachments.", "id": "InterconnectAttachmentList", @@ -48104,6 +48267,308 @@ }, "type": "object" }, + "InterconnectRemoteLocation": { + "description": "Represents a Cross-Cloud Interconnect Remote Location resource. You can use this resource to find remote location details about an Interconnect attachment (VLAN).", + "id": "InterconnectRemoteLocation", + "properties": { + "address": { + "description": "[Output Only] The postal address of the Point of Presence, each line in the address is separated by a newline character.", + "type": "string" + }, + "attachmentConfigurationConstraints": { + "$ref": "InterconnectAttachmentConfigurationConstraints", + "description": "[Output Only] Subset of fields from InterconnectAttachment's |configurationConstraints| field that apply to all attachments for this remote location." + }, + "city": { + "description": "[Output Only] Metropolitan area designator that indicates which city an interconnect is located. For example: \"Chicago, IL\", \"Amsterdam, Netherlands\".", + "type": "string" + }, + "constraints": { + "$ref": "InterconnectRemoteLocationConstraints", + "description": "[Output Only] Constraints on the parameters for creating Cross-Cloud Interconnect and associated InterconnectAttachments." + }, + "continent": { + "description": "[Output Only] Continent for this location, which can take one of the following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - SOUTH_AMERICA ", + "enum": [ + "AFRICA", + "ASIA_PAC", + "EUROPE", + "NORTH_AMERICA", + "SOUTH_AMERICA" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "[Output Only] An optional description of the resource.", + "type": "string" + }, + "facilityProvider": { + "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX).", + "type": "string" + }, + "facilityProviderFacilityId": { + "description": "[Output Only] A provider-assigned Identifier for this facility (e.g., Ashburn-DC1).", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#interconnectRemoteLocation", + "description": "[Output Only] Type of the resource. Always compute#interconnectRemoteLocation for interconnect remote locations.", + "type": "string" + }, + "lacp": { + "description": "[Output Only] Link Aggregation Control Protocol (LACP) constraints, which can take one of the following values: LACP_SUPPORTED, LACP_UNSUPPORTED", + "enum": [ + "LACP_SUPPORTED", + "LACP_UNSUPPORTED" + ], + "enumDescriptions": [ + "LACP_SUPPORTED: LACP is supported, and enabled by default on the Cross-Cloud Interconnect.", + "LACP_UNSUPPORTED: LACP is not supported and is not be enabled on this port. GetDiagnostics shows bundleAggregationType as \"static\". GCP does not support LAGs without LACP, so requestedLinkCount must be 1." + ], + "type": "string" + }, + "maxLagSize100Gbps": { + "description": "[Output Only] The maximum number of 100 Gbps ports supported in a link aggregation group (LAG). When linkType is 100 Gbps, requestedLinkCount cannot exceed max_lag_size_100_gbps.", + "format": "int32", + "type": "integer" + }, + "maxLagSize10Gbps": { + "description": "[Output Only] The maximum number of 10 Gbps ports supported in a link aggregation group (LAG). When linkType is 10 Gbps, requestedLinkCount cannot exceed max_lag_size_10_gbps.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "[Output Only] Name of the resource.", + "type": "string" + }, + "peeringdbFacilityId": { + "description": "[Output Only] The peeringdb identifier for this facility (corresponding with a netfac type in peeringdb).", + "type": "string" + }, + "permittedConnections": { + "description": "[Output Only] Permitted connections.", + "items": { + "$ref": "InterconnectRemoteLocationPermittedConnections" + }, + "type": "array" + }, + "remoteService": { + "description": "[Output Only] Indicates the service provider present at the remote location. Example values: \"Amazon Web Services\", \"Microsoft Azure\".", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "status": { + "description": "[Output Only] The status of this InterconnectRemoteLocation, which can take one of the following values: - CLOSED: The InterconnectRemoteLocation is closed and is unavailable for provisioning new Cross-Cloud Interconnects. - AVAILABLE: The InterconnectRemoteLocation is available for provisioning new Cross-Cloud Interconnects. ", + "enum": [ + "AVAILABLE", + "CLOSED" + ], + "enumDescriptions": [ + "The InterconnectRemoteLocation is available for provisioning new Cross-Cloud Interconnects.", + "The InterconnectRemoteLocation is closed for provisioning new Cross-Cloud Interconnects." + ], + "type": "string" + } + }, + "type": "object" + }, + "InterconnectRemoteLocationConstraints": { + "id": "InterconnectRemoteLocationConstraints", + "properties": { + "portPairRemoteLocation": { + "description": "[Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location.", + "enum": [ + "PORT_PAIR_MATCHING_REMOTE_LOCATION", + "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" + ], + "enumDescriptions": [ + "If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider allocates ports in pairs, and the user should choose the same remote location for both ports.", + "If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision a redundant pair of Cross-Cloud Interconnects using two different remote locations in the same city." + ], + "type": "string" + }, + "portPairVlan": { + "description": "[Output Only] Port pair VLAN constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN", + "enum": [ + "PORT_PAIR_MATCHING_VLAN", + "PORT_PAIR_UNCONSTRAINED_VLAN" + ], + "enumDescriptions": [ + "If PORT_PAIR_MATCHING_VLAN, the Interconnect for this attachment is part of a pair of ports that should have matching VLAN allocations. This occurs with Cross-Cloud Interconnect to Azure remote locations. While GCP's API does not explicitly group pairs of ports, the UI uses this field to ensure matching VLAN ids when configuring a redundant VLAN pair.", + "PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint." + ], + "type": "string" + }, + "subnetLengthRange": { + "$ref": "InterconnectRemoteLocationConstraintsSubnetLengthRange", + "description": "[Output Only] [min-length, max-length] The minimum and maximum value (inclusive) for the IPv4 subnet length. For example, an interconnectRemoteLocation for Azure has {min: 30, max: 30} because Azure requires /30 subnets. This range specifies the values supported by both cloud providers. Interconnect currently supports /29 and /30 IPv4 subnet lengths. If a remote cloud has no constraint on IPv4 subnet length, the range would thus be {min: 29, max: 30}. " + } + }, + "type": "object" + }, + "InterconnectRemoteLocationConstraintsSubnetLengthRange": { + "id": "InterconnectRemoteLocationConstraintsSubnetLengthRange", + "properties": { + "max": { + "format": "int32", + "type": "integer" + }, + "min": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InterconnectRemoteLocationList": { + "description": "Response to the list request, and contains a list of interconnect remote locations.", + "id": "InterconnectRemoteLocationList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of InterconnectRemoteLocation resources.", + "items": { + "$ref": "InterconnectRemoteLocation" + }, + "type": "array" + }, + "kind": { + "default": "compute#interconnectRemoteLocationList", + "description": "[Output Only] Type of resource. Always compute#interconnectRemoteLocationList for lists of interconnect remote locations.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token lets you get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InterconnectRemoteLocationPermittedConnections": { + "id": "InterconnectRemoteLocationPermittedConnections", + "properties": { + "interconnectLocation": { + "description": "[Output Only] URL of an Interconnect location that is permitted to connect to this Interconnect remote location.", + "type": "string" + } + }, + "type": "object" + }, "InterconnectsGetDiagnosticsResponse": { "description": "Response for the InterconnectsGetDiagnosticsRequest.", "id": "InterconnectsGetDiagnosticsResponse", @@ -48841,7 +49306,7 @@ "type": "integer" }, "guestAcceleratorType": { - "description": "The accelerator type resource name, not a full URL, e.g. 'nvidia-tesla-k80'.", + "description": "The accelerator type resource name, not a full URL, e.g. nvidia-tesla-t4.", "type": "string" } }, @@ -49720,7 +50185,7 @@ "type": "string" }, "fingerprint": { - "description": "[Output Only] Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch.", + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch.", "format": "byte", "type": "string" }, @@ -59883,7 +60348,7 @@ "type": "array" }, "sourceSubnetworkIpRangesToNat": { - "description": "Specify the Nat option, which can take one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat. - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other Router.Nat section in any Router for this network in this region.", + "description": "Specify the Nat option, which can take one of the following values: - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every Subnetwork are allowed to Nat. - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field subnetwork below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there should not be any other Router.Nat section in any Router for this network in this region.", "enum": [ "ALL_SUBNETWORKS_ALL_IP_RANGES", "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", @@ -62534,6 +62999,7 @@ "name": { "annotations": { "required": [ + "compute.disks.createSnapshot", "compute.snapshots.insert" ] }, @@ -63974,7 +64440,7 @@ "type": "string" }, "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "type": "boolean" }, "externalIpv6Prefix": { @@ -64056,7 +64522,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", @@ -64078,7 +64544,7 @@ "type": "string" }, "role": { - "description": "The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", + "description": "The role of subnetwork. Currently, this field is only used when purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ "ACTIVE", "BACKUP" @@ -64399,7 +64865,7 @@ "type": "string" }, "enable": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled.", + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. Flow logging isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "type": "boolean" }, "filterExpr": { @@ -68308,6 +68774,10 @@ "pathPrefixRewrite": { "description": "Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.", "type": "string" + }, + "pathTemplateRewrite": { + "description": " If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.", + "type": "string" } }, "type": "object" @@ -68345,7 +68815,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.", + "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", @@ -68363,7 +68833,7 @@ "type": "string" }, "role": { - "description": "The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", + "description": "The role of subnetwork. Currently, this field is only used when purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Envoy-based load balancers in a region. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ "ACTIVE", "BACKUP" diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index e7137d8da6b..b7ece31c8c4 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -173,6 +173,7 @@ func New(client *http.Client) (*Service, error) { s.Instances = NewInstancesService(s) s.InterconnectAttachments = NewInterconnectAttachmentsService(s) s.InterconnectLocations = NewInterconnectLocationsService(s) + s.InterconnectRemoteLocations = NewInterconnectRemoteLocationsService(s) s.Interconnects = NewInterconnectsService(s) s.LicenseCodes = NewLicenseCodesService(s) s.Licenses = NewLicensesService(s) @@ -300,6 +301,8 @@ type Service struct { InterconnectLocations *InterconnectLocationsService + InterconnectRemoteLocations *InterconnectRemoteLocationsService + Interconnects *InterconnectsService LicenseCodes *LicenseCodesService @@ -686,6 +689,15 @@ type InterconnectLocationsService struct { s *Service } +func NewInterconnectRemoteLocationsService(s *Service) *InterconnectRemoteLocationsService { + rs := &InterconnectRemoteLocationsService{s: s} + return rs +} + +type InterconnectRemoteLocationsService struct { + s *Service +} + func NewInterconnectsService(s *Service) *InterconnectsService { rs := &InterconnectsService{s: s} return rs @@ -5623,6 +5635,10 @@ type BackendService struct { // loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED. MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` + // Metadatas: Deployment metadata associated with the resource to be set + // by a GKE hub controller and read by the backend RCTH + Metadatas map[string]string `json:"metadatas,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -16735,6 +16751,15 @@ type HttpRouteRuleMatch struct { // validateForProxyless field set to true. MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` + // PathTemplateMatch: If specified, the route is a pattern match + // expression that must match the :path header once the query string is + // removed. A pattern match allows you to match - The value must be + // between 1 and 1024 characters - The pattern must start with a leading + // slash ("/") - There may be no more than 5 operators in pattern + // Precisely one of prefix_match, full_path_match, regex_match or + // path_template_match must be set. + PathTemplateMatch string `json:"pathTemplateMatch,omitempty"` + // PrefixMatch: For satisfying the matchRule condition, the request's // path must begin with the specified prefixMatch. prefixMatch must // begin with a /. The value must be from 1 to 1024 characters. Only one @@ -23033,6 +23058,11 @@ type Interconnect struct { // provisioned in this interconnect. ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"` + // RemoteLocation: Indicates that this is a Cross-Cloud Interconnect. + // This field specifies the location outside of Google's network that + // the interconnect is connected to. + RemoteLocation string `json:"remoteLocation,omitempty"` + // RequestedLinkCount: Target number of physical links in the link // bundle, as requested by the customer. RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` @@ -23148,6 +23178,11 @@ type InterconnectAttachment struct { // CloudRouterIpv6InterfaceId: This field is not available. CloudRouterIpv6InterfaceId string `json:"cloudRouterIpv6InterfaceId,omitempty"` + // ConfigurationConstraints: [Output Only] Constraints for this + // attachment, if any. The attachment does not work if these constraints + // are not met. + ConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"configurationConstraints,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -23317,6 +23352,14 @@ type InterconnectAttachment struct { // body. Region string `json:"region,omitempty"` + // RemoteService: [Output Only] If the attachment is on a Cross-Cloud + // Interconnect connection, this field contains the interconnect's + // remote location service provider. Example values: "Amazon Web + // Services" "Microsoft Azure". The field is set only for attachments on + // Cross-Cloud Interconnect connections. Its value is copied from the + // InterconnectRemoteLocation remoteService field. + RemoteService string `json:"remoteService,omitempty"` + // Router: URL of the Cloud Router to be used for dynamic routing. This // router must be in the same region as this InterconnectAttachment. The // InterconnectAttachment will automatically connect the Interconnect to @@ -23380,6 +23423,16 @@ type InterconnectAttachment struct { // yet, because turnup is not complete. State string `json:"state,omitempty"` + // SubnetLength: Length of the IPv4 subnet mask. Allowed values: - 29 + // (default) - 30 The default value is 29, except for Cross-Cloud + // Interconnect connections that use an InterconnectRemoteLocation with + // a constraints.subnetLengthRange.min equal to 30. For example, + // connections that use an Azure remote location fall into this + // category. In these cases, the default value is 30, and requesting 29 + // returns an error. Where both 29 and 30 are allowed, 29 is preferred, + // because it gives Google Cloud Support more debugging visibility. + SubnetLength int64 `json:"subnetLength,omitempty"` + // Type: The type of interconnect attachment this is, which can take one // of the following values: - DEDICATED: an attachment to a Dedicated // Interconnect. - PARTNER: an attachment to a Partner Interconnect, @@ -23618,139 +23671,37 @@ func (s *InterconnectAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentList: Response to the list request, and -// contains a list of interconnect attachments. -type InterconnectAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of InterconnectAttachment resources. - Items []*InterconnectAttachment `json:"items,omitempty"` - - // Kind: [Output Only] Type of resource. Always - // compute#interconnectAttachmentList for lists of interconnect - // attachments. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty 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. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentList - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentListWarning: [Output Only] Informational -// warning message. -type InterconnectAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. +type InterconnectAttachmentConfigurationConstraints struct { + // BgpMd5: [Output Only] Whether the attachment's BGP session + // requires/allows/disallows BGP MD5 authentication. This can take one + // of the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. + // For example, a Cross-Cloud Interconnect connection to a remote cloud + // provider that requires BGP MD5 authentication has the + // interconnectRemoteLocation + // attachment_configuration_constraints.bgp_md5 field set to + // MD5_REQUIRED, and that property is propagated to the attachment. + // Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if MD5 + // is requested. // // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentListWarningData `json:"data,omitempty"` + // "MD5_OPTIONAL" - MD5_OPTIONAL: BGP MD5 authentication is supported + // and can optionally be configured. + // "MD5_REQUIRED" - MD5_REQUIRED: BGP MD5 authentication must be + // configured. + // "MD5_UNSUPPORTED" - MD5_UNSUPPORTED: BGP MD5 authentication must + // not be configured + BgpMd5 string `json:"bgpMd5,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // BgpPeerAsnRanges: [Output Only] List of ASN ranges that the remote + // location is known to support. Formatted as an array of inclusive + // ranges {min: min-value, max: max-value}. For example, [{min: 123, + // max: 123}, {min: 64512, max: 65534}] allows the peer ASN to be 123 or + // anything in the range 64512-65534. This field is only advisory. + // Although the API accepts other ranges, these are the ranges that we + // recommend. + BgpPeerAsnRanges []*InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange `json:"bgpPeerAsnRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "BgpMd5") 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 @@ -23758,7 +23709,7 @@ type InterconnectAttachmentListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "BgpMd5") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -23767,27 +23718,18 @@ type InterconnectAttachmentListWarning struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarning +func (s *InterconnectAttachmentConfigurationConstraints) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentConfigurationConstraints raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InterconnectAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange struct { + Max int64 `json:"max,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + Min int64 `json:"min,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Max") 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 @@ -23795,7 +23737,7 @@ type InterconnectAttachmentListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Max") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -23804,67 +23746,46 @@ type InterconnectAttachmentListWarningData struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarningData +func (s *InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentPartnerMetadata: Informational metadata about -// Partner attachments from Partners to display to customers. These -// fields are propagated from PARTNER_PROVIDER attachments to their -// corresponding PARTNER attachments. -type InterconnectAttachmentPartnerMetadata struct { - // InterconnectName: Plain text name of the Interconnect this attachment - // is connected to, as displayed in the Partner's portal. For instance - // "Chicago 1". This value may be validated to match approved Partner - // values. - InterconnectName string `json:"interconnectName,omitempty"` +// InterconnectAttachmentList: Response to the list request, and +// contains a list of interconnect attachments. +type InterconnectAttachmentList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // PartnerName: Plain text name of the Partner providing this - // attachment. This value may be validated to match approved Partner - // values. - PartnerName string `json:"partnerName,omitempty"` + // Items: A list of InterconnectAttachment resources. + Items []*InterconnectAttachment `json:"items,omitempty"` - // PortalUrl: URL of the Partner's portal for this Attachment. Partners - // may customise this to be a deep link to the specific resource on the - // Partner portal. This value may be validated to match approved Partner - // values. - PortalUrl string `json:"portalUrl,omitempty"` + // Kind: [Output Only] Type of resource. Always + // compute#interconnectAttachmentList for lists of interconnect + // attachments. + Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "InterconnectName") 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:"-"` + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` - // NullFields is a list of field names (e.g. "InterconnectName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` -func (s *InterconnectAttachmentPartnerMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPartnerMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Warning: [Output Only] Informational warning message. + Warning *InterconnectAttachmentListWarning `json:"warning,omitempty"` -// InterconnectAttachmentPrivateInfo: Information for an interconnect -// attachment when this belongs to an interconnect of type DEDICATED. -type InterconnectAttachmentPrivateInfo struct { - // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for - // traffic between Google and the customer, going to and from this - // network and region. - Tag8021q int64 `json:"tag8021q,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Tag8021q") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -23872,8 +23793,8 @@ type InterconnectAttachmentPrivateInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Tag8021q") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -23881,49 +23802,262 @@ type InterconnectAttachmentPrivateInfo struct { NullFields []string `json:"-"` } -func (s *InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPrivateInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentsScopedList struct { - // InterconnectAttachments: A list of interconnect attachments contained - // in this scope. - InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` - - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. - Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "InterconnectAttachments") 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. "InterconnectAttachments") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedList +func (s *InterconnectAttachmentList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachmentsScopedListWarning: Informational warning which -// replaces the list of addresses when the list is empty. -type InterconnectAttachmentsScopedListWarning struct { +// InterconnectAttachmentListWarning: [Output Only] Informational +// warning message. +type InterconnectAttachmentListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*InterconnectAttachmentListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentPartnerMetadata: Informational metadata about +// Partner attachments from Partners to display to customers. These +// fields are propagated from PARTNER_PROVIDER attachments to their +// corresponding PARTNER attachments. +type InterconnectAttachmentPartnerMetadata struct { + // InterconnectName: Plain text name of the Interconnect this attachment + // is connected to, as displayed in the Partner's portal. For instance + // "Chicago 1". This value may be validated to match approved Partner + // values. + InterconnectName string `json:"interconnectName,omitempty"` + + // PartnerName: Plain text name of the Partner providing this + // attachment. This value may be validated to match approved Partner + // values. + PartnerName string `json:"partnerName,omitempty"` + + // PortalUrl: URL of the Partner's portal for this Attachment. Partners + // may customise this to be a deep link to the specific resource on the + // Partner portal. This value may be validated to match approved Partner + // values. + PortalUrl string `json:"portalUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InterconnectName") 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. "InterconnectName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentPartnerMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentPartnerMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentPrivateInfo: Information for an interconnect +// attachment when this belongs to an interconnect of type DEDICATED. +type InterconnectAttachmentPrivateInfo struct { + // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for + // traffic between Google and the customer, going to and from this + // network and region. + Tag8021q int64 `json:"tag8021q,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Tag8021q") 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. "Tag8021q") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentPrivateInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentsScopedList struct { + // InterconnectAttachments: A list of interconnect attachments contained + // in this scope. + InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` + + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "InterconnectAttachments") 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. "InterconnectAttachments") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentsScopedListWarning: Informational warning which +// replaces the list of addresses when the list is empty. +type InterconnectAttachmentsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -25006,6 +25140,468 @@ func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect +// Remote Location resource. You can use this resource to find remote +// location details about an Interconnect attachment (VLAN). +type InterconnectRemoteLocation struct { + // Address: [Output Only] The postal address of the Point of Presence, + // each line in the address is separated by a newline character. + Address string `json:"address,omitempty"` + + // AttachmentConfigurationConstraints: [Output Only] Subset of fields + // from InterconnectAttachment's |configurationConstraints| field that + // apply to all attachments for this remote location. + AttachmentConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"attachmentConfigurationConstraints,omitempty"` + + // City: [Output Only] Metropolitan area designator that indicates which + // city an interconnect is located. For example: "Chicago, IL", + // "Amsterdam, Netherlands". + City string `json:"city,omitempty"` + + // Constraints: [Output Only] Constraints on the parameters for creating + // Cross-Cloud Interconnect and associated InterconnectAttachments. + Constraints *InterconnectRemoteLocationConstraints `json:"constraints,omitempty"` + + // Continent: [Output Only] Continent for this location, which can take + // one of the following values: - AFRICA - ASIA_PAC - EUROPE - + // NORTH_AMERICA - SOUTH_AMERICA + // + // Possible values: + // "AFRICA" + // "ASIA_PAC" + // "EUROPE" + // "NORTH_AMERICA" + // "SOUTH_AMERICA" + Continent string `json:"continent,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: [Output Only] An optional description of the resource. + Description string `json:"description,omitempty"` + + // FacilityProvider: [Output Only] The name of the provider for this + // facility (e.g., EQUINIX). + FacilityProvider string `json:"facilityProvider,omitempty"` + + // FacilityProviderFacilityId: [Output Only] A provider-assigned + // Identifier for this facility (e.g., Ashburn-DC1). + FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#interconnectRemoteLocation for interconnect remote locations. + Kind string `json:"kind,omitempty"` + + // Lacp: [Output Only] Link Aggregation Control Protocol (LACP) + // constraints, which can take one of the following values: + // LACP_SUPPORTED, LACP_UNSUPPORTED + // + // Possible values: + // "LACP_SUPPORTED" - LACP_SUPPORTED: LACP is supported, and enabled + // by default on the Cross-Cloud Interconnect. + // "LACP_UNSUPPORTED" - LACP_UNSUPPORTED: LACP is not supported and is + // not be enabled on this port. GetDiagnostics shows + // bundleAggregationType as "static". GCP does not support LAGs without + // LACP, so requestedLinkCount must be 1. + Lacp string `json:"lacp,omitempty"` + + // MaxLagSize100Gbps: [Output Only] The maximum number of 100 Gbps ports + // supported in a link aggregation group (LAG). When linkType is 100 + // Gbps, requestedLinkCount cannot exceed max_lag_size_100_gbps. + MaxLagSize100Gbps int64 `json:"maxLagSize100Gbps,omitempty"` + + // MaxLagSize10Gbps: [Output Only] The maximum number of 10 Gbps ports + // supported in a link aggregation group (LAG). When linkType is 10 + // Gbps, requestedLinkCount cannot exceed max_lag_size_10_gbps. + MaxLagSize10Gbps int64 `json:"maxLagSize10Gbps,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this + // facility (corresponding with a netfac type in peeringdb). + PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` + + // PermittedConnections: [Output Only] Permitted connections. + PermittedConnections []*InterconnectRemoteLocationPermittedConnections `json:"permittedConnections,omitempty"` + + // RemoteService: [Output Only] Indicates the service provider present + // at the remote location. Example values: "Amazon Web Services", + // "Microsoft Azure". + RemoteService string `json:"remoteService,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: [Output Only] The status of this InterconnectRemoteLocation, + // which can take one of the following values: - CLOSED: The + // InterconnectRemoteLocation is closed and is unavailable for + // provisioning new Cross-Cloud Interconnects. - AVAILABLE: The + // InterconnectRemoteLocation is available for provisioning new + // Cross-Cloud Interconnects. + // + // Possible values: + // "AVAILABLE" - The InterconnectRemoteLocation is available for + // provisioning new Cross-Cloud Interconnects. + // "CLOSED" - The InterconnectRemoteLocation is closed for + // provisioning new Cross-Cloud Interconnects. + Status string `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocation) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectRemoteLocationConstraints struct { + // PortPairRemoteLocation: [Output Only] Port pair remote location + // constraints, which can take one of the following values: + // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, + // PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to + // individual ports, but the UI uses this field when ordering a pair of + // ports, to prevent users from accidentally ordering something that is + // incompatible with their cloud provider. Specifically, when ordering a + // redundant pair of Cross-Cloud Interconnect ports, and one of them + // uses a remote location with portPairMatchingRemoteLocation set to + // matching, the UI requires that both ports use the same remote + // location. + // + // Possible values: + // "PORT_PAIR_MATCHING_REMOTE_LOCATION" - If + // PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider + // allocates ports in pairs, and the user should choose the same remote + // location for both ports. + // "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" - If + // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision + // a redundant pair of Cross-Cloud Interconnects using two different + // remote locations in the same city. + PortPairRemoteLocation string `json:"portPairRemoteLocation,omitempty"` + + // PortPairVlan: [Output Only] Port pair VLAN constraints, which can + // take one of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, + // PORT_PAIR_MATCHING_VLAN + // + // Possible values: + // "PORT_PAIR_MATCHING_VLAN" - If PORT_PAIR_MATCHING_VLAN, the + // Interconnect for this attachment is part of a pair of ports that + // should have matching VLAN allocations. This occurs with Cross-Cloud + // Interconnect to Azure remote locations. While GCP's API does not + // explicitly group pairs of ports, the UI uses this field to ensure + // matching VLAN ids when configuring a redundant VLAN pair. + // "PORT_PAIR_UNCONSTRAINED_VLAN" - PORT_PAIR_UNCONSTRAINED_VLAN means + // there is no constraint. + PortPairVlan string `json:"portPairVlan,omitempty"` + + // SubnetLengthRange: [Output Only] [min-length, max-length] The minimum + // and maximum value (inclusive) for the IPv4 subnet length. For + // example, an interconnectRemoteLocation for Azure has {min: 30, max: + // 30} because Azure requires /30 subnets. This range specifies the + // values supported by both cloud providers. Interconnect currently + // supports /29 and /30 IPv4 subnet lengths. If a remote cloud has no + // constraint on IPv4 subnet length, the range would thus be {min: 29, + // max: 30}. + SubnetLengthRange *InterconnectRemoteLocationConstraintsSubnetLengthRange `json:"subnetLengthRange,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PortPairRemoteLocation") 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. "PortPairRemoteLocation") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocationConstraints) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationConstraints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectRemoteLocationConstraintsSubnetLengthRange struct { + Max int64 `json:"max,omitempty"` + + Min int64 `json:"min,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Max") 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. "Max") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocationConstraintsSubnetLengthRange) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationConstraintsSubnetLengthRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectRemoteLocationList: Response to the list request, and +// contains a list of interconnect remote locations. +type InterconnectRemoteLocationList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of InterconnectRemoteLocation resources. + Items []*InterconnectRemoteLocation `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#interconnectRemoteLocationList for lists of interconnect + // remote locations. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token lets you get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will + // have their own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *InterconnectRemoteLocationListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocationList) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectRemoteLocationListWarning: [Output Only] Informational +// warning message. +type InterconnectRemoteLocationListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*InterconnectRemoteLocationListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocationListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectRemoteLocationListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty 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. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocationListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectRemoteLocationPermittedConnections struct { + // InterconnectLocation: [Output Only] URL of an Interconnect location + // that is permitted to connect to this Interconnect remote location. + InterconnectLocation string `json:"interconnectLocation,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "InterconnectLocation") 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. "InterconnectLocation") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectRemoteLocationPermittedConnections) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectRemoteLocationPermittedConnections + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InterconnectsGetDiagnosticsResponse: Response for the // InterconnectsGetDiagnosticsRequest. type InterconnectsGetDiagnosticsResponse struct { @@ -26252,7 +26848,7 @@ type MachineTypeAccelerators struct { GuestAcceleratorCount int64 `json:"guestAcceleratorCount,omitempty"` // GuestAcceleratorType: The accelerator type resource name, not a full - // URL, e.g. 'nvidia-tesla-k80'. + // URL, e.g. nvidia-tesla-t4. GuestAcceleratorType string `json:"guestAcceleratorType,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -27558,10 +28154,9 @@ type NetworkAttachment struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Fingerprint: [Output Only] Fingerprint of this resource. A hash of - // the contents stored in this object. This field is used in optimistic - // locking. An up-to-date fingerprint must be provided in order to - // patch. + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. An + // up-to-date fingerprint must be provided in order to patch. Fingerprint string `json:"fingerprint,omitempty"` // Id: [Output Only] The unique identifier for the resource type. The @@ -43175,10 +43770,9 @@ type RouterNat struct { // in every Subnetwork are allowed to Nat. - LIST_OF_SUBNETWORKS: A list // of Subnetworks are allowed to Nat (specified in the field subnetwork // below) The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. - // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or - // ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any - // other Router.Nat section in any Router for this network in this - // region. + // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then + // there should not be any other Router.Nat section in any Router for + // this network in this region. // // Possible values: // "ALL_SUBNETWORKS_ALL_IP_RANGES" - All the IP ranges in every @@ -49440,8 +50034,8 @@ type Subnetwork struct { // If this field is not explicitly set, it will not appear in get // listings. If not set the default behavior is determined by the org // policy, if there is no org policy specified, then it will default to - // disabled. This field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. + // disabled. This field isn't supported if the subnet purpose field is + // set to REGIONAL_MANAGED_PROXY. EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` // ExternalIpv6Prefix: The external IPv6 address range that is owned by @@ -49534,12 +50128,20 @@ type Subnetwork struct { PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` // Purpose: The purpose of the resource. This field can be either - // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created - // subnetwork that is reserved for Internal HTTP(S) Load Balancing. If - // unspecified, the purpose defaults to PRIVATE_RFC_1918. The - // enableFlowLogs field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. + // PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or + // INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in + // auto mode networks. A subnet with purpose set to + // REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved + // for regional Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private + // Service Connect. A subnet with purpose set to + // INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used + // only by regional internal HTTP(S) load balancers. Note that + // REGIONAL_MANAGED_PROXY is the preferred setting for all regional + // Envoy load balancers. If unspecified, the subnet purpose defaults to + // PRIVATE. The enableFlowLogs field isn't supported if the subnet + // purpose field is set to REGIONAL_MANAGED_PROXY. // // Possible values: // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal @@ -49558,9 +50160,9 @@ type Subnetwork struct { Region string `json:"region,omitempty"` // Role: The role of subnetwork. Currently, this field is only used when - // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to - // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being - // used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one + // purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + // BACKUP. An ACTIVE subnetwork is one that is currently being used for + // Envoy-based load balancers in a region. A BACKUP subnetwork is one // that is ready to be promoted to ACTIVE or is currently draining. This // field can be updated with a patch request. // @@ -50035,6 +50637,8 @@ type SubnetworkLogConfig struct { // field is not explicitly set, it will not appear in get listings. If // not set the default behavior is determined by the org policy, if // there is no org policy specified, then it will default to disabled. + // Flow logging isn't supported if the subnet purpose field is set to + // REGIONAL_MANAGED_PROXY. Enable bool `json:"enable,omitempty"` // FilterExpr: Can only be specified if VPC flow logs for this @@ -56512,6 +57116,22 @@ type UrlRewrite struct { // characters. PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` + // PathTemplateRewrite: If specified, the pattern rewrites the URL path + // (based on the :path header) using the HTTP template syntax. A + // corresponding path_template_match must be specified. Any template + // variables must exist in the path_template_match field. - -At least + // one variable must be specified in the path_template_match field - You + // can omit variables from the rewritten URL - The * and ** operators + // cannot be matched unless they have a corresponding variable name - + // e.g. {format=*} or {var=**}. For example, a path_template_match of + // /static/{format=**} could be rewritten as /static/content/{format} to + // prefix /content to the URL. Variables can also be re-ordered in a + // rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as + // /content/{format}/{country}/{suffix}. At least one non-empty + // routeRules[].matchRules[].path_template_match is required. Only one + // of path_prefix_rewrite or path_template_rewrite may be specified. + PathTemplateRewrite string `json:"pathTemplateRewrite,omitempty"` + // ForceSendFields is a list of field names (e.g. "HostRewrite") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -56565,12 +57185,20 @@ type UsableSubnetwork struct { Network string `json:"network,omitempty"` // Purpose: The purpose of the resource. This field can be either - // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created - // subnetwork that is reserved for Internal HTTP(S) Load Balancing. If - // unspecified, the purpose defaults to PRIVATE_RFC_1918. The - // enableFlowLogs field isn't supported with the purpose field set to - // INTERNAL_HTTPS_LOAD_BALANCER. + // PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or + // INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in + // auto mode networks. A subnet with purpose set to + // REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved + // for regional Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private + // Service Connect. A subnet with purpose set to + // INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used + // only by regional internal HTTP(S) load balancers. Note that + // REGIONAL_MANAGED_PROXY is the preferred setting for all regional + // Envoy load balancers. If unspecified, the subnet purpose defaults to + // PRIVATE. The enableFlowLogs field isn't supported if the subnet + // purpose field is set to REGIONAL_MANAGED_PROXY. // // Possible values: // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal @@ -56585,9 +57213,9 @@ type UsableSubnetwork struct { Purpose string `json:"purpose,omitempty"` // Role: The role of subnetwork. Currently, this field is only used when - // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to - // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being - // used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one + // purpose = REGIONAL_MANAGED_PROXY. The value can be set to ACTIVE or + // BACKUP. An ACTIVE subnetwork is one that is currently being used for + // Envoy-based load balancers in a region. A BACKUP subnetwork is one // that is ready to be promoted to ACTIVE or is currently draining. This // field can be updated with a patch request. // @@ -109084,6 +109712,449 @@ func (c *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*Inter } } +// method id "compute.interconnectRemoteLocations.get": + +type InterconnectRemoteLocationsGetCall struct { + s *Service + project string + interconnectRemoteLocation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details for the specified interconnect remote +// location. Gets a list of available interconnect remote locations by +// making a list() request. +// +// - interconnectRemoteLocation: Name of the interconnect remote +// location to return. +// - project: Project ID for this request. +func (r *InterconnectRemoteLocationsService) Get(project string, interconnectRemoteLocation string) *InterconnectRemoteLocationsGetCall { + c := &InterconnectRemoteLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnectRemoteLocation = interconnectRemoteLocation + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectRemoteLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InterconnectRemoteLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InterconnectRemoteLocationsGetCall) Context(ctx context.Context) *InterconnectRemoteLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InterconnectRemoteLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectRemoteLocationsGetCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}") + 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{ + "project": c.project, + "interconnectRemoteLocation": c.interconnectRemoteLocation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectRemoteLocations.get" call. +// Exactly one of *InterconnectRemoteLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *InterconnectRemoteLocation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &InterconnectRemoteLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the details for the specified interconnect remote location. Gets a list of available interconnect remote locations by making a list() request.", + // "flatPath": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + // "httpMethod": "GET", + // "id": "compute.interconnectRemoteLocations.get", + // "parameterOrder": [ + // "project", + // "interconnectRemoteLocation" + // ], + // "parameters": { + // "interconnectRemoteLocation": { + // "description": "Name of the interconnect remote location to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", + // "response": { + // "$ref": "InterconnectRemoteLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.interconnectRemoteLocations.list": + +type InterconnectRemoteLocationsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of interconnect remote locations available +// to the specified project. +// +// - project: Project ID for this request. +func (r *InterconnectRemoteLocationsService) List(project string) *InterconnectRemoteLocationsListCall { + c := &InterconnectRemoteLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *InterconnectRemoteLocationsListCall) Filter(filter string) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *InterconnectRemoteLocationsListCall) MaxResults(maxResults int64) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *InterconnectRemoteLocationsListCall) OrderBy(orderBy string) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *InterconnectRemoteLocationsListCall) PageToken(pageToken string) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *InterconnectRemoteLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InterconnectRemoteLocationsListCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InterconnectRemoteLocationsListCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InterconnectRemoteLocationsListCall) Context(ctx context.Context) *InterconnectRemoteLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InterconnectRemoteLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectRemoteLocationsListCall) doRequest(alt string) (*http.Response, 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, "projects/{project}/global/interconnectRemoteLocations") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectRemoteLocations.list" call. +// Exactly one of *InterconnectRemoteLocationList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *InterconnectRemoteLocationList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InterconnectRemoteLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocationList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &InterconnectRemoteLocationList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of interconnect remote locations available to the specified project.", + // "flatPath": "projects/{project}/global/interconnectRemoteLocations", + // "httpMethod": "GET", + // "id": "compute.interconnectRemoteLocations.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/global/interconnectRemoteLocations", + // "response": { + // "$ref": "InterconnectRemoteLocationList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *InterconnectRemoteLocationsListCall) Pages(ctx context.Context, f func(*InterconnectRemoteLocationList) 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 "compute.interconnects.delete": type InterconnectsDeleteCall struct { diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 649d59860d9..39ec11b2aea 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1444,7 +1444,7 @@ } } }, - "revision": "20230501", + "revision": "20230503", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -1852,7 +1852,7 @@ "readOnly": true }, "subscriptionType": { - "description": "Output only. This subscription type enum value states if the metrics should be sent for billing or not.", + "description": "Output only. This subscription type enum states the subscription type of the project.", "enum": [ "SUBSCRIPTION_TYPE_UNSPECIFIED", "PAY_G", @@ -1860,8 +1860,8 @@ ], "enumDescriptions": [ "Unspecified subscription type.", - "Metrics should be sent for billing for PayG type.", - "Metrics should not be sent for billing for Paid Subscription type." + "PayG subscription.", + "Paid Subscription." ], "readOnly": true, "type": "string" @@ -1962,7 +1962,7 @@ "Connection is being deleted.", "Connection is being updated.", "Connection is not running due to an error.", - "Connection is not running due to an auth error for the Oauth2 Auth Code based connector." + "Connection is not running because the authorization configuration is not complete." ], "type": "string" }, diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 66a74f250c7..58f8db19415 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -818,14 +818,13 @@ type Connection struct { // Status: Output only. Current status of the connection. Status *ConnectionStatus `json:"status,omitempty"` - // SubscriptionType: Output only. This subscription type enum value - // states if the metrics should be sent for billing or not. + // SubscriptionType: Output only. This subscription type enum states the + // subscription type of the project. // // Possible values: // "SUBSCRIPTION_TYPE_UNSPECIFIED" - Unspecified subscription type. - // "PAY_G" - Metrics should be sent for billing for PayG type. - // "PAID" - Metrics should not be sent for billing for Paid - // Subscription type. + // "PAY_G" - PayG subscription. + // "PAID" - Paid Subscription. SubscriptionType string `json:"subscriptionType,omitempty"` // Suspended: Optional. Suspended indicates if a user has suspended a @@ -936,8 +935,8 @@ type ConnectionStatus struct { // "DELETING" - Connection is being deleted. // "UPDATING" - Connection is being updated. // "ERROR" - Connection is not running due to an error. - // "AUTHORIZATION_REQUIRED" - Connection is not running due to an auth - // error for the Oauth2 Auth Code based connector. + // "AUTHORIZATION_REQUIRED" - Connection is not running because the + // authorization configuration is not complete. State string `json:"state,omitempty"` // Status: Status provides detailed information for the state. diff --git a/container/v1/container-api.json b/container/v1/container-api.json index c405dc58a9e..d83dca699da 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2489,7 +2489,7 @@ } } }, - "revision": "20230420", + "revision": "20230501", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3086,7 +3086,7 @@ }, "releaseChannel": { "$ref": "ReleaseChannel", - "description": "Release channel configuration." + "description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version." }, "resourceLabels": { "additionalProperties": { @@ -5284,7 +5284,7 @@ "type": "string" }, "targetLink": { - "description": "Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` - `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` - `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", + "description": "Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", "type": "string" }, "zone": { diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 8c472bc5d61..bb6b335b251 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -1225,7 +1225,12 @@ type Cluster struct { // PrivateClusterConfig: Configuration for private cluster. PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` - // ReleaseChannel: Release channel configuration. + // ReleaseChannel: Release channel configuration. If left unspecified on + // cluster creation and a version is specified, the cluster is enrolled + // in the most mature release channel where the version is available + // (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, + // if no release channel configuration and no version is specified, the + // cluster is enrolled in the REGULAR channel with its default version. ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` // ResourceLabels: The resource labels for the cluster to use to @@ -4983,11 +4988,11 @@ type Operation struct { // format of this is a URI to the resource being modified (such as a // cluster, node pool, or node). For node pool repairs, there may be // multiple nodes being repaired, but only one will be the target. - // Examples: - + // Examples: - ## // `https://container.googleapis.com/v1/projects/123/locations/us-central - // 1/clusters/my-cluster` - + // 1/clusters/my-cluster` ## // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/ - // clusters/my-cluster/nodePools/my-np` - + // clusters/my-cluster/nodePools/my-np` // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/ // clusters/my-cluster/nodePools/my-np/node/my-node` TargetLink string `json:"targetLink,omitempty"` diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 0cd761a30bc..91c8bb320ce 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2514,7 +2514,7 @@ } } }, - "revision": "20230420", + "revision": "20230501", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3167,7 +3167,7 @@ }, "releaseChannel": { "$ref": "ReleaseChannel", - "description": "Release channel configuration." + "description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version." }, "resourceLabels": { "additionalProperties": { @@ -5581,7 +5581,7 @@ "type": "string" }, "targetLink": { - "description": "Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - `https://container.googleapis.com/v1beta1/projects/123/locations/us-central1/clusters/my-cluster` - `https://container.googleapis.com/v1beta1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` - `https://container.googleapis.com/v1beta1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", + "description": "Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", "type": "string" }, "zone": { diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index aa21b4b7167..f467b95da4b 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -1313,7 +1313,12 @@ type Cluster struct { // ProtectConfig: Enable/Disable Protect API features for the cluster. ProtectConfig *ProtectConfig `json:"protectConfig,omitempty"` - // ReleaseChannel: Release channel configuration. + // ReleaseChannel: Release channel configuration. If left unspecified on + // cluster creation and a version is specified, the cluster is enrolled + // in the most mature release channel where the version is available + // (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, + // if no release channel configuration and no version is specified, the + // cluster is enrolled in the REGULAR channel with its default version. ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` // ResourceLabels: The resource labels for the cluster to use to @@ -5439,13 +5444,13 @@ type Operation struct { // format of this is a URI to the resource being modified (such as a // cluster, node pool, or node). For node pool repairs, there may be // multiple nodes being repaired, but only one will be the target. - // Examples: - - // `https://container.googleapis.com/v1beta1/projects/123/locations/us-ce - // ntral1/clusters/my-cluster` - - // `https://container.googleapis.com/v1beta1/projects/123/zones/us-centra - // l1-c/clusters/my-cluster/nodePools/my-np` - - // `https://container.googleapis.com/v1beta1/projects/123/zones/us-centra - // l1-c/clusters/my-cluster/nodePools/my-np/node/my-node` + // Examples: - ## + // `https://container.googleapis.com/v1/projects/123/locations/us-central + // 1/clusters/my-cluster` ## + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/ + // clusters/my-cluster/nodePools/my-np` + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/ + // clusters/my-cluster/nodePools/my-np/node/my-node` TargetLink string `json:"targetLink,omitempty"` // Zone: The name of the Google Compute Engine zone diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index f332cec9fb6..6cd5f808282 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -1822,6 +1822,38 @@ } } }, + "customers": { + "methods": { + "create": { + "description": "Allows uploading one customer information entry. Adding a customer with loyalty data enables the customer to see personalized loyalty annotations on search. Uploading a previously existing customer will overwrite the old entry.", + "flatPath": "{merchantId}/customers", + "httpMethod": "POST", + "id": "content.customers.create", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "Required. The ID of the account that owns the customer information.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/customers", + "request": { + "$ref": "Customer" + }, + "response": { + "$ref": "Customer" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, "datafeeds": { "methods": { "custombatch": { @@ -6225,7 +6257,7 @@ } } }, - "revision": "20230504", + "revision": "20230510", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -8178,6 +8210,32 @@ }, "type": "object" }, + "Customer": { + "description": "The object representing a customer to update data for. Includes a customer identifier (such as email address) and any associated metadata to add. LoyaltyData triggers adding customer data for the purpose of loyalty personalization.", + "id": "Customer", + "properties": { + "emailAddress": { + "description": "The customer's email address. No extra string processing needed.", + "type": "string" + }, + "loyaltyData": { + "$ref": "CustomerLoyaltyData", + "description": "Loyalty data associated with the customer." + } + }, + "type": "object" + }, + "CustomerLoyaltyData": { + "description": "The loyalty data of the customer.", + "id": "CustomerLoyaltyData", + "properties": { + "loyaltyTier": { + "description": "The tier information for the given user. Can be an empty string.", + "type": "string" + } + }, + "type": "object" + }, "CustomerReturnReason": { "id": "CustomerReturnReason", "properties": { diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index e9d470a52cd..3cffc310b27 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -126,6 +126,7 @@ func New(client *http.Client) (*APIService, error) { s.Collectionstatuses = NewCollectionstatusesService(s) s.Conversionsources = NewConversionsourcesService(s) s.Csses = NewCssesService(s) + s.Customers = NewCustomersService(s) s.Datafeeds = NewDatafeedsService(s) s.Datafeedstatuses = NewDatafeedstatusesService(s) s.Freelistingsprogram = NewFreelistingsprogramService(s) @@ -179,6 +180,8 @@ type APIService struct { Csses *CssesService + Customers *CustomersService + Datafeeds *DatafeedsService Datafeedstatuses *DatafeedstatusesService @@ -353,6 +356,15 @@ type CssesService struct { s *APIService } +func NewCustomersService(s *APIService) *CustomersService { + rs := &CustomersService{s: s} + return rs +} + +type CustomersService struct { + s *APIService +} + func NewDatafeedsService(s *APIService) *DatafeedsService { rs := &DatafeedsService{s: s} return rs @@ -3845,6 +3857,74 @@ func (s *CustomAttribute) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Customer: The object representing a customer to update data for. +// Includes a customer identifier (such as email address) and any +// associated metadata to add. LoyaltyData triggers adding customer data +// for the purpose of loyalty personalization. +type Customer struct { + // EmailAddress: The customer's email address. No extra string + // processing needed. + EmailAddress string `json:"emailAddress,omitempty"` + + // LoyaltyData: Loyalty data associated with the customer. + LoyaltyData *CustomerLoyaltyData `json:"loyaltyData,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EmailAddress") 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. "EmailAddress") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Customer) MarshalJSON() ([]byte, error) { + type NoMethod Customer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CustomerLoyaltyData: The loyalty data of the customer. +type CustomerLoyaltyData struct { + // LoyaltyTier: The tier information for the given user. Can be an empty + // string. + LoyaltyTier string `json:"loyaltyTier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LoyaltyTier") 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. "LoyaltyTier") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomerLoyaltyData) MarshalJSON() ([]byte, error) { + type NoMethod CustomerLoyaltyData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type CustomerReturnReason struct { // Description: Description of the reason. Description string `json:"description,omitempty"` @@ -28142,6 +28222,152 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { } +// method id "content.customers.create": + +type CustomersCreateCall struct { + s *APIService + merchantId int64 + customer *Customer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Allows uploading one customer information entry. Adding a +// customer with loyalty data enables the customer to see personalized +// loyalty annotations on search. Uploading a previously existing +// customer will overwrite the old entry. +// +// - merchantId: The ID of the account that owns the customer +// information. +func (r *CustomersService) Create(merchantId int64, customer *Customer) *CustomersCreateCall { + c := &CustomersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.customer = customer + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersCreateCall) Fields(s ...googleapi.Field) *CustomersCreateCall { + 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 *CustomersCreateCall) Context(ctx context.Context) *CustomersCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersCreateCall) doRequest(alt string) (*http.Response, 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.customer) + 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, "{merchantId}/customers") + 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{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.customers.create" call. +// Exactly one of *Customer or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Customer.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CustomersCreateCall) Do(opts ...googleapi.CallOption) (*Customer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Customer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Allows uploading one customer information entry. Adding a customer with loyalty data enables the customer to see personalized loyalty annotations on search. Uploading a previously existing customer will overwrite the old entry.", + // "flatPath": "{merchantId}/customers", + // "httpMethod": "POST", + // "id": "content.customers.create", + // "parameterOrder": [ + // "merchantId" + // ], + // "parameters": { + // "merchantId": { + // "description": "Required. The ID of the account that owns the customer information.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{merchantId}/customers", + // "request": { + // "$ref": "Customer" + // }, + // "response": { + // "$ref": "Customer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/content" + // ] + // } + +} + // method id "content.datafeeds.custombatch": type DatafeedsCustombatchCall struct { diff --git a/contentwarehouse/v1/contentwarehouse-api.json b/contentwarehouse/v1/contentwarehouse-api.json index e52801e2c9b..85616c693a2 100644 --- a/contentwarehouse/v1/contentwarehouse-api.json +++ b/contentwarehouse/v1/contentwarehouse-api.json @@ -1103,7 +1103,7 @@ } } }, - "revision": "20230508", + "revision": "20230512", "rootUrl": "https://contentwarehouse.googleapis.com/", "schemas": { "AbuseiamAbuseType": { @@ -5444,7 +5444,8 @@ "PEOPLE_PLAYGROUND", "NEWS_360", "DUO", - "MEET" + "MEET", + "MESSAGES" ], "enumDescriptions": [ "Should never be stored in practice", @@ -5464,7 +5465,8 @@ "See go/people-playground-design.", "Also mdb/social-magazines", "Aka Taychon", - "Aka Google Meet" + "Aka Google Meet", + "Aka Google Messages" ], "type": "string" }, @@ -5532,7 +5534,8 @@ "PEOPLE_PLAYGROUND", "NEWS_360", "DUO", - "MEET" + "MEET", + "MESSAGES" ], "enumDescriptions": [ "Should never be stored in practice", @@ -5552,7 +5555,8 @@ "See go/people-playground-design.", "Also mdb/social-magazines", "Aka Taychon", - "Aka Google Meet" + "Aka Google Meet", + "Aka Google Messages" ], "type": "string" }, @@ -5615,7 +5619,8 @@ "LOUPE", "NEWS_360", "DUO", - "MEET" + "MEET", + "MESSAGES" ], "enumDescriptions": [ "should never be stored in practice", @@ -5635,7 +5640,8 @@ "Aka Camera by Google Photos", "Also mdb/social-magazines", "aka Taychon", - "Aka Google Meet" + "Aka Google Meet", + "Aka Google Messages" ], "type": "string" }, @@ -9649,6 +9655,7 @@ "HOT_SPOT", "HOTSPOT_TETHERING", "HOT_WORD", + "HUB_MODE", "IP_ADDRESS", "IMPROVE_LOCATION_ACCURACY", "JUMP_TO_CAMERA", @@ -9962,6 +9969,7 @@ "Toggle for internet sharing via WiFi.", "Common settings page for internet sharing via various means.", "", + "See go/hubmodesettings-PRD.", "Show my IP address", "", "", @@ -14187,10 +14195,6 @@ "$ref": "AssistantApiSettingsDeviceLogsOptIn", "description": "Specifies if device logs and crashes can be captured during SendFeedback" }, - "paymentsEnabled": { - "description": "DEPRECATED: Use DeviceCapabilities.OutputRestrictions.personal_data instead. Whether the user has enabled payments for this device.", - "type": "boolean" - }, "personalizationMetadata": { "$ref": "AssistantApiSettingsPersonalizationMetadata", "description": "Metadata about how personalization settings were configured." @@ -16187,6 +16191,10 @@ "executionCapabilities": { "$ref": "AssistantApiSurfacePropertiesExecutionCapabilities" }, + "prefersGlanceableUi": { + "description": "Indicates if the surface prefers glanceable UI when rendering Assistant response. (see go/mobile-dr-hbird-glanceable-comms-cuj for more context).", + "type": "boolean" + }, "responseDisplayFormat": { "description": "If this field is unset, the response format is unknown", "enum": [ @@ -17589,12 +17597,94 @@ "type": "object" }, "AssistantGroundingRankerDeviceGroundingProviderFeatures": { - "description": "Features to be extracted from Device GP for ranking in HGR. Next ID: 2", + "description": "Features to be extracted from Device GP for ranking in HGR. Each candidate from Device GP will be associated with its own DeviceGroundingProviderFeatures. Next ID: 5", "id": "AssistantGroundingRankerDeviceGroundingProviderFeatures", "properties": { "deviceId": { "$ref": "AssistantApiCoreTypesGovernedDeviceId", - "description": "ID for the device. PRR specific feature." + "description": "ID for the device. This feature is needed specifically for PRR and it contains PII. Note that not every device has a corresponding DeviceId." + }, + "deviceTargetingFeatures": { + "$ref": "AssistantGroundingRankerDeviceTargetingFeatures", + "description": "Features generated by Device Targeting library (Lumos)." + }, + "deviceTargetingLabels": { + "$ref": "AssistantGroundingRankerDeviceTargetingLabels", + "description": "Labels tagged by Device Targeting library (Lumos)." + } + }, + "type": "object" + }, + "AssistantGroundingRankerDeviceTargetingFeatures": { + "description": "Features generated by Device Targeting library (Lumos). See go/hgr-lumos-integration and go/lumos-feature-extraction for more details.", + "id": "AssistantGroundingRankerDeviceTargetingFeatures", + "properties": { + "properties": { + "$ref": "AssistantGroundingRankerDeviceTargetingFeaturesProperties" + }, + "states": { + "$ref": "AssistantGroundingRankerDeviceTargetingFeaturesStates" + } + }, + "type": "object" + }, + "AssistantGroundingRankerDeviceTargetingFeaturesProperties": { + "description": "The properties of the device. They are static and won't change.", + "id": "AssistantGroundingRankerDeviceTargetingFeaturesProperties", + "properties": { + "deviceModelId": { + "description": "The model ID of the device. This should be globally unique across manufacturers/OEMs.", + "type": "string" + }, + "isOwnedBySpeaker": { + "description": "Indicate whether the device is owned by the user who is speaking.", + "type": "boolean" + } + }, + "type": "object" + }, + "AssistantGroundingRankerDeviceTargetingFeaturesStates": { + "description": "The states of the device. They are dynamic and may change based on the current context.", + "id": "AssistantGroundingRankerDeviceTargetingFeaturesStates", + "properties": { + "distance": { + "description": "The distance of the device relative to others that hear the user's OKG. Timestamp of when the device was last used. Should correspond to when the AssistantRequestParams (in ASSISTANT_SNAPSHOT corpus) were last written for this device.", + "enum": [ + "UNKNOWN_DISTANCE", + "CLOSEST", + "EQUALLY_CLOSE", + "FURTHER" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "isDocked": { + "description": "Indicate whether the device is docked on a base.", + "type": "boolean" + }, + "isLocked": { + "description": "Indicate whether the device is locked.", + "type": "boolean" + }, + "isTethered": { + "description": "Indicate whether the device is tethered to another device.", + "type": "boolean" + } + }, + "type": "object" + }, + "AssistantGroundingRankerDeviceTargetingLabels": { + "description": "Labels tagged by Device Targeting library (Lumos). See go/hgr-lumos-integration and go/lumos-feature-extraction for more details.", + "id": "AssistantGroundingRankerDeviceTargetingLabels", + "properties": { + "isSelectedByLumos": { + "description": "Indicate whether the device is selected by Lumos as the target device.", + "type": "boolean" } }, "type": "object" @@ -17945,7 +18035,7 @@ "type": "object" }, "AssistantGroundingRankerProviderGroundingProviderFeatures": { - "description": "Features to be extracted from Provider GP for ranking in HGR. Next ID: 5", + "description": "Features to be extracted from Provider GP for ranking in HGR. Next ID: 6", "id": "AssistantGroundingRankerProviderGroundingProviderFeatures", "properties": { "isInAppProvider": { @@ -17953,8 +18043,16 @@ "type": "boolean" }, "providerClusterIdDeprecated": { + "description": "This field is deprecated in favor of the integer field below.", + "items": { + "type": "string" + }, + "type": "array" + }, + "providerClusterIds": { "description": "Cluster IDs for the provider. This field is repeated because some providers can be associated with multiple clusters. PRR specific feature.", "items": { + "format": "int64", "type": "string" }, "type": "array" @@ -29643,6 +29741,7 @@ "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE", "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS", "PROVIDER_GOOGLE_GT_LANE_AUTOMATION", + "PROVIDER_GOOGLE_GEO_NG_LOCAL", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -30184,7 +30283,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B4", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B5", "ABSTRACT", "", "", @@ -30359,6 +30458,7 @@ "", "", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -34525,6 +34625,7 @@ "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE", "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS", "PROVIDER_GOOGLE_GT_LANE_AUTOMATION", + "PROVIDER_GOOGLE_GEO_NG_LOCAL", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -35066,7 +35167,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B4", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B5", "ABSTRACT", "", "", @@ -35241,6 +35342,7 @@ "", "", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -36688,6 +36790,7 @@ "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE", "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS", "PROVIDER_GOOGLE_GT_LANE_AUTOMATION", + "PROVIDER_GOOGLE_GEO_NG_LOCAL", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -37229,7 +37332,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B4", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B5", "ABSTRACT", "", "", @@ -37404,6 +37507,7 @@ "", "", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -39155,6 +39259,7 @@ "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE", "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS", "PROVIDER_GOOGLE_GT_LANE_AUTOMATION", + "PROVIDER_GOOGLE_GEO_NG_LOCAL", "PROVIDER_GOOGLE_LOCALSEARCH", "PROVIDER_GOOGLE_TRANSIT", "PROVIDER_GOOGLE_GEOWIKI", @@ -39696,7 +39801,7 @@ "", "ABSTRACT", "", - "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B4", + "All new \"Google\" provider entries must be full ints. The next available ID is: 0x111730B5", "ABSTRACT", "", "", @@ -39871,6 +39976,7 @@ "", "", "", + "", "The next new \"Google\" provider entries should be placed above.", "UMBRELLA", "", @@ -52915,7 +53021,7 @@ "type": "object" }, "ImageExifIPTCMetadata": { - "description": "This proto holds IPTC metadata. http://www.iptc.org/cms/site/index.html?channel=CH0099 Proto field name is same with IPTC property name except which is clearly stated. Next Id: 63", + "description": "This proto holds IPTC metadata. http://www.iptc.org/cms/site/index.html?channel=CH0099 Proto field name is same with IPTC property name except which is clearly stated. Next Id: 64", "id": "ImageExifIPTCMetadata", "properties": { "acquireLicensePage": { @@ -52960,6 +53066,22 @@ "description": { "type": "string" }, + "digitalSourceType": { + "description": "See go/gi-annotations-indexing for more information.", + "enum": [ + "DST_NOT_RECORDED", + "DST_TRAINED_ALGORITHMIC_MEDIA", + "DST_COMPOSITE_SYNTHETIC", + "DST_ALGORITHMIC_MEDIA" + ], + "enumDescriptions": [ + "", + "https://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia", + "https://cv.iptc.org/newscodes/digitalsourcetype/compositeSynthetic", + "https://cv.iptc.org/newscodes/digitalsourcetype/algorithmicMedia" + ], + "type": "string" + }, "event": { "type": "string" }, @@ -54469,14 +54591,53 @@ }, "type": "object" }, + "ImageRepositoryS3LangIdDebuggingInfo": { + "description": "For debugging only.", + "id": "ImageRepositoryS3LangIdDebuggingInfo", + "properties": { + "audioInputCap": { + "description": "Audio input processing cap.", + "format": "google-duration", + "type": "string" + }, + "failedSegments": { + "description": "Number of failed segments. Successful segments are stored in `langid_signals_for_segment`.", + "format": "int32", + "type": "integer" + }, + "processedSegments": { + "description": "Number of processed segments.", + "format": "int32", + "type": "integer" + }, + "segmentDuration": { + "description": "Duration of each segment (except for the last one if capped).", + "format": "google-duration", + "type": "string" + }, + "segmentStride": { + "description": "If \u003e1, every N segment is processed.", + "format": "int32", + "type": "integer" + }, + "waveHeader": { + "$ref": "SpeechWaveHeader", + "description": "Wave header of the audio input." + } + }, + "type": "object" + }, "ImageRepositoryS3LangIdSignals": { - "description": "Next Tag: 9", + "description": "Next Tag: 10", "id": "ImageRepositoryS3LangIdSignals", "properties": { "containsSpeech": { "description": "Whether this audio chunk has speech or not.", "type": "boolean" }, + "debuggingInfo": { + "$ref": "ImageRepositoryS3LangIdDebuggingInfo" + }, "endSec": { "format": "int64", "type": "string" @@ -94586,7 +94747,7 @@ "type": "boolean" }, "isDropped": { - "description": "Documened at: repository/webref/universal/webref_data/enricher/entity-data.h", + "description": "Documented at: google3/repository/webref/enricher/core/data/scored_entity_name.h", "type": "boolean" }, "isMatchlessResultContext": { @@ -94594,7 +94755,7 @@ "type": "boolean" }, "isPruned": { - "description": "Documened at: repository/webref/universal/webref_data/enricher/entity-data.h", + "description": "Documented at: google3/repository/webref/enricher/core/data/scored_entity_name.h", "type": "boolean" }, "mid": { @@ -95215,7 +95376,7 @@ "type": "array" }, "areaKm2": { - "description": "Area in km^2 of the feature if the feature has polygon.", + "description": "Area in km^2 of the feature if the feature has polygon. Only set by qrefmetadata.", "format": "double", "type": "number" }, @@ -95419,13 +95580,6 @@ "$ref": "RepositoryWebrefLatentEntity" }, "type": "array" - }, - "latentMid": { - "description": "List of broader MIDs from the Sports Hierarchy. Named incorrectly, it does not contain all latent mids.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" @@ -107213,6 +107367,81 @@ }, "type": "object" }, + "SpeechWaveHeader": { + "description": "A general-purpose buffer to contain sequences of samples. When representing a waveform, the samples are the scalar values of an acoustic signal. When representing a sequence of feature frames, the samples are vector-valued frames.", + "id": "SpeechWaveHeader", + "properties": { + "atomicSize": { + "description": "Size of atomic type, in bytes.", + "format": "int32", + "type": "integer" + }, + "atomicType": { + "description": "Numeric type of data elements (if generic)", + "type": "string" + }, + "bitRate": { + "description": "For compressed signals with fixed bitrate, this is the number of bits per second.", + "format": "float", + "type": "number" + }, + "byteOrder": { + "description": "Byte-order of the atomic_type When atomic_type == \"char\", byte_order should be always \"1\". When atomic_type == \"int16\", byte_order can be either \"01\" (Intel) or \"10\" (Motorola). Byte order should default to Intel when in question.", + "type": "string" + }, + "details": { + "description": "Typically contains the parameter settings of the program that created the file.", + "type": "string" + }, + "dimension": { + "description": "Array dimensions for a single sample. * For audio samples: * mono: rank==0, dimension==[1] * stereo: rank==0, dimension==[2] (samples are interleaved) * For typical ASR features representing energy, 12 MFCC coefficients, and first and second derivatives: * rank==1 and dimension==[39].", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "elementsPerSample": { + "description": "The number of atomic elements stored per sample. This is the product of all the entries in the dimension array. Written \"out of order\" in this file to be close to the dimension field, from which it can always be computed.", + "format": "int32", + "type": "integer" + }, + "rank": { + "description": "The rank of each sample. For a waveform (signals that are sequences of scalar values), this is 0. For vector-valued signals (used as signals containing sequences of features, for example), this is 1. scalar=0, vector=1, matrix=2, ...", + "format": "int32", + "type": "integer" + }, + "sampleCoding": { + "description": "Sample encoding. Can be \"ulaw\".", + "type": "string" + }, + "sampleRate": { + "description": "For periodic signals, this is the number samples per second, else 0.0", + "format": "float", + "type": "number" + }, + "sampleSize": { + "description": "Size of a single sample, in bytes.", + "format": "int32", + "type": "integer" + }, + "sampleType": { + "description": "Structure of each sample. \"generic\" means that the samples are multi-dimensional arrays of atomic_type with the specified rank.", + "type": "string" + }, + "startTime": { + "description": "Time origin for the signal, in seconds. Warning: Using float can result in rounding errors: float's smallest distance between two representable values (1 ULP; see https://en.wikipedia.org/wiki/Unit_in_the_last_place) between 1024 and 2048 (representing ~17-34 min) is 0.0001220703125, what is approximately double of what we need to represent 1 sample in a 16 kHz sample rate audio. The error is double in the 2048s-4096s, 4x in the 4096s-8192s range etc. Higher sample rate encounters rounding errors earlier: with 96 kHz, rounding errors start at ~2 min (128s).", + "format": "float", + "type": "number" + }, + "totalSamples": { + "description": "The number of samples in file. Can be inferred for generics from file size.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "StorageGraphBfgAuthorityFeedbackMetadata": { "description": "go/entity-authority NB: currently all facts associated with Authority Feedback are externally traceable to the requests from which they originate.", "id": "StorageGraphBfgAuthorityFeedbackMetadata", @@ -108530,7 +108759,7 @@ "type": "object" }, "TravelFlightsAirlineConfig": { - "description": "Next ID: 27", + "description": "Next ID: 29", "id": "TravelFlightsAirlineConfig", "properties": { "alliance": { @@ -108612,6 +108841,12 @@ }, "type": "array" }, + "greenFaresInfo": { + "items": { + "$ref": "TravelFlightsAirlineConfigGreenFaresInfo" + }, + "type": "array" + }, "iataCode": { "description": "Note that some iata_codes are reused (`dup_flag` field). For details, including how to resolve collisions for airlines shown in Google Flights, see: go/controlled-duplicate go/flights-data/airlines#resolving-iata-code-collisions cs/go/controlled-duplicate U2 - some have no IATA code", "type": "string" @@ -108651,6 +108886,10 @@ "$ref": "TravelFlightsNameCatalogProto", "description": "KLM - instead of 'KLM Royal Dutch Airlines'" }, + "sustainabilityProgramUrls": { + "$ref": "TravelFlightsNameCatalogProto", + "description": "URLs for airlines' sustainability programs." + }, "type": { "enum": [ "SCHEDULED_PASSENGER", @@ -108729,6 +108968,58 @@ }, "type": "object" }, + "TravelFlightsAirlineConfigGreenFaresInfo": { + "id": "TravelFlightsAirlineConfigGreenFaresInfo", + "properties": { + "bonusMilesProgramName": { + "type": "string" + }, + "bonusMilesQuantity": { + "format": "int64", + "type": "string" + }, + "bonusMilesQuantityType": { + "enum": [ + "BONUS_MILES_QUANTITY_TYPE_UNDEFINED", + "ABSOLUTE", + "PERCENTAGE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "bonusMilesType": { + "enum": [ + "BONUS_MILES_TYPE_UNDEFINED", + "MILES", + "POINTS" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "contributionFraming": { + "enum": [ + "CONTRIBUTION_FRAMING_UNDEFINED", + "SAF", + "CARBON_COMPENSATION" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "TravelFlightsAirlineConfigLocalizedContactInfo": { "description": "Airline contact info grouped by language. The language locale subcode will determine the country.", "id": "TravelFlightsAirlineConfigLocalizedContactInfo", @@ -110399,7 +110690,7 @@ "type": "object" }, "TrawlerTrawlerPrivateFetchReplyData": { - "description": "This is an optional container of arbitrary data that can be added to a FetchReplyData. This data is meant to be logged, but not sent back in a fetch reply (it should be added *after* the reply is prepared). Use FetchResponsePreparatorImpl::AddTrawlerPrivateDataToFetchReplyData to add. See also the comment in fetch_response_preparator_impl.cc. Next Tag: 44", + "description": "This is an optional container of arbitrary data that can be added to a FetchReplyData. This data is meant to be logged, but not sent back in a fetch reply (it should be added *after* the reply is prepared). Use FetchResponsePreparatorImpl::AddTrawlerPrivateDataToFetchReplyData to add. See also the comment in fetch_response_preparator_impl.cc. Next Tag: 45", "id": "TrawlerTrawlerPrivateFetchReplyData", "properties": { "BotGroupName": { @@ -110614,6 +110905,9 @@ "description": "Whether this is a bidirectional streaming fetch.", "type": "boolean" }, + "isDedicatedHostload": { + "type": "boolean" + }, "isFloonetFetch": { "description": "Whether or not this is a Floonet fetch request. Floonet requests have inherent lower availability (due to HOPE rejections when HOPE is in degraded mode, and other Floonet specific reasons). Therefore, it is important for debugging and for our availability SLO to know whether of not it is a floonet fetch. IMPORTANT NOTE: This field is only currently set for traffic that explicitly requires Floonet and can not failover to use Googlebot (i.e. \"transparent\" or \"implicit\" Floonet fetches).", "type": "boolean" @@ -111084,6 +111378,8 @@ "USER_P13N_SETTING_OFF_AT_EVENT_LEVEL", "BATTLESTAR_GAME_IN_MDP_EVENT_LEVEL", "REVIEW_HIGHLIGHTS_TRIGGERING_EVENT_LEVEL", + "TRUSTED_VERTICAL_VPN_INTENT_EVENT_LEVEL", + "TRUSTED_VERTICAL_LOAN_INTENT_EVENT_LEVEL", "EVENT_LEVEL_TEST_CODE_LIMIT", "ENTERTAINMENT_CLUSTER_TRIGGERING_AT_SESSION_LEVEL", "BEST_SELLER_CART_TAG_AT_SESSION_LEVEL", @@ -111661,6 +111957,11 @@ "BATTLESTAR_GAME_IN_MDP_SESSION_LEVEL", "REVIEW_HIGHLIGHTS_SESSION_LEVEL", "BOOKS_NOTIFICATION_RECEIVED_SESSION_LEVEL", + "LANGUAGE_SWITCHER_ELIGIBLE_SESSION_LEVEL", + "SUBS_OFFER_ON_BUYFLOW_AT_SESSION_LEVEL", + "SUBS_OFFER_ON_BUYFLOW_ELIGIBLE_AT_SESSION_LEVEL", + "TRUSTED_VERTICAL_VPN_INTENT_SESSION_LEVEL", + "TRUSTED_VERTICAL_LOAN_INTENT_SESSION_LEVEL", "SESSION_LEVEL_TEST_CODE_LIMIT", "CART_ABANDONMENT_USER_LEVEL", "IN_APP_PRODUCTS_IN_DETAILS_PAGE_USER_LEVEL", @@ -111798,6 +112099,7 @@ "GE_IS_SCHEDULED_QUEST", "GE_IS_SCHEDULED_LOYALTY_MULTIPLIER", "GE_IS_USER_OPT_IN_P13N", + "GE_LOYALTY_PURCHASE_QUEST_INDIVIDUALIZATION_EXPERIMENT", "IAP_SKU_DEALS_LIVE_OP_DEALS_HOME_USER_LEVEL", "IAP_SKU_DEALS_LIVE_OP_GAMES_HOME_USER_LEVEL", "FEATURING_AHC_OR_FHR_TRIGGERED_USER_LEVEL", @@ -111925,6 +112227,8 @@ "LIVEOPS_CLUSTER_SERP_TRIGGERING_USER_LEVEL", "BOOKS_NOTIFICATION_RECEIVED_USER_LEVEL", "LIVEOPS_INSTALL_NOTIFICATION_CHURNED_USER_LEVEL", + "SUBS_OFFER_ON_BUYFLOW_AT_USER_LEVEL", + "SUBS_OFFER_ON_BUYFLOW_ELIGIBLE_AT_USER_LEVEL", "USER_LEVEL_TEST_CODE_LIMIT" ], "enumDescriptions": [ @@ -112175,6 +112479,8 @@ "Event-level test code corresponding to com.google.play.consent.proto.Setting.SETTING_OFF.", "Event-level test code corresponding to an MDP showing for a game also available on Battlestar.", "Event-level test code to track triggering of review highlights.", + "Event-level test code to track triggering of VPN Intent trusted vertical message.", + "Event-level test code to track triggering of LOAN Intent trusted vertical message.", "", "", "", @@ -112752,6 +113058,11 @@ "Session-level test code corresponding to an MDP showing for a game also available on Battlestar.", "Session-level test code for review highlights", "Session level test code for users who receive a Books notification.", + "Session level test code indicating that the user is eligible for language switcher on cart screen.", + "Session level test code for traking the users who did see subs offer on buyflow. This is a Commerce client level test code.", + "Session level test code for traking the users who are eligible to subs offer on buyflow. This is a P3 server level test code.", + "Event-level test code to track triggering of VPN Intent trusted vertical message.", + "Event-level test code to track triggering of LOAN Intent trusted vertical message.", "", "Cart abandonment flow for purchase flow.", "User saw/would have seen the in app products section in App", @@ -112889,6 +113200,7 @@ "", "", "Test codes for GE DSA opt-in users.", + "Test code for the loyalty purchase quest I15n experiment", "User level test code for tracking users who should see the IAP Sku Deals liveops card.", "User level test code for tracking users who should see the IAP Sku Games Home liveops card.", "User level test code for tracking users who should see the featuring AHC or FHR.", @@ -113016,6 +113328,8 @@ "User level test code for cat search live ops cluster triggering.", "User level test code for users who have received a Books notification.", "User level test code for live-ops install notification Churn experiments. If GE decision changed after enabling ranking using the notification install model prediction for churned users, log test code.", + "User level test code for traking the users who did see subs offer on buyflow. This is a Commerce client level test code.", + "User level test code for traking the users who are eligible to subs offer on buyflow. This is a P3 server level test code.", "" ], "type": "string" diff --git a/contentwarehouse/v1/contentwarehouse-gen.go b/contentwarehouse/v1/contentwarehouse-gen.go index b7327924323..f874cb5bf3b 100644 --- a/contentwarehouse/v1/contentwarehouse-gen.go +++ b/contentwarehouse/v1/contentwarehouse-gen.go @@ -5901,6 +5901,7 @@ type AppsPeopleOzExternalMergedpeopleapiInAppNotificationTarget struct { // "NEWS_360" - Also mdb/social-magazines // "DUO" - Aka Taychon // "MEET" - Aka Google Meet + // "MESSAGES" - Aka Google Messages App []string `json:"app,omitempty"` ClientData []*AppsPeopleOzExternalMergedpeopleapiInAppNotificationTargetClientData `json:"clientData,omitempty"` @@ -5970,6 +5971,7 @@ type AppsPeopleOzExternalMergedpeopleapiInAppNotificationTargetClientData struct // "NEWS_360" - Also mdb/social-magazines // "DUO" - Aka Taychon // "MEET" - Aka Google Meet + // "MESSAGES" - Aka Google Messages App string `json:"app,omitempty"` ByteValue string `json:"byteValue,omitempty"` @@ -6065,6 +6067,7 @@ type AppsPeopleOzExternalMergedpeopleapiInAppReachability struct { // "NEWS_360" - Also mdb/social-magazines // "DUO" - aka Taychon // "MEET" - Aka Google Meet + // "MESSAGES" - Aka Google Messages AppType string `json:"appType,omitempty"` Metadata *AppsPeopleOzExternalMergedpeopleapiPersonFieldMetadata `json:"metadata,omitempty"` @@ -11572,6 +11575,7 @@ type AssistantApiClientOpPropertiesDeviceModifySettingClientOpProperty struct { // "HOTSPOT_TETHERING" - Common settings page for internet sharing via // various means. // "HOT_WORD" + // "HUB_MODE" - See go/hubmodesettings-PRD. // "IP_ADDRESS" - Show my IP address // "IMPROVE_LOCATION_ACCURACY" // "JUMP_TO_CAMERA" @@ -17635,11 +17639,6 @@ type AssistantApiSettingsDeviceSettings struct { // during SendFeedback OptInStatus *AssistantApiSettingsDeviceLogsOptIn `json:"optInStatus,omitempty"` - // PaymentsEnabled: DEPRECATED: Use - // DeviceCapabilities.OutputRestrictions.personal_data instead. Whether - // the user has enabled payments for this device. - PaymentsEnabled bool `json:"paymentsEnabled,omitempty"` - // PersonalizationMetadata: Metadata about how personalization settings // were configured. PersonalizationMetadata *AssistantApiSettingsPersonalizationMetadata `json:"personalizationMetadata,omitempty"` @@ -20492,6 +20491,11 @@ func (s *AssistantApiSupportedProviderTypes) MarshalJSON() ([]byte, error) { type AssistantApiSurfaceProperties struct { ExecutionCapabilities *AssistantApiSurfacePropertiesExecutionCapabilities `json:"executionCapabilities,omitempty"` + // PrefersGlanceableUi: Indicates if the surface prefers glanceable UI + // when rendering Assistant response. (see + // go/mobile-dr-hbird-glanceable-comms-cuj for more context). + PrefersGlanceableUi bool `json:"prefersGlanceableUi,omitempty"` + // ResponseDisplayFormat: If this field is unset, the response format is // unknown // @@ -22766,11 +22770,23 @@ func (s *AssistantGroundingRankerDeviceContactAffinityFeatures) UnmarshalJSON(da } // AssistantGroundingRankerDeviceGroundingProviderFeatures: Features to -// be extracted from Device GP for ranking in HGR. Next ID: 2 +// be extracted from Device GP for ranking in HGR. Each candidate from +// Device GP will be associated with its own +// DeviceGroundingProviderFeatures. Next ID: 5 type AssistantGroundingRankerDeviceGroundingProviderFeatures struct { - // DeviceId: ID for the device. PRR specific feature. + // DeviceId: ID for the device. This feature is needed specifically for + // PRR and it contains PII. Note that not every device has a + // corresponding DeviceId. DeviceId *AssistantApiCoreTypesGovernedDeviceId `json:"deviceId,omitempty"` + // DeviceTargetingFeatures: Features generated by Device Targeting + // library (Lumos). + DeviceTargetingFeatures *AssistantGroundingRankerDeviceTargetingFeatures `json:"deviceTargetingFeatures,omitempty"` + + // DeviceTargetingLabels: Labels tagged by Device Targeting library + // (Lumos). + DeviceTargetingLabels *AssistantGroundingRankerDeviceTargetingLabels `json:"deviceTargetingLabels,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeviceId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -22794,6 +22810,152 @@ func (s *AssistantGroundingRankerDeviceGroundingProviderFeatures) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AssistantGroundingRankerDeviceTargetingFeatures: Features generated +// by Device Targeting library (Lumos). See go/hgr-lumos-integration and +// go/lumos-feature-extraction for more details. +type AssistantGroundingRankerDeviceTargetingFeatures struct { + Properties *AssistantGroundingRankerDeviceTargetingFeaturesProperties `json:"properties,omitempty"` + + States *AssistantGroundingRankerDeviceTargetingFeaturesStates `json:"states,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Properties") 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. "Properties") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AssistantGroundingRankerDeviceTargetingFeatures) MarshalJSON() ([]byte, error) { + type NoMethod AssistantGroundingRankerDeviceTargetingFeatures + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AssistantGroundingRankerDeviceTargetingFeaturesProperties: The +// properties of the device. They are static and won't change. +type AssistantGroundingRankerDeviceTargetingFeaturesProperties struct { + // DeviceModelId: The model ID of the device. This should be globally + // unique across manufacturers/OEMs. + DeviceModelId string `json:"deviceModelId,omitempty"` + + // IsOwnedBySpeaker: Indicate whether the device is owned by the user + // who is speaking. + IsOwnedBySpeaker bool `json:"isOwnedBySpeaker,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceModelId") 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. "DeviceModelId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AssistantGroundingRankerDeviceTargetingFeaturesProperties) MarshalJSON() ([]byte, error) { + type NoMethod AssistantGroundingRankerDeviceTargetingFeaturesProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AssistantGroundingRankerDeviceTargetingFeaturesStates: The states of +// the device. They are dynamic and may change based on the current +// context. +type AssistantGroundingRankerDeviceTargetingFeaturesStates struct { + // Distance: The distance of the device relative to others that hear the + // user's OKG. Timestamp of when the device was last used. Should + // correspond to when the AssistantRequestParams (in ASSISTANT_SNAPSHOT + // corpus) were last written for this device. + // + // Possible values: + // "UNKNOWN_DISTANCE" + // "CLOSEST" + // "EQUALLY_CLOSE" + // "FURTHER" + Distance string `json:"distance,omitempty"` + + // IsDocked: Indicate whether the device is docked on a base. + IsDocked bool `json:"isDocked,omitempty"` + + // IsLocked: Indicate whether the device is locked. + IsLocked bool `json:"isLocked,omitempty"` + + // IsTethered: Indicate whether the device is tethered to another + // device. + IsTethered bool `json:"isTethered,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Distance") 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. "Distance") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AssistantGroundingRankerDeviceTargetingFeaturesStates) MarshalJSON() ([]byte, error) { + type NoMethod AssistantGroundingRankerDeviceTargetingFeaturesStates + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AssistantGroundingRankerDeviceTargetingLabels: Labels tagged by +// Device Targeting library (Lumos). See go/hgr-lumos-integration and +// go/lumos-feature-extraction for more details. +type AssistantGroundingRankerDeviceTargetingLabels struct { + // IsSelectedByLumos: Indicate whether the device is selected by Lumos + // as the target device. + IsSelectedByLumos bool `json:"isSelectedByLumos,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IsSelectedByLumos") + // 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. "IsSelectedByLumos") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AssistantGroundingRankerDeviceTargetingLabels) MarshalJSON() ([]byte, error) { + type NoMethod AssistantGroundingRankerDeviceTargetingLabels + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AssistantGroundingRankerGroundingProviderFeatures: Next ID: 6 type AssistantGroundingRankerGroundingProviderFeatures struct { ContactGroundingProviderFeatures *AssistantGroundingRankerContactGroundingProviderFeatures `json:"contactGroundingProviderFeatures,omitempty"` @@ -23308,17 +23470,21 @@ func (s *AssistantGroundingRankerPodcastGroundingProviderFeatures) UnmarshalJSON } // AssistantGroundingRankerProviderGroundingProviderFeatures: Features -// to be extracted from Provider GP for ranking in HGR. Next ID: 5 +// to be extracted from Provider GP for ranking in HGR. Next ID: 6 type AssistantGroundingRankerProviderGroundingProviderFeatures struct { // IsInAppProvider: Indicates that fulfillment on this provider will // happen within the provider app. IsInAppProvider bool `json:"isInAppProvider,omitempty"` - // ProviderClusterIdDeprecated: Cluster IDs for the provider. This field - // is repeated because some providers can be associated with multiple - // clusters. PRR specific feature. + // ProviderClusterIdDeprecated: This field is deprecated in favor of the + // integer field below. ProviderClusterIdDeprecated []string `json:"providerClusterIdDeprecated,omitempty"` + // ProviderClusterIds: Cluster IDs for the provider. This field is + // repeated because some providers can be associated with multiple + // clusters. PRR specific feature. + ProviderClusterIds googleapi.Int64s `json:"providerClusterIds,omitempty"` + // ProviderId: ProviderId for the provider in the binding set. PRR // specific feature. ProviderId *AssistantContextProviderId `json:"providerId,omitempty"` @@ -38821,7 +38987,7 @@ type GeostoreDataSourceProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730B4 + // be full ints. The next available ID is: 0x111730B5 // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -39001,6 +39167,7 @@ type GeostoreDataSourceProto struct { // "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE" // "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS" // "PROVIDER_GOOGLE_GT_LANE_AUTOMATION" + // "PROVIDER_GOOGLE_GEO_NG_LOCAL" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -43335,7 +43502,7 @@ type GeostoreInternalSourceSummaryProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730B4 + // be full ints. The next available ID is: 0x111730B5 // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -43515,6 +43682,7 @@ type GeostoreInternalSourceSummaryProto struct { // "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE" // "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS" // "PROVIDER_GOOGLE_GT_LANE_AUTOMATION" + // "PROVIDER_GOOGLE_GEO_NG_LOCAL" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -45516,7 +45684,7 @@ type GeostoreOntologyRawGConceptInstanceProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730B4 + // be full ints. The next available ID is: 0x111730B5 // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -45696,6 +45864,7 @@ type GeostoreOntologyRawGConceptInstanceProto struct { // "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE" // "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS" // "PROVIDER_GOOGLE_GT_LANE_AUTOMATION" + // "PROVIDER_GOOGLE_GEO_NG_LOCAL" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -47994,7 +48163,7 @@ type GeostoreProvenanceProto struct { // "PROVIDER_GOOGLE" - ABSTRACT // "PROVIDER_GOOGLE_HAND_EDIT" // "PROVIDER_GOOGLE_BORDERS" - All new "Google" provider entries must - // be full ints. The next available ID is: 0x111730B4 + // be full ints. The next available ID is: 0x111730B5 // "PROVIDER_GOOGLE_SUBRANGE" - ABSTRACT // "PROVIDER_GOOGLE_GT_FUSION" // "PROVIDER_GOOGLE_ZAGAT_CMS" @@ -48174,6 +48343,7 @@ type GeostoreProvenanceProto struct { // "PROVIDER_GOOGLE_GT_OPERATOR_PROVENANCE" // "PROVIDER_GOOGLE_LOCAL_SERVICES_ADS" // "PROVIDER_GOOGLE_GT_LANE_AUTOMATION" + // "PROVIDER_GOOGLE_GEO_NG_LOCAL" // "PROVIDER_GOOGLE_LOCALSEARCH" - The next new "Google" provider // entries should be placed above. // "PROVIDER_GOOGLE_TRANSIT" - UMBRELLA @@ -67500,7 +67670,7 @@ func (s *ImageExactBoostNavQuery) MarshalJSON() ([]byte, error) { // ImageExifIPTCMetadata: This proto holds IPTC metadata. // http://www.iptc.org/cms/site/index.html?channel=CH0099 Proto field // name is same with IPTC property name except which is clearly stated. -// Next Id: 63 +// Next Id: 64 type ImageExifIPTCMetadata struct { // AcquireLicensePage: Page URL about how to acquire this licensable // image. @@ -67526,6 +67696,19 @@ type ImageExifIPTCMetadata struct { Description string `json:"description,omitempty"` + // DigitalSourceType: See go/gi-annotations-indexing for more + // information. + // + // Possible values: + // "DST_NOT_RECORDED" + // "DST_TRAINED_ALGORITHMIC_MEDIA" - + // https://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia + // "DST_COMPOSITE_SYNTHETIC" - + // https://cv.iptc.org/newscodes/digitalsourcetype/compositeSynthetic + // "DST_ALGORITHMIC_MEDIA" - + // https://cv.iptc.org/newscodes/digitalsourcetype/algorithmicMedia + DigitalSourceType string `json:"digitalSourceType,omitempty"` + Event string `json:"event,omitempty"` Headline string `json:"headline,omitempty"` @@ -69500,11 +69683,58 @@ func (s *ImageRepositoryNimaOutput) UnmarshalJSON(data []byte) error { return nil } -// ImageRepositoryS3LangIdSignals: Next Tag: 9 +// ImageRepositoryS3LangIdDebuggingInfo: For debugging only. +type ImageRepositoryS3LangIdDebuggingInfo struct { + // AudioInputCap: Audio input processing cap. + AudioInputCap string `json:"audioInputCap,omitempty"` + + // FailedSegments: Number of failed segments. Successful segments are + // stored in `langid_signals_for_segment`. + FailedSegments int64 `json:"failedSegments,omitempty"` + + // ProcessedSegments: Number of processed segments. + ProcessedSegments int64 `json:"processedSegments,omitempty"` + + // SegmentDuration: Duration of each segment (except for the last one if + // capped). + SegmentDuration string `json:"segmentDuration,omitempty"` + + // SegmentStride: If >1, every N segment is processed. + SegmentStride int64 `json:"segmentStride,omitempty"` + + // WaveHeader: Wave header of the audio input. + WaveHeader *SpeechWaveHeader `json:"waveHeader,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AudioInputCap") 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. "AudioInputCap") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImageRepositoryS3LangIdDebuggingInfo) MarshalJSON() ([]byte, error) { + type NoMethod ImageRepositoryS3LangIdDebuggingInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageRepositoryS3LangIdSignals: Next Tag: 10 type ImageRepositoryS3LangIdSignals struct { // ContainsSpeech: Whether this audio chunk has speech or not. ContainsSpeech bool `json:"containsSpeech,omitempty"` + DebuggingInfo *ImageRepositoryS3LangIdDebuggingInfo `json:"debuggingInfo,omitempty"` + EndSec int64 `json:"endSec,omitempty,string"` // LangidResult: S3 langID result. We keep langid_result even if @@ -119020,8 +119250,8 @@ type RepositoryWebrefEntityNameScore struct { // 'starbucks' is cluster_global for the [Starbucks] chain cluster). IsClusterGlobal bool `json:"isClusterGlobal,omitempty"` - // IsDropped: Documened at: - // repository/webref/universal/webref_data/enricher/entity-data.h + // IsDropped: Documented at: + // google3/repository/webref/enricher/core/data/scored_entity_name.h IsDropped bool `json:"isDropped,omitempty"` // IsMatchlessResultContext: Only for context names: Whether this @@ -119032,8 +119262,8 @@ type RepositoryWebrefEntityNameScore struct { // Model 0 that are inconsistent with the names from Model 1. IsMatchlessResultContext bool `json:"isMatchlessResultContext,omitempty"` - // IsPruned: Documened at: - // repository/webref/universal/webref_data/enricher/entity-data.h + // IsPruned: Documented at: + // google3/repository/webref/enricher/core/data/scored_entity_name.h IsPruned bool `json:"isPruned,omitempty"` // Mid: The id of the entity. @@ -119887,7 +120117,8 @@ type RepositoryWebrefGeoMetadataProto struct { AddressSynonyms []*RepositoryWebrefGeoMetadataProtoAddressSynonym `json:"addressSynonyms,omitempty"` - // AreaKm2: Area in km^2 of the feature if the feature has polygon. + // AreaKm2: Area in km^2 of the feature if the feature has polygon. Only + // set by qrefmetadata. AreaKm2 float64 `json:"areaKm2,omitempty"` // Bound: The tight bounds of this feature. Note that these are @@ -120276,10 +120507,6 @@ type RepositoryWebrefLatentEntities struct { // concept table and will never reach the annotator. LatentEntity []*RepositoryWebrefLatentEntity `json:"latentEntity,omitempty"` - // LatentMid: List of broader MIDs from the Sports Hierarchy. Named - // incorrectly, it does not contain all latent mids. - LatentMid []string `json:"latentMid,omitempty"` - // ForceSendFields is a list of field names (e.g. "LatentEntity") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -136889,6 +137116,121 @@ func (s *SpeechS3Locale) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SpeechWaveHeader: A general-purpose buffer to contain sequences of +// samples. When representing a waveform, the samples are the scalar +// values of an acoustic signal. When representing a sequence of feature +// frames, the samples are vector-valued frames. +type SpeechWaveHeader struct { + // AtomicSize: Size of atomic type, in bytes. + AtomicSize int64 `json:"atomicSize,omitempty"` + + // AtomicType: Numeric type of data elements (if generic) + AtomicType string `json:"atomicType,omitempty"` + + // BitRate: For compressed signals with fixed bitrate, this is the + // number of bits per second. + BitRate float64 `json:"bitRate,omitempty"` + + // ByteOrder: Byte-order of the atomic_type When atomic_type == "char", + // byte_order should be always "1". When atomic_type == "int16", + // byte_order can be either "01" (Intel) or "10" (Motorola). Byte order + // should default to Intel when in question. + ByteOrder string `json:"byteOrder,omitempty"` + + // Details: Typically contains the parameter settings of the program + // that created the file. + Details string `json:"details,omitempty"` + + // Dimension: Array dimensions for a single sample. * For audio samples: + // * mono: rank==0, dimension==[1] * stereo: rank==0, dimension==[2] + // (samples are interleaved) * For typical ASR features representing + // energy, 12 MFCC coefficients, and first and second derivatives: * + // rank==1 and dimension==[39]. + Dimension []int64 `json:"dimension,omitempty"` + + // ElementsPerSample: The number of atomic elements stored per sample. + // This is the product of all the entries in the dimension array. + // Written "out of order" in this file to be close to the dimension + // field, from which it can always be computed. + ElementsPerSample int64 `json:"elementsPerSample,omitempty"` + + // Rank: The rank of each sample. For a waveform (signals that are + // sequences of scalar values), this is 0. For vector-valued signals + // (used as signals containing sequences of features, for example), this + // is 1. scalar=0, vector=1, matrix=2, ... + Rank int64 `json:"rank,omitempty"` + + // SampleCoding: Sample encoding. Can be "ulaw". + SampleCoding string `json:"sampleCoding,omitempty"` + + // SampleRate: For periodic signals, this is the number samples per + // second, else 0.0 + SampleRate float64 `json:"sampleRate,omitempty"` + + // SampleSize: Size of a single sample, in bytes. + SampleSize int64 `json:"sampleSize,omitempty"` + + // SampleType: Structure of each sample. "generic" means that the + // samples are multi-dimensional arrays of atomic_type with the + // specified rank. + SampleType string `json:"sampleType,omitempty"` + + // StartTime: Time origin for the signal, in seconds. Warning: Using + // float can result in rounding errors: float's smallest distance + // between two representable values (1 ULP; see + // https://en.wikipedia.org/wiki/Unit_in_the_last_place) between 1024 + // and 2048 (representing ~17-34 min) is 0.0001220703125, what is + // approximately double of what we need to represent 1 sample in a 16 + // kHz sample rate audio. The error is double in the 2048s-4096s, 4x in + // the 4096s-8192s range etc. Higher sample rate encounters rounding + // errors earlier: with 96 kHz, rounding errors start at ~2 min (128s). + StartTime float64 `json:"startTime,omitempty"` + + // TotalSamples: The number of samples in file. Can be inferred for + // generics from file size. + TotalSamples int64 `json:"totalSamples,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "AtomicSize") 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. "AtomicSize") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SpeechWaveHeader) MarshalJSON() ([]byte, error) { + type NoMethod SpeechWaveHeader + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *SpeechWaveHeader) UnmarshalJSON(data []byte) error { + type NoMethod SpeechWaveHeader + var s1 struct { + BitRate gensupport.JSONFloat64 `json:"bitRate"` + SampleRate gensupport.JSONFloat64 `json:"sampleRate"` + StartTime gensupport.JSONFloat64 `json:"startTime"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BitRate = float64(s1.BitRate) + s.SampleRate = float64(s1.SampleRate) + s.StartTime = float64(s1.StartTime) + return nil +} + // StorageGraphBfgAuthorityFeedbackMetadata: go/entity-authority NB: // currently all facts associated with Authority Feedback are externally // traceable to the requests from which they originate. @@ -138774,7 +139116,7 @@ func (s *ToolBarPerDocData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TravelFlightsAirlineConfig: Next ID: 27 +// TravelFlightsAirlineConfig: Next ID: 29 type TravelFlightsAirlineConfig struct { // Alliance: STAR_ALLIANCE // @@ -138827,6 +139169,8 @@ type TravelFlightsAirlineConfig struct { // be credited to for mileage accrual. FqtvPartnerCode []string `json:"fqtvPartnerCode,omitempty"` + GreenFaresInfo []*TravelFlightsAirlineConfigGreenFaresInfo `json:"greenFaresInfo,omitempty"` + // IataCode: Note that some iata_codes are reused (`dup_flag` field). // For details, including how to resolve collisions for airlines shown // in Google Flights, see: go/controlled-duplicate @@ -138860,6 +139204,10 @@ type TravelFlightsAirlineConfig struct { // ShortNames: KLM - instead of 'KLM Royal Dutch Airlines' ShortNames *TravelFlightsNameCatalogProto `json:"shortNames,omitempty"` + // SustainabilityProgramUrls: URLs for airlines' sustainability + // programs. + SustainabilityProgramUrls *TravelFlightsNameCatalogProto `json:"sustainabilityProgramUrls,omitempty"` + // Possible values: // "SCHEDULED_PASSENGER" - A // "NON_SCHEDULED_PASSENGER" - B @@ -138967,6 +139315,54 @@ func (s *TravelFlightsAirlineConfigCountryContactInfo) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TravelFlightsAirlineConfigGreenFaresInfo struct { + BonusMilesProgramName string `json:"bonusMilesProgramName,omitempty"` + + BonusMilesQuantity int64 `json:"bonusMilesQuantity,omitempty,string"` + + // Possible values: + // "BONUS_MILES_QUANTITY_TYPE_UNDEFINED" + // "ABSOLUTE" + // "PERCENTAGE" + BonusMilesQuantityType string `json:"bonusMilesQuantityType,omitempty"` + + // Possible values: + // "BONUS_MILES_TYPE_UNDEFINED" + // "MILES" + // "POINTS" + BonusMilesType string `json:"bonusMilesType,omitempty"` + + // Possible values: + // "CONTRIBUTION_FRAMING_UNDEFINED" + // "SAF" + // "CARBON_COMPENSATION" + ContributionFraming string `json:"contributionFraming,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BonusMilesProgramName") 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. "BonusMilesProgramName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TravelFlightsAirlineConfigGreenFaresInfo) MarshalJSON() ([]byte, error) { + type NoMethod TravelFlightsAirlineConfigGreenFaresInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TravelFlightsAirlineConfigLocalizedContactInfo: Airline contact info // grouped by language. The language locale subcode will determine the // country. @@ -141095,7 +141491,7 @@ func (s *TrawlerThrottleClientData) UnmarshalJSON(data []byte) error { // added *after* the reply is prepared). Use // FetchResponsePreparatorImpl::AddTrawlerPrivateDataToFetchReplyData to // add. See also the comment in fetch_response_preparator_impl.cc. Next -// Tag: 44 +// Tag: 45 type TrawlerTrawlerPrivateFetchReplyData struct { // BotGroupName: If we fetched using BotFetchAgent, what is the // BotGroupName? @@ -141306,6 +141702,8 @@ type TrawlerTrawlerPrivateFetchReplyData struct { // fetch. IsBidiStreamingFetch bool `json:"isBidiStreamingFetch,omitempty"` + IsDedicatedHostload bool `json:"isDedicatedHostload,omitempty"` + // IsFloonetFetch: Whether or not this is a Floonet fetch request. // Floonet requests have inherent lower availability (due to HOPE // rejections when HOPE is in degraded mode, and other Floonet specific @@ -142008,6 +142406,10 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // Battlestar. // "REVIEW_HIGHLIGHTS_TRIGGERING_EVENT_LEVEL" - Event-level test code // to track triggering of review highlights. + // "TRUSTED_VERTICAL_VPN_INTENT_EVENT_LEVEL" - Event-level test code + // to track triggering of VPN Intent trusted vertical message. + // "TRUSTED_VERTICAL_LOAN_INTENT_EVENT_LEVEL" - Event-level test code + // to track triggering of LOAN Intent trusted vertical message. // "EVENT_LEVEL_TEST_CODE_LIMIT" // "ENTERTAINMENT_CLUSTER_TRIGGERING_AT_SESSION_LEVEL" // "BEST_SELLER_CART_TAG_AT_SESSION_LEVEL" @@ -142908,6 +143310,19 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // review highlights // "BOOKS_NOTIFICATION_RECEIVED_SESSION_LEVEL" - Session level test // code for users who receive a Books notification. + // "LANGUAGE_SWITCHER_ELIGIBLE_SESSION_LEVEL" - Session level test + // code indicating that the user is eligible for language switcher on + // cart screen. + // "SUBS_OFFER_ON_BUYFLOW_AT_SESSION_LEVEL" - Session level test code + // for traking the users who did see subs offer on buyflow. This is a + // Commerce client level test code. + // "SUBS_OFFER_ON_BUYFLOW_ELIGIBLE_AT_SESSION_LEVEL" - Session level + // test code for traking the users who are eligible to subs offer on + // buyflow. This is a P3 server level test code. + // "TRUSTED_VERTICAL_VPN_INTENT_SESSION_LEVEL" - Event-level test code + // to track triggering of VPN Intent trusted vertical message. + // "TRUSTED_VERTICAL_LOAN_INTENT_SESSION_LEVEL" - Event-level test + // code to track triggering of LOAN Intent trusted vertical message. // "SESSION_LEVEL_TEST_CODE_LIMIT" // "CART_ABANDONMENT_USER_LEVEL" - Cart abandonment flow for purchase // flow. @@ -143101,6 +143516,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "GE_IS_SCHEDULED_QUEST" // "GE_IS_SCHEDULED_LOYALTY_MULTIPLIER" // "GE_IS_USER_OPT_IN_P13N" - Test codes for GE DSA opt-in users. + // "GE_LOYALTY_PURCHASE_QUEST_INDIVIDUALIZATION_EXPERIMENT" - Test + // code for the loyalty purchase quest I15n experiment // "IAP_SKU_DEALS_LIVE_OP_DEALS_HOME_USER_LEVEL" - User level test // code for tracking users who should see the IAP Sku Deals liveops // card. @@ -143390,6 +143807,12 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // code for live-ops install notification Churn experiments. If GE // decision changed after enabling ranking using the notification // install model prediction for churned users, log test code. + // "SUBS_OFFER_ON_BUYFLOW_AT_USER_LEVEL" - User level test code for + // traking the users who did see subs offer on buyflow. This is a + // Commerce client level test code. + // "SUBS_OFFER_ON_BUYFLOW_ELIGIBLE_AT_USER_LEVEL" - User level test + // code for traking the users who are eligible to subs offer on buyflow. + // This is a P3 server level test code. // "USER_LEVEL_TEST_CODE_LIMIT" TestCode []string `json:"testCode,omitempty"` diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 772abaa9e0d..013d210cfd4 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2211,7 +2211,7 @@ } } }, - "revision": "20230427", + "revision": "20230506", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -4734,7 +4734,9 @@ "JAVASCRIPT_UDF_FILE", "SERVICE_ACCOUNT", "MACHINE_TYPE", - "KMS_KEY_NAME" + "KMS_KEY_NAME", + "WORKER_REGION", + "WORKER_ZONE" ], "enumDescriptions": [ "Default input type.", @@ -4751,7 +4753,9 @@ "The parameter specifies a JavaScript UDF in Cloud Storage.", "The parameter specifies a Service Account email.", "The parameter specifies a Machine Type.", - "The parameter specifies a KMS Key name." + "The parameter specifies a KMS Key name.", + "The parameter specifies a Worker Region.", + "The parameter specifies a Worker Zone." ], "type": "string" }, diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index 363d3e42e53..0f5cf550bf0 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -4395,6 +4395,8 @@ type ParameterMetadata struct { // email. // "MACHINE_TYPE" - The parameter specifies a Machine Type. // "KMS_KEY_NAME" - The parameter specifies a KMS Key name. + // "WORKER_REGION" - The parameter specifies a Worker Region. + // "WORKER_ZONE" - The parameter specifies a Worker Zone. ParamType string `json:"paramType,omitempty"` // ParentName: Optional. Specifies the name of the parent parameter. diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index b2835fc8914..fc3e18ef864 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -737,7 +737,7 @@ } } }, - "revision": "20230320", + "revision": "20230508", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -1059,6 +1059,11 @@ "description": "Specifies whether the Data Fusion instance should be private. If set to true, all Data Fusion nodes will have private IP addresses and will not be able to access the public internet.", "type": "boolean" }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "serviceAccount": { "description": "Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.", "readOnly": true, @@ -1241,7 +1246,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index 503f5ff301d..2b01c20acb4 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -713,6 +713,9 @@ type Instance struct { // addresses and will not be able to access the public internet. PrivateInstance bool `json:"privateInstance,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + // ServiceAccount: Output only. Deprecated. Use tenant_project_id // instead to extract the tenant project ID. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -990,7 +993,7 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/datafusion/v1beta1/datafusion-api.json b/datafusion/v1beta1/datafusion-api.json index 24a90baf023..fa0d7c2e919 100644 --- a/datafusion/v1beta1/datafusion-api.json +++ b/datafusion/v1beta1/datafusion-api.json @@ -935,7 +935,7 @@ } } }, - "revision": "20230320", + "revision": "20230508", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -1272,6 +1272,11 @@ "description": "Specifies whether the Data Fusion instance should be private. If set to true, all Data Fusion nodes will have private IP addresses and will not be able to access the public internet.", "type": "boolean" }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "serviceAccount": { "description": "Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.", "readOnly": true, @@ -1472,7 +1477,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index 8d2e9f6e678..5207ce6bc4a 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -758,6 +758,9 @@ type Instance struct { // addresses and will not be able to access the public internet. PrivateInstance bool `json:"privateInstance,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + // ServiceAccount: Output only. Deprecated. Use tenant_project_id // instead to extract the tenant project ID. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -1069,7 +1072,7 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 04b1e68fca1..7b5f6daab4a 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -1918,7 +1918,7 @@ } } }, - "revision": "20230426", + "revision": "20230503", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -3482,6 +3482,10 @@ "description": "Represents a Database Migration Service migration job object.", "id": "MigrationJob", "properties": { + "cmekKeyName": { + "description": "The CMEK (customer-managed encryption key) fully qualified key name used for the migration job. This field supports all migration jobs types except for: * Mysql to Mysql (use the cmek field in the cloudsql connection profile instead). * PostrgeSQL to PostgreSQL (use the cmek field in the cloudsql connection profile instead). * PostgreSQL to AlloyDB (use the kms_key_name field in the alloydb connection profile instead). Each Cloud CMEK key has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]", + "type": "string" + }, "conversionWorkspace": { "$ref": "ConversionWorkspaceInfo", "description": "The conversion workspace used by the migration." @@ -4067,7 +4071,7 @@ "type": "object" }, "PrivateServiceConnectConnectivity": { - "description": "Private Service Connect connectivity (https://cloud.google.com/vpc/docs/private-service-connect#benefits-services)", + "description": "Private Service Connect connectivity (https://cloud.google.com/vpc/docs/private-service-connect#service-attachments)", "id": "PrivateServiceConnectConnectivity", "properties": { "serviceAttachment": { diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 38f214b3f58..ea26fc8fc36 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -2457,6 +2457,18 @@ func (s *MachineConfig) MarshalJSON() ([]byte, error) { // MigrationJob: Represents a Database Migration Service migration job // object. type MigrationJob struct { + // CmekKeyName: The CMEK (customer-managed encryption key) fully + // qualified key name used for the migration job. This field supports + // all migration jobs types except for: * Mysql to Mysql (use the cmek + // field in the cloudsql connection profile instead). * PostrgeSQL to + // PostgreSQL (use the cmek field in the cloudsql connection profile + // instead). * PostgreSQL to AlloyDB (use the kms_key_name field in the + // alloydb connection profile instead). Each Cloud CMEK key has the + // following format: + // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_ + // NAME] + CmekKeyName string `json:"cmekKeyName,omitempty"` + // ConversionWorkspace: The conversion workspace used by the migration. ConversionWorkspace *ConversionWorkspaceInfo `json:"conversionWorkspace,omitempty"` @@ -2586,21 +2598,20 @@ type MigrationJob struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConversionWorkspace") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CmekKeyName") 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. "ConversionWorkspace") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "CmekKeyName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -3244,7 +3255,7 @@ func (s *PrivateConnectivity) MarshalJSON() ([]byte, error) { // PrivateServiceConnectConnectivity: Private Service Connect // connectivity -// (https://cloud.google.com/vpc/docs/private-service-connect#benefits-services) +// (https://cloud.google.com/vpc/docs/private-service-connect#service-attachments) type PrivateServiceConnectConnectivity struct { // ServiceAttachment: Required. A service attachment that exposes a // database, and has the following format: diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index 44d7e0cc4f7..617a0426870 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -4263,7 +4263,7 @@ } } }, - "revision": "20230501", + "revision": "20230503", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -5833,6 +5833,10 @@ "description": "Applied configs for data profile type data scan job.", "id": "GoogleCloudDataplexV1DataScanEventDataProfileAppliedConfigs", "properties": { + "rowFilterApplied": { + "description": "Boolean indicating whether a row filter was applied in the DataScan job.", + "type": "boolean" + }, "samplingPercent": { "description": "The percentage of the records selected from the dataset for DataScan. Value ranges between 0.0 and 100.0. Value 0.0 or 100.0 imply that sampling was not applied.", "format": "float", @@ -5857,6 +5861,10 @@ "description": "Applied configs for data quality type data scan job.", "id": "GoogleCloudDataplexV1DataScanEventDataQualityAppliedConfigs", "properties": { + "rowFilterApplied": { + "description": "Boolean indicating whether a row filter was applied in the DataScan job.", + "type": "boolean" + }, "samplingPercent": { "description": "The percentage of the records selected from the dataset for DataScan. Value ranges between 0.0 and 100.0. Value 0.0 or 100.0 imply that sampling was not applied.", "format": "float", diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index d523d04a2c5..2939f955b0e 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -2801,12 +2801,16 @@ func (s *GoogleCloudDataplexV1DataScanEvent) MarshalJSON() ([]byte, error) { // GoogleCloudDataplexV1DataScanEventDataProfileAppliedConfigs: Applied // configs for data profile type data scan job. type GoogleCloudDataplexV1DataScanEventDataProfileAppliedConfigs struct { + // RowFilterApplied: Boolean indicating whether a row filter was applied + // in the DataScan job. + RowFilterApplied bool `json:"rowFilterApplied,omitempty"` + // SamplingPercent: The percentage of the records selected from the // dataset for DataScan. Value ranges between 0.0 and 100.0. Value 0.0 // or 100.0 imply that sampling was not applied. SamplingPercent float64 `json:"samplingPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "SamplingPercent") to + // ForceSendFields is a list of field names (e.g. "RowFilterApplied") 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 @@ -2814,7 +2818,7 @@ type GoogleCloudDataplexV1DataScanEventDataProfileAppliedConfigs struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SamplingPercent") to + // NullFields is a list of field names (e.g. "RowFilterApplied") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2876,12 +2880,16 @@ func (s *GoogleCloudDataplexV1DataScanEventDataProfileResult) MarshalJSON() ([]b // GoogleCloudDataplexV1DataScanEventDataQualityAppliedConfigs: Applied // configs for data quality type data scan job. type GoogleCloudDataplexV1DataScanEventDataQualityAppliedConfigs struct { + // RowFilterApplied: Boolean indicating whether a row filter was applied + // in the DataScan job. + RowFilterApplied bool `json:"rowFilterApplied,omitempty"` + // SamplingPercent: The percentage of the records selected from the // dataset for DataScan. Value ranges between 0.0 and 100.0. Value 0.0 // or 100.0 imply that sampling was not applied. SamplingPercent float64 `json:"samplingPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "SamplingPercent") to + // ForceSendFields is a list of field names (e.g. "RowFilterApplied") 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 @@ -2889,7 +2897,7 @@ type GoogleCloudDataplexV1DataScanEventDataQualityAppliedConfigs struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SamplingPercent") to + // NullFields is a list of field names (e.g. "RowFilterApplied") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/dataproc/v1/dataproc-api.json b/dataproc/v1/dataproc-api.json index 484e146e626..02e7ab03e14 100644 --- a/dataproc/v1/dataproc-api.json +++ b/dataproc/v1/dataproc-api.json @@ -2671,7 +2671,7 @@ } } }, - "revision": "20230427", + "revision": "20230508", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3747,7 +3747,7 @@ "type": "array" }, "bootDiskKmsKey": { - "description": "Optional. The Customer Managed Encryption Key (CMEK) (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) used to encrypt the boot disk attached to each node in the node pool. Specify the key using the following format: projects/KEY_PROJECT_ID/locations/LOCATION /keyRings/RING_NAME/cryptoKeys/KEY_NAME.", + "description": "Optional. The Customer Managed Encryption Key (CMEK) (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) used to encrypt the boot disk attached to each node in the node pool. Specify the key using the following format: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}", "type": "string" }, "localSsdCount": { diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 19c924dbc7f..c8a8f627c72 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -2078,8 +2078,8 @@ type GkeNodeConfig struct { // (https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek) // used to encrypt the boot disk attached to each node in the node pool. // Specify the key using the following format: - // projects/KEY_PROJECT_ID/locations/LOCATION - // /keyRings/RING_NAME/cryptoKeys/KEY_NAME. + // projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys + // /{crypto_key} BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` // LocalSsdCount: Optional. The number of local SSD disks to attach to diff --git a/datastore/v1/datastore-api.json b/datastore/v1/datastore-api.json index 0e9216e4429..a9d608e2665 100644 --- a/datastore/v1/datastore-api.json +++ b/datastore/v1/datastore-api.json @@ -654,7 +654,7 @@ } } }, - "revision": "20230328", + "revision": "20230508", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -926,7 +926,7 @@ "type": "object" }, "Entity": { - "description": "A Datastore data object. An entity is limited to 1 megabyte when stored. That _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this message.", + "description": "A Datastore data object. Must not exceed 1 MiB - 4 bytes.", "id": "Entity", "properties": { "key": { diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index eb716922039..697648e459f 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -694,9 +694,7 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } -// Entity: A Datastore data object. An entity is limited to 1 megabyte -// when stored. That _roughly_ corresponds to a limit of 1 megabyte for -// the serialized form of this message. +// Entity: A Datastore data object. Must not exceed 1 MiB - 4 bytes. type Entity struct { // Key: The entity's key. An entity must have a key, unless otherwise // documented (for example, an entity in `Value.entity_value` may have diff --git a/datastore/v1beta3/datastore-api.json b/datastore/v1beta3/datastore-api.json index 8cdab185e01..79de25e284c 100644 --- a/datastore/v1beta3/datastore-api.json +++ b/datastore/v1beta3/datastore-api.json @@ -336,7 +336,7 @@ } } }, - "revision": "20230328", + "revision": "20230508", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -586,7 +586,7 @@ "type": "object" }, "Entity": { - "description": "A Datastore data object. An entity is limited to 1 megabyte when stored. That _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this message.", + "description": "A Datastore data object. Must not exceed 1 MiB - 4 bytes.", "id": "Entity", "properties": { "key": { diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index f1b88ef410c..7d8ef5a209d 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -639,9 +639,7 @@ func (s *Count) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Entity: A Datastore data object. An entity is limited to 1 megabyte -// when stored. That _roughly_ corresponds to a limit of 1 megabyte for -// the serialized form of this message. +// Entity: A Datastore data object. Must not exceed 1 MiB - 4 bytes. type Entity struct { // Key: The entity's key. An entity must have a key, unless otherwise // documented (for example, an entity in `Value.entity_value` may have diff --git a/dialogflow/v2/dialogflow-api.json b/dialogflow/v2/dialogflow-api.json index 6c315289eb4..472bbdc9371 100644 --- a/dialogflow/v2/dialogflow-api.json +++ b/dialogflow/v2/dialogflow-api.json @@ -8039,6 +8039,39 @@ ] } } + }, + "suggestions": { + "methods": { + "generateStatelessSummary": { + "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/suggestions:generateStatelessSummary", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.suggestions.generateStatelessSummary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:generateStatelessSummary", + "request": { + "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } } } }, @@ -8139,11 +8172,44 @@ ] } } + }, + "suggestions": { + "methods": { + "generateStatelessSummary": { + "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + "flatPath": "v2/projects/{projectsId}/suggestions:generateStatelessSummary", + "httpMethod": "POST", + "id": "dialogflow.projects.suggestions.generateStatelessSummary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:generateStatelessSummary", + "request": { + "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } } } } }, - "revision": "20230505", + "revision": "20230508", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -9704,6 +9770,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -9773,10 +9849,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -9791,6 +9902,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -11571,6 +11696,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -11640,10 +11775,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -11658,6 +11828,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -13744,6 +13928,82 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2GenerateStatelessSummaryRequest": { + "description": "The request message for Conversations.GenerateStatelessSummary.", + "id": "GoogleCloudDialogflowV2GenerateStatelessSummaryRequest", + "properties": { + "conversationProfile": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile", + "description": "Required. A ConversationProfile containing information required for Summary generation. Required fields: {language_code, security_settings} Optional fields: {agent_assistant_config}" + }, + "latestMessage": { + "description": "The name of the latest conversation message used as context for generating a Summary. If empty, the latest message of the conversation will be used. The format is specific to the user and the names of the messages provided.", + "type": "string" + }, + "maxContextSize": { + "description": "Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 500 and at most 1000.", + "format": "int32", + "type": "integer" + }, + "statelessConversation": { + "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation", + "description": "Required. The conversation to suggest a summary for." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation": { + "description": "The minimum amount of information required to generate a Summary without having a Conversation resource created.", + "id": "GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation", + "properties": { + "messages": { + "description": "Required. The messages that the Summary will be generated from. It is expected that this message content is already redacted and does not contain any PII. Required fields: {content, language_code, participant, participant_role} Optional fields: {send_time} If send_time is not provided, then the messages must be provided in chronological order.", + "items": { + "$ref": "GoogleCloudDialogflowV2Message" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2GenerateStatelessSummaryResponse": { + "description": "The response message for Conversations.GenerateStatelessSummary.", + "id": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including last_conversation_message used to compile the suggestion. It may be smaller than the GenerateStatelessSummaryRequest.context_size field in the request if there weren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used as context for compiling suggestion. The format is specific to the user and the names of the messages provided.", + "type": "string" + }, + "summary": { + "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary", + "description": "Generated summary." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary": { + "description": "Generated summary for a conversation.", + "id": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary", + "properties": { + "text": { + "description": "The summary content that is concatenated into one string.", + "type": "string" + }, + "textSections": { + "additionalProperties": { + "type": "string" + }, + "description": "The summary content that is divided into sections. The key is the section's name and the value is the section's content. There is no specific format for the key or value.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2HumanAgentAssistantConfig": { "description": "Defines the Human Agent Assist to connect to a conversation.", "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfig", @@ -13771,6 +14031,10 @@ "description": "Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION.", "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig", "properties": { + "baselineModelVersion": { + "description": "Version of current baseline model. It will be ignored if model is set. Valid versions are: Article Suggestion baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - 1.0", + "type": "string" + }, "model": { "description": "Conversation model resource name. Format: `projects//conversationModels/`.", "type": "string" @@ -13859,7 +14123,7 @@ "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig", "properties": { "confidenceThreshold": { - "description": "Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE.", + "description": "Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST.", "format": "float", "type": "number" }, @@ -19145,6 +19409,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "triggeredAbandonmentEvent": { "description": "Whether agent has triggered the event corresponding to user abandoning the conversation.", "type": "boolean" diff --git a/dialogflow/v2/dialogflow-gen.go b/dialogflow/v2/dialogflow-gen.go index 04e4066cc0d..ad645c6c1b6 100644 --- a/dialogflow/v2/dialogflow-gen.go +++ b/dialogflow/v2/dialogflow-gen.go @@ -159,6 +159,7 @@ func NewProjectsService(s *Service) *ProjectsService { rs.KnowledgeBases = NewProjectsKnowledgeBasesService(s) rs.Locations = NewProjectsLocationsService(s) rs.Operations = NewProjectsOperationsService(s) + rs.Suggestions = NewProjectsSuggestionsService(s) return rs } @@ -182,6 +183,8 @@ type ProjectsService struct { Locations *ProjectsLocationsService Operations *ProjectsOperationsService + + Suggestions *ProjectsSuggestionsService } func NewProjectsAgentService(s *Service) *ProjectsAgentService { @@ -509,6 +512,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Conversations = NewProjectsLocationsConversationsService(s) rs.KnowledgeBases = NewProjectsLocationsKnowledgeBasesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Suggestions = NewProjectsLocationsSuggestionsService(s) return rs } @@ -530,6 +534,8 @@ type ProjectsLocationsService struct { KnowledgeBases *ProjectsLocationsKnowledgeBasesService Operations *ProjectsLocationsOperationsService + + Suggestions *ProjectsLocationsSuggestionsService } func NewProjectsLocationsAgentService(s *Service) *ProjectsLocationsAgentService { @@ -832,6 +838,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsSuggestionsService(s *Service) *ProjectsLocationsSuggestionsService { + rs := &ProjectsLocationsSuggestionsService{s: s} + return rs +} + +type ProjectsLocationsSuggestionsService struct { + s *Service +} + func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { rs := &ProjectsOperationsService{s: s} return rs @@ -841,6 +856,15 @@ type ProjectsOperationsService struct { s *Service } +func NewProjectsSuggestionsService(s *Service) *ProjectsSuggestionsService { + rs := &ProjectsSuggestionsService{s: s} + return rs +} + +type ProjectsSuggestionsService struct { + s *Service +} + // GoogleCloudDialogflowCxV3AudioInput: Represents the natural speech // audio to be processed. type GoogleCloudDialogflowCxV3AudioInput struct { @@ -3792,6 +3816,17 @@ type GoogleCloudDialogflowCxV3TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -3823,6 +3858,22 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata // for UpdateDocument operation. type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { @@ -3922,9 +3973,33 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -3936,6 +4011,14 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -7309,6 +7392,17 @@ type GoogleCloudDialogflowCxV3beta1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -7340,6 +7434,22 @@ func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3beta1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { @@ -7439,9 +7549,33 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -7453,6 +7587,14 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -11098,6 +11240,168 @@ func (s *GoogleCloudDialogflowV2GcsSources) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2GenerateStatelessSummaryRequest: The request +// message for Conversations.GenerateStatelessSummary. +type GoogleCloudDialogflowV2GenerateStatelessSummaryRequest struct { + // ConversationProfile: Required. A ConversationProfile containing + // information required for Summary generation. Required fields: + // {language_code, security_settings} Optional fields: + // {agent_assistant_config} + ConversationProfile *GoogleCloudDialogflowV2ConversationProfile `json:"conversationProfile,omitempty"` + + // LatestMessage: The name of the latest conversation message used as + // context for generating a Summary. If empty, the latest message of the + // conversation will be used. The format is specific to the user and the + // names of the messages provided. + LatestMessage string `json:"latestMessage,omitempty"` + + // MaxContextSize: Max number of messages prior to and including + // [latest_message] to use as context when compiling the suggestion. By + // default 500 and at most 1000. + MaxContextSize int64 `json:"maxContextSize,omitempty"` + + // StatelessConversation: Required. The conversation to suggest a + // summary for. + StatelessConversation *GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation `json:"statelessConversation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConversationProfile") + // 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. "ConversationProfile") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2GenerateStatelessSummaryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2GenerateStatelessSummaryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversat +// ion: The minimum amount of information required to generate a Summary +// without having a Conversation resource created. +type GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation struct { + // Messages: Required. The messages that the Summary will be generated + // from. It is expected that this message content is already redacted + // and does not contain any PII. Required fields: {content, + // language_code, participant, participant_role} Optional fields: + // {send_time} If send_time is not provided, then the messages must be + // provided in chronological order. + Messages []*GoogleCloudDialogflowV2Message `json:"messages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Messages") 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. "Messages") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2GenerateStatelessSummaryResponse: The response +// message for Conversations.GenerateStatelessSummary. +type GoogleCloudDialogflowV2GenerateStatelessSummaryResponse struct { + // ContextSize: Number of messages prior to and including + // last_conversation_message used to compile the suggestion. It may be + // smaller than the GenerateStatelessSummaryRequest.context_size field + // in the request if there weren't that many messages in the + // conversation. + ContextSize int64 `json:"contextSize,omitempty"` + + // LatestMessage: The name of the latest conversation message used as + // context for compiling suggestion. The format is specific to the user + // and the names of the messages provided. + LatestMessage string `json:"latestMessage,omitempty"` + + // Summary: Generated summary. + Summary *GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary `json:"summary,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ContextSize") 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. "ContextSize") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2GenerateStatelessSummaryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2GenerateStatelessSummaryResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary: +// Generated summary for a conversation. +type GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary struct { + // Text: The summary content that is concatenated into one string. + Text string `json:"text,omitempty"` + + // TextSections: The summary content that is divided into sections. The + // key is the section's name and the value is the section's content. + // There is no specific format for the key or value. + TextSections map[string]string `json:"textSections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Text") 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. "Text") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2HumanAgentAssistantConfig: Defines the Human // Agent Assist to connect to a conversation. type GoogleCloudDialogflowV2HumanAgentAssistantConfig struct { @@ -11147,24 +11451,32 @@ func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfig) MarshalJSON() ([]byte // feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, // CONVERSATION_SUMMARIZATION. type GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig struct { + // BaselineModelVersion: Version of current baseline model. It will be + // ignored if model is set. Valid versions are: Article Suggestion + // baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - + // 1.0 + BaselineModelVersion string `json:"baselineModelVersion,omitempty"` + // Model: Conversation model resource name. Format: // `projects//conversationModels/`. Model string `json:"model,omitempty"` - // ForceSendFields is a list of field names (e.g. "Model") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "BaselineModelVersion") 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. "Model") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "BaselineModelVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -11365,7 +11677,8 @@ type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig struc // this value by starting from a very low value and slowly increasing // until you have desired results. If this field is not set, it defaults // to 0.0, which means that all suggestions are returned. Supported - // features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. + // features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, + // KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST. ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` // ContextFilterSettings: Determines how recent conversation context is @@ -20800,6 +21113,17 @@ type GoogleCloudDialogflowV3alpha1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // TriggeredAbandonmentEvent: Whether agent has triggered the event // corresponding to user abandoning the conversation. TriggeredAbandonmentEvent bool `json:"triggeredAbandonmentEvent,omitempty"` @@ -20835,6 +21159,22 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowV3alpha1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { @@ -60629,6 +60969,154 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } +// method id "dialogflow.projects.locations.suggestions.generateStatelessSummary": + +type ProjectsLocationsSuggestionsGenerateStatelessSummaryCall struct { + s *Service + parent string + googleclouddialogflowv2generatestatelesssummaryrequest *GoogleCloudDialogflowV2GenerateStatelessSummaryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateStatelessSummary: Generates and returns a summary for a +// conversation that does not have a resource created for it. +// +// - parent: The parent resource to charge for the Summary's generation. +// Format: `projects//locations/`. +func (r *ProjectsLocationsSuggestionsService) GenerateStatelessSummary(parent string, googleclouddialogflowv2generatestatelesssummaryrequest *GoogleCloudDialogflowV2GenerateStatelessSummaryRequest) *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall { + c := &ProjectsLocationsSuggestionsGenerateStatelessSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2generatestatelesssummaryrequest = googleclouddialogflowv2generatestatelesssummaryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall { + 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 *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Context(ctx context.Context) *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) doRequest(alt string) (*http.Response, 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.googleclouddialogflowv2generatestatelesssummaryrequest) + 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, "v2/{+parent}/suggestions:generateStatelessSummary") + 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 "dialogflow.projects.locations.suggestions.generateStatelessSummary" call. +// Exactly one of +// *GoogleCloudDialogflowV2GenerateStatelessSummaryResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2GenerateStatelessSummaryResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2GenerateStatelessSummaryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2GenerateStatelessSummaryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/suggestions:generateStatelessSummary", + // "httpMethod": "POST", + // "id": "dialogflow.projects.locations.suggestions.generateStatelessSummary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/suggestions:generateStatelessSummary", + // "request": { + // "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.operations.cancel": type ProjectsOperationsCancelCall struct { @@ -61127,3 +61615,151 @@ func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLo c.PageToken(x.NextPageToken) } } + +// method id "dialogflow.projects.suggestions.generateStatelessSummary": + +type ProjectsSuggestionsGenerateStatelessSummaryCall struct { + s *Service + parent string + googleclouddialogflowv2generatestatelesssummaryrequest *GoogleCloudDialogflowV2GenerateStatelessSummaryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateStatelessSummary: Generates and returns a summary for a +// conversation that does not have a resource created for it. +// +// - parent: The parent resource to charge for the Summary's generation. +// Format: `projects//locations/`. +func (r *ProjectsSuggestionsService) GenerateStatelessSummary(parent string, googleclouddialogflowv2generatestatelesssummaryrequest *GoogleCloudDialogflowV2GenerateStatelessSummaryRequest) *ProjectsSuggestionsGenerateStatelessSummaryCall { + c := &ProjectsSuggestionsGenerateStatelessSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2generatestatelesssummaryrequest = googleclouddialogflowv2generatestatelesssummaryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Fields(s ...googleapi.Field) *ProjectsSuggestionsGenerateStatelessSummaryCall { + 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 *ProjectsSuggestionsGenerateStatelessSummaryCall) Context(ctx context.Context) *ProjectsSuggestionsGenerateStatelessSummaryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) doRequest(alt string) (*http.Response, 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.googleclouddialogflowv2generatestatelesssummaryrequest) + 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, "v2/{+parent}/suggestions:generateStatelessSummary") + 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 "dialogflow.projects.suggestions.generateStatelessSummary" call. +// Exactly one of +// *GoogleCloudDialogflowV2GenerateStatelessSummaryResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2GenerateStatelessSummaryResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2GenerateStatelessSummaryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2GenerateStatelessSummaryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + // "flatPath": "v2/projects/{projectsId}/suggestions:generateStatelessSummary", + // "httpMethod": "POST", + // "id": "dialogflow.projects.suggestions.generateStatelessSummary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/suggestions:generateStatelessSummary", + // "request": { + // "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index 1c926cecab8..588f0be44ee 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -7407,6 +7407,39 @@ ] } } + }, + "suggestions": { + "methods": { + "generateStatelessSummary": { + "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/suggestions:generateStatelessSummary", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.suggestions.generateStatelessSummary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/suggestions:generateStatelessSummary", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } } } }, @@ -7507,11 +7540,44 @@ ] } } + }, + "suggestions": { + "methods": { + "generateStatelessSummary": { + "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + "flatPath": "v2beta1/projects/{projectsId}/suggestions:generateStatelessSummary", + "httpMethod": "POST", + "id": "dialogflow.projects.suggestions.generateStatelessSummary", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/suggestions:generateStatelessSummary", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } } } } }, - "revision": "20230505", + "revision": "20230508", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -9072,6 +9138,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -9141,10 +9217,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -9159,6 +9270,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -10939,6 +11064,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -11008,10 +11143,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -11026,6 +11196,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -15033,6 +15217,82 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest": { + "description": "The request message for Conversations.GenerateStatelessSummary.", + "id": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest", + "properties": { + "conversationProfile": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile", + "description": "Required. A ConversationProfile containing information required for Summary generation. Required fields: {language_code, security_settings} Optional fields: {agent_assistant_config}" + }, + "latestMessage": { + "description": "The name of the latest conversation message used as context for generating a Summary. If empty, the latest message of the conversation will be used. The format is specific to the user and the names of the messages provided.", + "type": "string" + }, + "maxContextSize": { + "description": "Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 500 and at most 1000.", + "format": "int32", + "type": "integer" + }, + "statelessConversation": { + "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConversation", + "description": "Required. The conversation to suggest a summary for." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConversation": { + "description": "The minimum amount of information required to generate a Summary without having a Conversation resource created.", + "id": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConversation", + "properties": { + "messages": { + "description": "Required. The messages that the Summary will be generated from. It is expected that this message content is already redacted and does not contain any PII. Required fields: {content, language_code, participant, participant_role} Optional fields: {send_time} If send_time is not provided, then the messages must be provided in chronological order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1Message" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse": { + "description": "The response message for Conversations.GenerateStatelessSummary.", + "id": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including last_conversation_message used to compile the suggestion. It may be smaller than the GenerateStatelessSummaryRequest.context_size field in the request if there weren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used as context for compiling suggestion. The format is specific to the user and the names of the messages provided.", + "type": "string" + }, + "summary": { + "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary", + "description": "Generated summary." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary": { + "description": "Generated summary for a conversation.", + "id": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary", + "properties": { + "text": { + "description": "The summary content that is concatenated into one string.", + "type": "string" + }, + "textSections": { + "additionalProperties": { + "type": "string" + }, + "description": "The summary content that is divided into sections. The key is the section's name and the value is the section's content. There is no specific format for the key or value.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig": { "description": "Defines the Human Agent Assistant to connect to a conversation.", "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig", @@ -15060,6 +15320,10 @@ "description": "Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION.", "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationModelConfig", "properties": { + "baselineModelVersion": { + "description": "Version of current baseline model. It will be ignored if model is set. Valid versions are: Article Suggestion baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - 1.0", + "type": "string" + }, "model": { "description": "Conversation model resource name. Format: `projects//conversationModels/`.", "type": "string" @@ -15148,7 +15412,7 @@ "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig", "properties": { "confidenceThreshold": { - "description": "Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it is default to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE.", + "description": "Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it is default to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST.", "format": "float", "type": "number" }, @@ -18723,6 +18987,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "triggeredAbandonmentEvent": { "description": "Whether agent has triggered the event corresponding to user abandoning the conversation.", "type": "boolean" diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index 5107e7b5bae..43129ea041b 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -157,6 +157,7 @@ func NewProjectsService(s *Service) *ProjectsService { rs.KnowledgeBases = NewProjectsKnowledgeBasesService(s) rs.Locations = NewProjectsLocationsService(s) rs.Operations = NewProjectsOperationsService(s) + rs.Suggestions = NewProjectsSuggestionsService(s) return rs } @@ -176,6 +177,8 @@ type ProjectsService struct { Locations *ProjectsLocationsService Operations *ProjectsOperationsService + + Suggestions *ProjectsSuggestionsService } func NewProjectsAgentService(s *Service) *ProjectsAgentService { @@ -471,6 +474,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Conversations = NewProjectsLocationsConversationsService(s) rs.KnowledgeBases = NewProjectsLocationsKnowledgeBasesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Suggestions = NewProjectsLocationsSuggestionsService(s) return rs } @@ -488,6 +492,8 @@ type ProjectsLocationsService struct { KnowledgeBases *ProjectsLocationsKnowledgeBasesService Operations *ProjectsLocationsOperationsService + + Suggestions *ProjectsLocationsSuggestionsService } func NewProjectsLocationsAgentService(s *Service) *ProjectsLocationsAgentService { @@ -760,6 +766,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsSuggestionsService(s *Service) *ProjectsLocationsSuggestionsService { + rs := &ProjectsLocationsSuggestionsService{s: s} + return rs +} + +type ProjectsLocationsSuggestionsService struct { + s *Service +} + func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { rs := &ProjectsOperationsService{s: s} return rs @@ -769,6 +784,15 @@ type ProjectsOperationsService struct { s *Service } +func NewProjectsSuggestionsService(s *Service) *ProjectsSuggestionsService { + rs := &ProjectsSuggestionsService{s: s} + return rs +} + +type ProjectsSuggestionsService struct { + s *Service +} + // GoogleCloudDialogflowCxV3AudioInput: Represents the natural speech // audio to be processed. type GoogleCloudDialogflowCxV3AudioInput struct { @@ -3720,6 +3744,17 @@ type GoogleCloudDialogflowCxV3TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -3751,6 +3786,22 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata // for UpdateDocument operation. type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { @@ -3850,9 +3901,33 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -3864,6 +3939,14 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -7237,6 +7320,17 @@ type GoogleCloudDialogflowCxV3beta1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -7268,6 +7362,22 @@ func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3beta1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { @@ -7367,9 +7477,33 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -7381,6 +7515,14 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -14314,6 +14456,168 @@ func (s *GoogleCloudDialogflowV2beta1GcsSources) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest: The +// request message for Conversations.GenerateStatelessSummary. +type GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest struct { + // ConversationProfile: Required. A ConversationProfile containing + // information required for Summary generation. Required fields: + // {language_code, security_settings} Optional fields: + // {agent_assistant_config} + ConversationProfile *GoogleCloudDialogflowV2beta1ConversationProfile `json:"conversationProfile,omitempty"` + + // LatestMessage: The name of the latest conversation message used as + // context for generating a Summary. If empty, the latest message of the + // conversation will be used. The format is specific to the user and the + // names of the messages provided. + LatestMessage string `json:"latestMessage,omitempty"` + + // MaxContextSize: Max number of messages prior to and including + // [latest_message] to use as context when compiling the suggestion. By + // default 500 and at most 1000. + MaxContextSize int64 `json:"maxContextSize,omitempty"` + + // StatelessConversation: Required. The conversation to suggest a + // summary for. + StatelessConversation *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConversation `json:"statelessConversation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConversationProfile") + // 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. "ConversationProfile") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConv +// ersation: The minimum amount of information required to generate a +// Summary without having a Conversation resource created. +type GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConversation struct { + // Messages: Required. The messages that the Summary will be generated + // from. It is expected that this message content is already redacted + // and does not contain any PII. Required fields: {content, + // language_code, participant, participant_role} Optional fields: + // {send_time} If send_time is not provided, then the messages must be + // provided in chronological order. + Messages []*GoogleCloudDialogflowV2beta1Message `json:"messages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Messages") 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. "Messages") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConversation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequestMinimalConversation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse: The +// response message for Conversations.GenerateStatelessSummary. +type GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse struct { + // ContextSize: Number of messages prior to and including + // last_conversation_message used to compile the suggestion. It may be + // smaller than the GenerateStatelessSummaryRequest.context_size field + // in the request if there weren't that many messages in the + // conversation. + ContextSize int64 `json:"contextSize,omitempty"` + + // LatestMessage: The name of the latest conversation message used as + // context for compiling suggestion. The format is specific to the user + // and the names of the messages provided. + LatestMessage string `json:"latestMessage,omitempty"` + + // Summary: Generated summary. + Summary *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary `json:"summary,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ContextSize") 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. "ContextSize") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary: +// Generated summary for a conversation. +type GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary struct { + // Text: The summary content that is concatenated into one string. + Text string `json:"text,omitempty"` + + // TextSections: The summary content that is divided into sections. The + // key is the section's name and the value is the section's content. + // There is no specific format for the key or value. + TextSections map[string]string `json:"textSections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Text") 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. "Text") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig: Defines the // Human Agent Assistant to connect to a conversation. type GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig struct { @@ -14363,24 +14667,32 @@ func (s *GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig) MarshalJSON() ([ // Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, // CONVERSATION_SUMMARIZATION. type GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationModelConfig struct { + // BaselineModelVersion: Version of current baseline model. It will be + // ignored if model is set. Valid versions are: Article Suggestion + // baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - + // 1.0 + BaselineModelVersion string `json:"baselineModelVersion,omitempty"` + // Model: Conversation model resource name. Format: // `projects//conversationModels/`. Model string `json:"model,omitempty"` - // ForceSendFields is a list of field names (e.g. "Model") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "BaselineModelVersion") 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. "Model") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "BaselineModelVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -14582,7 +14894,7 @@ type GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig // until you have desired results. If this field is not set, it is // default to 0.0, which means that all suggestions are returned. // Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, - // SMART_COMPOSE. + // SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST. ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` // ContextFilterSettings: Determines how recent conversation context is @@ -21011,6 +21323,17 @@ type GoogleCloudDialogflowV3alpha1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // TriggeredAbandonmentEvent: Whether agent has triggered the event // corresponding to user abandoning the conversation. TriggeredAbandonmentEvent bool `json:"triggeredAbandonmentEvent,omitempty"` @@ -21046,6 +21369,22 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowV3alpha1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { @@ -57884,6 +58223,154 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } +// method id "dialogflow.projects.locations.suggestions.generateStatelessSummary": + +type ProjectsLocationsSuggestionsGenerateStatelessSummaryCall struct { + s *Service + parent string + googleclouddialogflowv2beta1generatestatelesssummaryrequest *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateStatelessSummary: Generates and returns a summary for a +// conversation that does not have a resource created for it. +// +// - parent: The parent resource to charge for the Summary's generation. +// Format: `projects//locations/`. +func (r *ProjectsLocationsSuggestionsService) GenerateStatelessSummary(parent string, googleclouddialogflowv2beta1generatestatelesssummaryrequest *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest) *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall { + c := &ProjectsLocationsSuggestionsGenerateStatelessSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2beta1generatestatelesssummaryrequest = googleclouddialogflowv2beta1generatestatelesssummaryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall { + 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 *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Context(ctx context.Context) *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) doRequest(alt string) (*http.Response, 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.googleclouddialogflowv2beta1generatestatelesssummaryrequest) + 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, "v2beta1/{+parent}/suggestions:generateStatelessSummary") + 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 "dialogflow.projects.locations.suggestions.generateStatelessSummary" call. +// Exactly one of +// *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + // "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/suggestions:generateStatelessSummary", + // "httpMethod": "POST", + // "id": "dialogflow.projects.locations.suggestions.generateStatelessSummary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+parent}/suggestions:generateStatelessSummary", + // "request": { + // "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.operations.cancel": type ProjectsOperationsCancelCall struct { @@ -58382,3 +58869,151 @@ func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLo c.PageToken(x.NextPageToken) } } + +// method id "dialogflow.projects.suggestions.generateStatelessSummary": + +type ProjectsSuggestionsGenerateStatelessSummaryCall struct { + s *Service + parent string + googleclouddialogflowv2beta1generatestatelesssummaryrequest *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateStatelessSummary: Generates and returns a summary for a +// conversation that does not have a resource created for it. +// +// - parent: The parent resource to charge for the Summary's generation. +// Format: `projects//locations/`. +func (r *ProjectsSuggestionsService) GenerateStatelessSummary(parent string, googleclouddialogflowv2beta1generatestatelesssummaryrequest *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest) *ProjectsSuggestionsGenerateStatelessSummaryCall { + c := &ProjectsSuggestionsGenerateStatelessSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2beta1generatestatelesssummaryrequest = googleclouddialogflowv2beta1generatestatelesssummaryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Fields(s ...googleapi.Field) *ProjectsSuggestionsGenerateStatelessSummaryCall { + 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 *ProjectsSuggestionsGenerateStatelessSummaryCall) Context(ctx context.Context) *ProjectsSuggestionsGenerateStatelessSummaryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) doRequest(alt string) (*http.Response, 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.googleclouddialogflowv2beta1generatestatelesssummaryrequest) + 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, "v2beta1/{+parent}/suggestions:generateStatelessSummary") + 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 "dialogflow.projects.suggestions.generateStatelessSummary" call. +// Exactly one of +// *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generates and returns a summary for a conversation that does not have a resource created for it.", + // "flatPath": "v2beta1/projects/{projectsId}/suggestions:generateStatelessSummary", + // "httpMethod": "POST", + // "id": "dialogflow.projects.suggestions.generateStatelessSummary", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+parent}/suggestions:generateStatelessSummary", + // "request": { + // "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} diff --git a/dialogflow/v3/dialogflow-api.json b/dialogflow/v3/dialogflow-api.json index c7fbe15ea29..7ad0f8d04b2 100644 --- a/dialogflow/v3/dialogflow-api.json +++ b/dialogflow/v3/dialogflow-api.json @@ -3820,7 +3820,7 @@ } } }, - "revision": "20230505", + "revision": "20230508", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -7554,6 +7554,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -7846,10 +7856,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -7864,6 +7909,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -9644,6 +9703,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -9713,10 +9782,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -9731,6 +9835,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -14412,6 +14530,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "triggeredAbandonmentEvent": { "description": "Whether agent has triggered the event corresponding to user abandoning the conversation.", "type": "boolean" diff --git a/dialogflow/v3/dialogflow-gen.go b/dialogflow/v3/dialogflow-gen.go index c8f93441c39..a2da72a1de3 100644 --- a/dialogflow/v3/dialogflow-gen.go +++ b/dialogflow/v3/dialogflow-gen.go @@ -7503,6 +7503,17 @@ type GoogleCloudDialogflowCxV3TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -7534,6 +7545,22 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata // for UpdateDocument operation. type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { @@ -7983,9 +8010,33 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -7997,6 +8048,14 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -11370,6 +11429,17 @@ type GoogleCloudDialogflowCxV3beta1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -11401,6 +11471,22 @@ func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3beta1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { @@ -11500,9 +11586,33 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -11514,6 +11624,14 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -19483,6 +19601,17 @@ type GoogleCloudDialogflowV3alpha1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // TriggeredAbandonmentEvent: Whether agent has triggered the event // corresponding to user abandoning the conversation. TriggeredAbandonmentEvent bool `json:"triggeredAbandonmentEvent,omitempty"` @@ -19518,6 +19647,22 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowV3alpha1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { diff --git a/dialogflow/v3beta1/dialogflow-api.json b/dialogflow/v3beta1/dialogflow-api.json index 5d906b0d991..f68b76f79cc 100644 --- a/dialogflow/v3beta1/dialogflow-api.json +++ b/dialogflow/v3beta1/dialogflow-api.json @@ -3820,7 +3820,7 @@ } } }, - "revision": "20230505", + "revision": "20230508", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -5381,6 +5381,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -5450,10 +5460,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -5468,6 +5513,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -9421,6 +9480,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "userEscalated": { "description": "Whether user was specifically asking for a live agent.", "type": "boolean" @@ -9713,10 +9782,45 @@ }, "type": "array" }, + "httpMethod": { + "description": "Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method not specified.", + "HTTP POST Method.", + "HTTP GET Method.", + "HTTP HEAD Method.", + "HTTP PUT Method.", + "HTTP DELETE Method.", + "HTTP PATCH Method.", + "HTTP OPTIONS Method." + ], + "type": "string" + }, + "parameterMapping": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response", + "type": "object" + }, "password": { "description": "The password for HTTP Basic authentication.", "type": "string" }, + "requestBody": { + "description": "Optional. Defines a custom JSON object as request body to send to flexible webhook.", + "type": "string" + }, "requestHeaders": { "additionalProperties": { "type": "string" @@ -9731,6 +9835,20 @@ "username": { "description": "The user name for HTTP Basic authentication.", "type": "string" + }, + "webhookType": { + "description": "Optional. Type of the webhook.", + "enum": [ + "WEBHOOK_TYPE_UNSPECIFIED", + "STANDARD", + "FLEXIBLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a standard webhook.", + "Represents a flexible webhook." + ], + "type": "string" } }, "type": "object" @@ -14412,6 +14530,16 @@ "description": "Whether turn resulted in End Session page.", "type": "boolean" }, + "sentimentMagnitude": { + "description": "Sentiment magnitude of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, + "sentimentScore": { + "description": "Sentiment score of the user utterance if [sentiment](https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was enabled.", + "format": "float", + "type": "number" + }, "triggeredAbandonmentEvent": { "description": "Whether agent has triggered the event corresponding to user abandoning the conversation.", "type": "boolean" diff --git a/dialogflow/v3beta1/dialogflow-gen.go b/dialogflow/v3beta1/dialogflow-gen.go index ec48aea858b..76d62289ef9 100644 --- a/dialogflow/v3beta1/dialogflow-gen.go +++ b/dialogflow/v3beta1/dialogflow-gen.go @@ -3384,6 +3384,17 @@ type GoogleCloudDialogflowCxV3TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -3415,6 +3426,22 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata // for UpdateDocument operation. type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { @@ -3514,9 +3541,33 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -3528,6 +3579,14 @@ type GoogleCloudDialogflowCxV3WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -11026,6 +11085,17 @@ type GoogleCloudDialogflowCxV3beta1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // UserEscalated: Whether user was specifically asking for a live agent. UserEscalated bool `json:"userEscalated,omitempty"` @@ -11057,6 +11127,22 @@ func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3beta1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { @@ -11507,9 +11593,33 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // "\nsubjectAltName='DNS:www.example.com'") ``` AllowedCaCerts []string `json:"allowedCaCerts,omitempty"` + // HttpMethod: Optional. HTTP method for the flexible webhook calls. + // Standard webhook always uses POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method not specified. + // "POST" - HTTP POST Method. + // "GET" - HTTP GET Method. + // "HEAD" - HTTP HEAD Method. + // "PUT" - HTTP PUT Method. + // "DELETE" - HTTP DELETE Method. + // "PATCH" - HTTP PATCH Method. + // "OPTIONS" - HTTP OPTIONS Method. + HttpMethod string `json:"httpMethod,omitempty"` + + // ParameterMapping: Optional. Maps the values extracted from specific + // fields of the flexible webhook response into session parameters. - + // Key: session parameter name - Value: field path in the webhook + // response + ParameterMapping map[string]string `json:"parameterMapping,omitempty"` + // Password: The password for HTTP Basic authentication. Password string `json:"password,omitempty"` + // RequestBody: Optional. Defines a custom JSON object as request body + // to send to flexible webhook. + RequestBody string `json:"requestBody,omitempty"` + // RequestHeaders: The HTTP request headers to send together with // webhook requests. RequestHeaders map[string]string `json:"requestHeaders,omitempty"` @@ -11521,6 +11631,14 @@ type GoogleCloudDialogflowCxV3beta1WebhookGenericWebService struct { // Username: The user name for HTTP Basic authentication. Username string `json:"username,omitempty"` + // WebhookType: Optional. Type of the webhook. + // + // Possible values: + // "WEBHOOK_TYPE_UNSPECIFIED" - Default value. This value is unused. + // "STANDARD" - Represents a standard webhook. + // "FLEXIBLE" - Represents a flexible webhook. + WebhookType string `json:"webhookType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedCaCerts") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -19490,6 +19608,17 @@ type GoogleCloudDialogflowV3alpha1TurnSignals struct { // ReachedEndPage: Whether turn resulted in End Session page. ReachedEndPage bool `json:"reachedEndPage,omitempty"` + // SentimentMagnitude: Sentiment magnitude of the user utterance if + // sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentMagnitude float64 `json:"sentimentMagnitude,omitempty"` + + // SentimentScore: Sentiment score of the user utterance if sentiment + // (https://cloud.google.com/dialogflow/cx/docs/concept/sentiment) was + // enabled. + SentimentScore float64 `json:"sentimentScore,omitempty"` + // TriggeredAbandonmentEvent: Whether agent has triggered the event // corresponding to user abandoning the conversation. TriggeredAbandonmentEvent bool `json:"triggeredAbandonmentEvent,omitempty"` @@ -19525,6 +19654,22 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowV3alpha1TurnSignals + var s1 struct { + SentimentMagnitude gensupport.JSONFloat64 `json:"sentimentMagnitude"` + SentimentScore gensupport.JSONFloat64 `json:"sentimentScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SentimentMagnitude = float64(s1.SentimentMagnitude) + s.SentimentScore = float64(s1.SentimentScore) + return nil +} + // GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: // Metadata for UpdateDocument operation. type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { diff --git a/domains/v1/domains-api.json b/domains/v1/domains-api.json index 7e7da245638..cb76a26c933 100644 --- a/domains/v1/domains-api.json +++ b/domains/v1/domains-api.json @@ -843,7 +843,7 @@ } } }, - "revision": "20230419", + "revision": "20230503", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1376,7 +1376,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/domains/v1/domains-gen.go b/domains/v1/domains-gen.go index 9a0f0e586f2..2eabeb9e8a5 100644 --- a/domains/v1/domains-gen.go +++ b/domains/v1/domains-gen.go @@ -1129,7 +1129,7 @@ func (s *ListRegistrationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/domains/v1alpha2/domains-api.json b/domains/v1alpha2/domains-api.json index 59efc592f58..2f9dbb70bcb 100644 --- a/domains/v1alpha2/domains-api.json +++ b/domains/v1alpha2/domains-api.json @@ -843,7 +843,7 @@ } } }, - "revision": "20230419", + "revision": "20230503", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1376,7 +1376,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/domains/v1alpha2/domains-gen.go b/domains/v1alpha2/domains-gen.go index 91888b38e23..829a292b2a2 100644 --- a/domains/v1alpha2/domains-gen.go +++ b/domains/v1alpha2/domains-gen.go @@ -1129,7 +1129,7 @@ func (s *ListRegistrationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/domains/v1beta1/domains-api.json b/domains/v1beta1/domains-api.json index 8be03764544..620e70b959a 100644 --- a/domains/v1beta1/domains-api.json +++ b/domains/v1beta1/domains-api.json @@ -843,7 +843,7 @@ } } }, - "revision": "20230419", + "revision": "20230503", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1376,7 +1376,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/domains/v1beta1/domains-gen.go b/domains/v1beta1/domains-gen.go index a3c78f38cd5..c3f24f5e2d9 100644 --- a/domains/v1beta1/domains-gen.go +++ b/domains/v1beta1/domains-gen.go @@ -1129,7 +1129,7 @@ func (s *ListRegistrationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/doubleclickbidmanager/v2/doubleclickbidmanager-api.json b/doubleclickbidmanager/v2/doubleclickbidmanager-api.json index b0b5df42484..132b6237364 100644 --- a/doubleclickbidmanager/v2/doubleclickbidmanager-api.json +++ b/doubleclickbidmanager/v2/doubleclickbidmanager-api.json @@ -320,7 +320,7 @@ } } }, - "revision": "20220707", + "revision": "20230502", "rootUrl": "https://doubleclickbidmanager.googleapis.com/", "schemas": { "ChannelGrouping": { @@ -547,7 +547,7 @@ "description": "Additional query options." }, "type": { - "description": "The type of the report. The type of the report will dictate what dimesions, filters, and metrics can be used.", + "description": "The type of the report. The type of the report will dictate what dimesions, filters, and metrics can be used. **Warning:** The `AUDIENCE_COMPOSITION` report type will be deprecated in Display \u0026 Video 360 on **June 8, 2023**. Once deprecated, you will no longer be able to create new or retrieve existing Query and Report resources of this type.", "enum": [ "REPORT_TYPE_UNSPECIFIED", "STANDARD", @@ -566,7 +566,7 @@ "Default value when report type is not specified or is unknown in this version.", "Standard report.", "Inventory Availability report.", - "Audience Composition report.", + "Audience Composition report. **Warning:** This report type will be deprecated in Display \u0026 Video 360 on **June 8, 2023**. Once deprecated, you will no longer be able to create new or retrieve existing Query and Report resources of this type.", "Floodlight report.", "YouTube report.", "GRP report.", diff --git a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go index f8d06548e32..8a3177933c9 100644 --- a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go +++ b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go @@ -523,14 +523,21 @@ type Parameters struct { Options *Options `json:"options,omitempty"` // Type: The type of the report. The type of the report will dictate - // what dimesions, filters, and metrics can be used. + // what dimesions, filters, and metrics can be used. **Warning:** The + // `AUDIENCE_COMPOSITION` report type will be deprecated in Display & + // Video 360 on **June 8, 2023**. Once deprecated, you will no longer be + // able to create new or retrieve existing Query and Report resources of + // this type. // // Possible values: // "REPORT_TYPE_UNSPECIFIED" - Default value when report type is not // specified or is unknown in this version. // "STANDARD" - Standard report. // "INVENTORY_AVAILABILITY" - Inventory Availability report. - // "AUDIENCE_COMPOSITION" - Audience Composition report. + // "AUDIENCE_COMPOSITION" - Audience Composition report. **Warning:** + // This report type will be deprecated in Display & Video 360 on **June + // 8, 2023**. Once deprecated, you will no longer be able to create new + // or retrieve existing Query and Report resources of this type. // "FLOODLIGHT" - Floodlight report. // "YOUTUBE" - YouTube report. // "GRP" - GRP report. diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index bfc4e37fe27..fdd85dfd00a 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -1197,7 +1197,7 @@ } } }, - "revision": "20230428", + "revision": "20230505", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -1422,7 +1422,7 @@ "id": "EventFilter", "properties": { "attribute": { - "description": "Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute.", + "description": "Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. You can [retrieve a specific provider's supported event types](/eventarc/docs/list-providers#describe-provider). All triggers MUST provide a filter for the 'type' attribute.", "type": "string" }, "operator": { @@ -2080,7 +2080,7 @@ "type": "string" }, "serviceAccount": { - "description": "Optional. The IAM service account email associated with the trigger. The service account represents the identity of the trigger. The principal who calls this API must have the `iam.serviceAccounts.actAs` permission in the service account. See https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account for information on how to invoke authenticated Cloud Run services. To create Audit Log triggers, the service account should also have the `roles/eventarc.eventReceiver` IAM role.", + "description": "Optional. The IAM service account email associated with the trigger. The service account represents the identity of the trigger. The `iam.serviceAccounts.actAs` permission must be granted on the service account to allow a principal to impersonate the service account. For more information, see the [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific to the trigger destination.", "type": "string" }, "transport": { diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index 9045de56491..c2290d7d231 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -647,8 +647,10 @@ type Empty struct { // attributes. type EventFilter struct { // Attribute: Required. The name of a CloudEvents attribute. Currently, - // only a subset of attributes are supported for filtering. All triggers - // MUST provide a filter for the 'type' attribute. + // only a subset of attributes are supported for filtering. You can + // retrieve a specific provider's supported event types + // (/eventarc/docs/list-providers#describe-provider). All triggers MUST + // provide a filter for the 'type' attribute. Attribute string `json:"attribute,omitempty"` // Operator: Optional. The operator used for matching the events with @@ -1872,16 +1874,11 @@ type Trigger struct { // ServiceAccount: Optional. The IAM service account email associated // with the trigger. The service account represents the identity of the - // trigger. The principal who calls this API must have the - // `iam.serviceAccounts.actAs` permission in the service account. See - // https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common - // for more information. For Cloud Run destinations, this service - // account is used to generate identity tokens when invoking the - // service. See - // https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account - // for information on how to invoke authenticated Cloud Run services. To - // create Audit Log triggers, the service account should also have the - // `roles/eventarc.eventReceiver` IAM role. + // trigger. The `iam.serviceAccounts.actAs` permission must be granted + // on the service account to allow a principal to impersonate the + // service account. For more information, see the Roles and permissions + // (/eventarc/docs/all-roles-permissions) page specific to the trigger + // destination. ServiceAccount string `json:"serviceAccount,omitempty"` // Transport: Optional. To deliver messages, Eventarc might use other diff --git a/firebaseappcheck/v1beta/firebaseappcheck-api.json b/firebaseappcheck/v1beta/firebaseappcheck-api.json index 1b09f4c7bde..9b8bd998231 100644 --- a/firebaseappcheck/v1beta/firebaseappcheck-api.json +++ b/firebaseappcheck/v1beta/firebaseappcheck-api.json @@ -141,7 +141,7 @@ "projects": { "methods": { "verifyAppCheckToken": { - "description": "Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` will contain the value `false`. The given token will then be marked as `already_consumed` for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed.", + "description": "Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).", "flatPath": "v1beta/projects/{projectsId}:verifyAppCheckToken", "httpMethod": "POST", "id": "firebaseappcheck.projects.verifyAppCheckToken", @@ -1503,7 +1503,7 @@ } } }, - "revision": "20230425", + "revision": "20230515", "rootUrl": "https://firebaseappcheck.googleapis.com/", "schemas": { "GoogleFirebaseAppcheckV1betaAppAttestConfig": { @@ -2163,7 +2163,7 @@ "id": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest", "properties": { "appCheckToken": { - "description": "Required. The App Check token to verify.", + "description": "Required. The App Check token to verify. App Check tokens exchanged from the SafetyNet provider are not supported; an HTTP 400 error will be returned.", "type": "string" } }, @@ -2174,7 +2174,7 @@ "id": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse", "properties": { "alreadyConsumed": { - "description": "Whether this token was already consumed. If this is the first time this method has seen the given App Check token, this field will contain the value `false`. The given token will then be marked as `already_consumed` for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response containing this field, regardless whether the token was already consumed.", + "description": "Whether this token was already consumed. If this is the first time this method has seen the given App Check token, this field will be omitted from the response. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response containing this field, regardless whether the token was already consumed.", "type": "boolean" } }, diff --git a/firebaseappcheck/v1beta/firebaseappcheck-gen.go b/firebaseappcheck/v1beta/firebaseappcheck-gen.go index 64eff598797..fb1677c22e0 100644 --- a/firebaseappcheck/v1beta/firebaseappcheck-gen.go +++ b/firebaseappcheck/v1beta/firebaseappcheck-gen.go @@ -1843,7 +1843,9 @@ func (s *GoogleFirebaseAppcheckV1betaUpdateServiceRequest) MarshalJSON() ([]byte // GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest: Request // message for the VerifyAppCheckToken method. type GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest struct { - // AppCheckToken: Required. The App Check token to verify. + // AppCheckToken: Required. The App Check token to verify. App Check + // tokens exchanged from the SafetyNet provider are not supported; an + // HTTP 400 error will be returned. AppCheckToken string `json:"appCheckToken,omitempty"` // ForceSendFields is a list of field names (e.g. "AppCheckToken") to @@ -1874,12 +1876,12 @@ func (s *GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest) MarshalJSON() ( type GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse struct { // AlreadyConsumed: Whether this token was already consumed. If this is // the first time this method has seen the given App Check token, this - // field will contain the value `false`. The given token will then be - // marked as `already_consumed` for all future invocations of this - // method for that token. Note that if the given App Check token is - // invalid, an HTTP 403 error is returned instead of a response - // containing this field, regardless whether the token was already - // consumed. + // field will be omitted from the response. The given token will then be + // marked as `already_consumed` (set to `true`) for all future + // invocations of this method for that token. Note that if the given App + // Check token is invalid, an HTTP 403 error is returned instead of a + // response containing this field, regardless whether the token was + // already consumed. AlreadyConsumed bool `json:"alreadyConsumed,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2095,15 +2097,20 @@ type ProjectsVerifyAppCheckTokenCall struct { // token with an unsupported provider will cause an HTTP 400 error to be // returned. Returns whether this token was already consumed before this // call. If this is the first time this method has seen the given App -// Check token, the field `already_consumed` will contain the value -// `false`. The given token will then be marked as `already_consumed` -// for all future invocations of this method for that token. Note that -// if the given App Check token is invalid, an HTTP 403 error is -// returned instead of a response object, regardless whether the token -// was already consumed. Currently, when evaluating whether an App Check -// token was already consumed, only calls to this exact method are -// counted. Use of the App Check token elsewhere will not mark the token -// as being already consumed. +// Check token, the field `already_consumed` in the response will be +// absent. The given token will then be marked as `already_consumed` +// (set to `true`) for all future invocations of this method for that +// token. Note that if the given App Check token is invalid, an HTTP 403 +// error is returned instead of a response object, regardless whether +// the token was already consumed. Currently, when evaluating whether an +// App Check token was already consumed, only calls to this exact method +// are counted. Use of the App Check token elsewhere will not mark the +// token as being already consumed. The caller must have the +// `firebaseappcheck.appCheckTokens.verify` +// (https://firebase.google.com/docs/projects/iam/permissions#app-check) +// permission to call this method. This permission is part of the +// Firebase App Check Token Verifier role +// (https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check). // // - project: The relative resource name of the project for which the // token was minted, in the format: ``` projects/{project_number} ``` @@ -2212,7 +2219,7 @@ func (c *ProjectsVerifyAppCheckTokenCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` will contain the value `false`. The given token will then be marked as `already_consumed` for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed.", + // "description": "Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).", // "flatPath": "v1beta/projects/{projectsId}:verifyAppCheckToken", // "httpMethod": "POST", // "id": "firebaseappcheck.projects.verifyAppCheckToken", diff --git a/firebasehosting/v1beta1/firebasehosting-api.json b/firebasehosting/v1beta1/firebasehosting-api.json index 3ba8cfae45f..857359fbdd6 100644 --- a/firebasehosting/v1beta1/firebasehosting-api.json +++ b/firebasehosting/v1beta1/firebasehosting-api.json @@ -2107,7 +2107,7 @@ } } }, - "revision": "20230208", + "revision": "20230515", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "ActingUser": { @@ -2243,6 +2243,10 @@ "serviceId": { "description": "Required. User-defined ID of the Cloud Run service.", "type": "string" + }, + "tag": { + "description": "Optional. User-provided TrafficConfig tag to send traffic to. When omitted, traffic is sent to the service-wide URI", + "type": "string" } }, "type": "object" diff --git a/firebasehosting/v1beta1/firebasehosting-gen.go b/firebasehosting/v1beta1/firebasehosting-gen.go index 2aeef45bc9f..d0237afed20 100644 --- a/firebasehosting/v1beta1/firebasehosting-gen.go +++ b/firebasehosting/v1beta1/firebasehosting-gen.go @@ -572,6 +572,10 @@ type CloudRunRewrite struct { // ServiceId: Required. User-defined ID of the Cloud Run service. ServiceId string `json:"serviceId,omitempty"` + // Tag: Optional. User-provided TrafficConfig tag to send traffic to. + // When omitted, traffic is sent to the service-wide URI + Tag string `json:"tag,omitempty"` + // ForceSendFields is a list of field names (e.g. "Region") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 21545736ea6..72f407589a9 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -331,9 +331,184 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/datastore" ] + }, + "restore": { + "description": "Create a new database by restore from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. The long-running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed. Cancelling the returned operation will stop the restore and delete the in-progress database, if the restore is still active.", + "flatPath": "v1/projects/{projectsId}/databases:restore", + "httpMethod": "POST", + "id": "firestore.projects.databases.restore", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project to restore the database in. Format is `projects/{project_id}`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/databases:restore", + "request": { + "$ref": "GoogleFirestoreAdminV1RestoreDatabaseRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] } }, "resources": { + "backupSchedules": { + "methods": { + "create": { + "description": "Creates a backup schedule on a database. At most two backup schedules can be configured on a database, one daily backup schedule with retention up to 7 days and one weekly backup schedule with retention up to 14 weeks.", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules", + "httpMethod": "POST", + "id": "firestore.projects.databases.backupSchedules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent database. Format `projects/{project}/databases/{database}`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupSchedules", + "request": { + "$ref": "GoogleFirestoreAdminV1BackupSchedule" + }, + "response": { + "$ref": "GoogleFirestoreAdminV1BackupSchedule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, + "delete": { + "description": "Deletes a backup schedule.", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + "httpMethod": "DELETE", + "id": "firestore.projects.databases.backupSchedules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, + "get": { + "description": "Gets information about a backup schedule.", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + "httpMethod": "GET", + "id": "firestore.projects.databases.backupSchedules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleFirestoreAdminV1BackupSchedule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, + "list": { + "description": "List backup schedules.", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules", + "httpMethod": "GET", + "id": "firestore.projects.databases.backupSchedules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent database. Format is `projects/{project}/databases/{database}`.", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupSchedules", + "response": { + "$ref": "GoogleFirestoreAdminV1ListBackupSchedulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, + "patch": { + "description": "Updates a backup schedule.", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + "httpMethod": "PATCH", + "id": "firestore.projects.databases.backupSchedules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleFirestoreAdminV1BackupSchedule" + }, + "response": { + "$ref": "GoogleFirestoreAdminV1BackupSchedule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + } + } + }, "collectionGroups": { "resources": { "fields": { @@ -1418,12 +1593,96 @@ "https://www.googleapis.com/auth/datastore" ] } + }, + "resources": { + "backups": { + "methods": { + "delete": { + "description": "Deletes a backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "firestore.projects.locations.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the backup to delete. format is `projects/{project}/locations/{location}/backups/{backup}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, + "get": { + "description": "Gets information about a backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "firestore.projects.locations.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the backup to fetch. Format is `projects/{project}/locations/{location}/backups/{backup}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleFirestoreAdminV1Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, + "list": { + "description": "Lists all the backups.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups", + "httpMethod": "GET", + "id": "firestore.projects.locations.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The location to list backups from. Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list backups from all locations for the given project. This allows listing backups from a single location or from all locations.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "response": { + "$ref": "GoogleFirestoreAdminV1ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + } + } + } } } } } }, - "revision": "20230421", + "revision": "20230508", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -1591,6 +1850,39 @@ }, "type": "object" }, + "BitSequence": { + "description": "A sequence of bits, encoded in a byte array. Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only exception is the last byte, which may store 8 _or fewer_ bits. The `padding` defines the number of bits of the last byte to be ignored as \"padding\". The values of these \"padding\" bits are unspecified and must be ignored. To retrieve the first bit, bit 0, calculate: `(bitmap[0] \u0026 0x01) != 0`. To retrieve the second bit, bit 1, calculate: `(bitmap[0] \u0026 0x02) != 0`. To retrieve the third bit, bit 2, calculate: `(bitmap[0] \u0026 0x04) != 0`. To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] \u0026 0x08) != 0`. To retrieve bit n, calculate: `(bitmap[n / 8] \u0026 (0x01 \u003c\u003c (n % 8))) != 0`. The \"size\" of a `BitSequence` (the number of bits it contains) is calculated by this formula: `(bitmap.length * 8) - padding`.", + "id": "BitSequence", + "properties": { + "bitmap": { + "description": "The bytes that encode the bit sequence. May have a length of zero.", + "format": "byte", + "type": "string" + }, + "padding": { + "description": "The number of bits of the last byte in `bitmap` to ignore as \"padding\". If the length of `bitmap` is zero, then this value must be `0`. Otherwise, this value must be between 0 and 7, inclusive.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BloomFilter": { + "description": "A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). The bloom filter hashes the entries with MD5 and treats the resulting 128-bit hash as 2 distinct 64-bit hash values, interpreted as unsigned integers using 2's complement encoding. These two hash values, named `h1` and `h2`, are then used to compute the `hash_count` hash values using the formula, starting at `i=0`: h(i) = h1 + (i * h2) These resulting values are then taken modulo the number of bits in the bloom filter to get the bits of the bloom filter to test for the given entry.", + "id": "BloomFilter", + "properties": { + "bits": { + "$ref": "BitSequence", + "description": "The bloom filter data." + }, + "hashCount": { + "description": "The number of hashes used by the algorithm.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CollectionSelector": { "description": "A selection of a collection, such as `messages as m1`.", "id": "CollectionSelector", @@ -1870,6 +2162,10 @@ "description": "The target ID to which this filter applies.", "format": "int32", "type": "integer" + }, + "unchangedNames": { + "$ref": "BloomFilter", + "description": "A bloom filter that contains the UTF-8 byte encodings of the resource names of the documents that match target_id, in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}` that have NOT changed since the query results indicated by the resume token or timestamp given in `Target.resume_type`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync." } }, "type": "object" @@ -1992,6 +2288,105 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1Backup": { + "description": "A Backup of a Cloud Firestore Database. The backup contains all documents and index configurations for the given database at specific point in time.", + "id": "GoogleFirestoreAdminV1Backup", + "properties": { + "database": { + "description": "Output only. Name of the Firestore database that the backup is from. Format is `projects/{project}/databases/{database}`.", + "readOnly": true, + "type": "string" + }, + "databaseUid": { + "description": "Output only. The system-generated UUID4 for the Firestore database that the backup is from.", + "readOnly": true, + "type": "string" + }, + "expireTime": { + "description": "Output only. The timestamp at which this backup expires.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The unique resource name of the Backup. Format is `projects/{project}/locations/{location}/backups/{backup}`.", + "readOnly": true, + "type": "string" + }, + "snapshotTime": { + "description": "Output only. The backup contains an externally consistent copy of the database at this time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY", + "NOT_AVAILABLE" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The pending backup is still being created. Operations on the backup will be rejected in this state.", + "The backup is complete and ready to use.", + "The backup is not available at this moment." + ], + "readOnly": true, + "type": "string" + }, + "stats": { + "$ref": "GoogleFirestoreAdminV1Stats", + "description": "Output only. Statistics about the backup. This data only becomes available after the backup is fully materialized to secondary storage. This field will be empty till then.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleFirestoreAdminV1BackupSchedule": { + "description": "A backup schedule for a Cloud Firestore Database. This resource is owned by the database it is backing up, and is deleted along with the database. The actual backups are not though.", + "id": "GoogleFirestoreAdminV1BackupSchedule", + "properties": { + "createTime": { + "description": "Output only. The timestamp at which this backup schedule was created and effective since. No backups will be created for this schedule before this time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dailyRecurrence": { + "$ref": "GoogleFirestoreAdminV1DailyRecurrence", + "description": "For a schedule that runs daily at a specified time." + }, + "name": { + "description": "Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`", + "readOnly": true, + "type": "string" + }, + "retention": { + "description": "At what relative time in the future, compared to the creation time of the backup should the backup be deleted, i.e. keep backups for 7 days.", + "format": "google-duration", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp at which this backup schedule was most recently updated. When a backup schedule is first created, this is the same as create_time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyRecurrence": { + "$ref": "GoogleFirestoreAdminV1WeeklyRecurrence", + "description": "For a schedule that runs weekly on a specific day and time." + } + }, + "type": "object" + }, + "GoogleFirestoreAdminV1DailyRecurrence": { + "description": "Represent a recurring schedule that runs at a specific time every day. The time zone is UTC.", + "id": "GoogleFirestoreAdminV1DailyRecurrence", + "properties": {}, + "type": "object" + }, "GoogleFirestoreAdminV1Database": { "description": "A Cloud Firestore Database. Currently only one database is allowed per cloud project; this database must have a `database_id` of '(default)'.", "id": "GoogleFirestoreAdminV1Database", @@ -2572,6 +2967,41 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1ListBackupSchedulesResponse": { + "description": "The response for FirestoreAdmin.ListBackupSchedules.", + "id": "GoogleFirestoreAdminV1ListBackupSchedulesResponse", + "properties": { + "backupSchedules": { + "description": "List of all backup schedules.", + "items": { + "$ref": "GoogleFirestoreAdminV1BackupSchedule" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleFirestoreAdminV1ListBackupsResponse": { + "description": "The response for FirestoreAdmin.ListBackups.", + "id": "GoogleFirestoreAdminV1ListBackupsResponse", + "properties": { + "backups": { + "description": "List of all backups for the project. Ordered by `location ASC, create_time DESC, name ASC`.", + "items": { + "$ref": "GoogleFirestoreAdminV1Backup" + }, + "type": "array" + }, + "unreachable": { + "description": "List of locations that existing backups were not able to be fetched from. Instead of failing the entire requests when a single location is unreachable, this response returns a partial result set and list of locations unable to be reached here. The request can be retried against a single location to get a concrete error.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1ListDatabasesResponse": { "description": "The list of databases for a project.", "id": "GoogleFirestoreAdminV1ListDatabasesResponse", @@ -2645,6 +3075,46 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1RestoreDatabaseRequest": { + "description": "The request message for FirestoreAdmin.RestoreDatabase.", + "id": "GoogleFirestoreAdminV1RestoreDatabaseRequest", + "properties": { + "backup": { + "description": "Required. Backup to restore from. Must be from the same project as the parent. Format is: `projects/{project_id}/locations/{location}/backups/{backup}`", + "type": "string" + }, + "databaseId": { + "description": "Required. The ID to use for the database, which will become the final component of the database's resource name. This database id must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. \"(default)\" database id is also valid.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleFirestoreAdminV1Stats": { + "description": "Backup specific statistics.", + "id": "GoogleFirestoreAdminV1Stats", + "properties": { + "documentCount": { + "description": "Output only. The total number of documents contained in the backup.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "indexCount": { + "description": "Output only. The total number of index entries contained in the backup.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "sizeBytes": { + "description": "Output only. Summation of the size of all documents and index entries in the backup, measured in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1TtlConfig": { "description": "The TTL (time-to-live) configuration for documents that have this `Field` set. Storing a timestamp value into a TTL-enabled field will be treated as the document's absolute expiration time. Timestamp values in the past indicate that the document is eligible for immediate expiration. Using any other data type or leaving the field absent will disable expiration for the individual document.", "id": "GoogleFirestoreAdminV1TtlConfig", @@ -2696,6 +3166,37 @@ "properties": {}, "type": "object" }, + "GoogleFirestoreAdminV1WeeklyRecurrence": { + "description": "Represents a recurring schedule that runs on a specified day of the week. The time zone is UTC.", + "id": "GoogleFirestoreAdminV1WeeklyRecurrence", + "properties": { + "day": { + "description": "The day of week to run. DAY_OF_WEEK_UNSPECIFIED is not allowed.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", @@ -3300,6 +3801,11 @@ "$ref": "DocumentsTarget", "description": "A target specified by a set of document names." }, + "expectedCount": { + "description": "The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.", + "format": "int32", + "type": "integer" + }, "once": { "description": "If the target should be removed once it is current and consistent.", "type": "boolean" diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index e509a7bfa09..727f83c9b9a 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -165,6 +165,7 @@ type ProjectsService struct { func NewProjectsDatabasesService(s *Service) *ProjectsDatabasesService { rs := &ProjectsDatabasesService{s: s} + rs.BackupSchedules = NewProjectsDatabasesBackupSchedulesService(s) rs.CollectionGroups = NewProjectsDatabasesCollectionGroupsService(s) rs.Documents = NewProjectsDatabasesDocumentsService(s) rs.Operations = NewProjectsDatabasesOperationsService(s) @@ -174,6 +175,8 @@ func NewProjectsDatabasesService(s *Service) *ProjectsDatabasesService { type ProjectsDatabasesService struct { s *Service + BackupSchedules *ProjectsDatabasesBackupSchedulesService + CollectionGroups *ProjectsDatabasesCollectionGroupsService Documents *ProjectsDatabasesDocumentsService @@ -181,6 +184,15 @@ type ProjectsDatabasesService struct { Operations *ProjectsDatabasesOperationsService } +func NewProjectsDatabasesBackupSchedulesService(s *Service) *ProjectsDatabasesBackupSchedulesService { + rs := &ProjectsDatabasesBackupSchedulesService{s: s} + return rs +} + +type ProjectsDatabasesBackupSchedulesService struct { + s *Service +} + func NewProjectsDatabasesCollectionGroupsService(s *Service) *ProjectsDatabasesCollectionGroupsService { rs := &ProjectsDatabasesCollectionGroupsService{s: s} rs.Fields = NewProjectsDatabasesCollectionGroupsFieldsService(s) @@ -234,11 +246,23 @@ type ProjectsDatabasesOperationsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Backups = NewProjectsLocationsBackupsService(s) return rs } type ProjectsLocationsService struct { s *Service + + Backups *ProjectsLocationsBackupsService +} + +func NewProjectsLocationsBackupsService(s *Service) *ProjectsLocationsBackupsService { + rs := &ProjectsLocationsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupsService struct { + s *Service } // Aggregation: Defines an aggregation that produces a single result. @@ -575,6 +599,91 @@ func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BitSequence: A sequence of bits, encoded in a byte array. Each byte +// in the `bitmap` byte array stores 8 bits of the sequence. The only +// exception is the last byte, which may store 8 _or fewer_ bits. The +// `padding` defines the number of bits of the last byte to be ignored +// as "padding". The values of these "padding" bits are unspecified and +// must be ignored. To retrieve the first bit, bit 0, calculate: +// `(bitmap[0] & 0x01) != 0`. To retrieve the second bit, bit 1, +// calculate: `(bitmap[0] & 0x02) != 0`. To retrieve the third bit, bit +// 2, calculate: `(bitmap[0] & 0x04) != 0`. To retrieve the fourth bit, +// bit 3, calculate: `(bitmap[0] & 0x08) != 0`. To retrieve bit n, +// calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. The "size" of +// a `BitSequence` (the number of bits it contains) is calculated by +// this formula: `(bitmap.length * 8) - padding`. +type BitSequence struct { + // Bitmap: The bytes that encode the bit sequence. May have a length of + // zero. + Bitmap string `json:"bitmap,omitempty"` + + // Padding: The number of bits of the last byte in `bitmap` to ignore as + // "padding". If the length of `bitmap` is zero, then this value must be + // `0`. Otherwise, this value must be between 0 and 7, inclusive. + Padding int64 `json:"padding,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bitmap") 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. "Bitmap") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BitSequence) MarshalJSON() ([]byte, error) { + type NoMethod BitSequence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BloomFilter: A bloom filter +// (https://en.wikipedia.org/wiki/Bloom_filter). The bloom filter hashes +// the entries with MD5 and treats the resulting 128-bit hash as 2 +// distinct 64-bit hash values, interpreted as unsigned integers using +// 2's complement encoding. These two hash values, named `h1` and `h2`, +// are then used to compute the `hash_count` hash values using the +// formula, starting at `i=0`: h(i) = h1 + (i * h2) These resulting +// values are then taken modulo the number of bits in the bloom filter +// to get the bits of the bloom filter to test for the given entry. +type BloomFilter struct { + // Bits: The bloom filter data. + Bits *BitSequence `json:"bits,omitempty"` + + // HashCount: The number of hashes used by the algorithm. + HashCount int64 `json:"hashCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bits") 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. "Bits") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BloomFilter) MarshalJSON() ([]byte, error) { + type NoMethod BloomFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CollectionSelector: A selection of a collection, such as `messages as // m1`. type CollectionSelector struct { @@ -1093,6 +1202,21 @@ type ExistenceFilter struct { // TargetId: The target ID to which this filter applies. TargetId int64 `json:"targetId,omitempty"` + // UnchangedNames: A bloom filter that contains the UTF-8 byte encodings + // of the resource names of the documents that match target_id, in the + // form + // `projects/{project_id}/databases/{database_id}/documents/{document_pat + // h}` that have NOT changed since the query results indicated by the + // resume token or timestamp given in `Target.resume_type`. This bloom + // filter may be omitted at the server's discretion, such as if it is + // deemed that the client will not make use of it or if it is too + // computationally expensive to calculate or transmit. Clients must + // gracefully handle this field being absent by falling back to the + // logic used before this field existed; that is, re-add the target + // without a resume token to figure out which documents in the client's + // cache are out of sync. + UnchangedNames *BloomFilter `json:"unchangedNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1346,6 +1470,137 @@ func (s *Filter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1Backup: A Backup of a Cloud Firestore Database. +// The backup contains all documents and index configurations for the +// given database at specific point in time. +type GoogleFirestoreAdminV1Backup struct { + // Database: Output only. Name of the Firestore database that the backup + // is from. Format is `projects/{project}/databases/{database}`. + Database string `json:"database,omitempty"` + + // DatabaseUid: Output only. The system-generated UUID4 for the + // Firestore database that the backup is from. + DatabaseUid string `json:"databaseUid,omitempty"` + + // ExpireTime: Output only. The timestamp at which this backup expires. + ExpireTime string `json:"expireTime,omitempty"` + + // Name: Output only. The unique resource name of the Backup. Format is + // `projects/{project}/locations/{location}/backups/{backup}`. + Name string `json:"name,omitempty"` + + // SnapshotTime: Output only. The backup contains an externally + // consistent copy of the database at this time. + SnapshotTime string `json:"snapshotTime,omitempty"` + + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "CREATING" - The pending backup is still being created. Operations + // on the backup will be rejected in this state. + // "READY" - The backup is complete and ready to use. + // "NOT_AVAILABLE" - The backup is not available at this moment. + State string `json:"state,omitempty"` + + // Stats: Output only. Statistics about the backup. This data only + // becomes available after the backup is fully materialized to secondary + // storage. This field will be empty till then. + Stats *GoogleFirestoreAdminV1Stats `json:"stats,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Database") 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. "Database") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1Backup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1Backup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleFirestoreAdminV1BackupSchedule: A backup schedule for a Cloud +// Firestore Database. This resource is owned by the database it is +// backing up, and is deleted along with the database. The actual +// backups are not though. +type GoogleFirestoreAdminV1BackupSchedule struct { + // CreateTime: Output only. The timestamp at which this backup schedule + // was created and effective since. No backups will be created for this + // schedule before this time. + CreateTime string `json:"createTime,omitempty"` + + // DailyRecurrence: For a schedule that runs daily at a specified time. + DailyRecurrence *GoogleFirestoreAdminV1DailyRecurrence `json:"dailyRecurrence,omitempty"` + + // Name: Output only. The unique backup schedule identifier across all + // locations and databases for the given project. This will be + // auto-assigned. Format is + // `projects/{project}/databases/{database}/backupSchedules/{backup_sched + // ule}` + Name string `json:"name,omitempty"` + + // Retention: At what relative time in the future, compared to the + // creation time of the backup should the backup be deleted, i.e. keep + // backups for 7 days. + Retention string `json:"retention,omitempty"` + + // UpdateTime: Output only. The timestamp at which this backup schedule + // was most recently updated. When a backup schedule is first created, + // this is the same as create_time. + UpdateTime string `json:"updateTime,omitempty"` + + // WeeklyRecurrence: For a schedule that runs weekly on a specific day + // and time. + WeeklyRecurrence *GoogleFirestoreAdminV1WeeklyRecurrence `json:"weeklyRecurrence,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1BackupSchedule) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1BackupSchedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleFirestoreAdminV1DailyRecurrence: Represent a recurring schedule +// that runs at a specific time every day. The time zone is UTC. +type GoogleFirestoreAdminV1DailyRecurrence struct { +} + // GoogleFirestoreAdminV1Database: A Cloud Firestore Database. Currently // only one database is allowed per cloud project; this database must // have a `database_id` of '(default)'. @@ -2151,6 +2406,81 @@ func (s *GoogleFirestoreAdminV1IndexOperationMetadata) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1ListBackupSchedulesResponse: The response for +// FirestoreAdmin.ListBackupSchedules. +type GoogleFirestoreAdminV1ListBackupSchedulesResponse struct { + // BackupSchedules: List of all backup schedules. + BackupSchedules []*GoogleFirestoreAdminV1BackupSchedule `json:"backupSchedules,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BackupSchedules") 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. "BackupSchedules") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1ListBackupSchedulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1ListBackupSchedulesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleFirestoreAdminV1ListBackupsResponse: The response for +// FirestoreAdmin.ListBackups. +type GoogleFirestoreAdminV1ListBackupsResponse struct { + // Backups: List of all backups for the project. Ordered by `location + // ASC, create_time DESC, name ASC`. + Backups []*GoogleFirestoreAdminV1Backup `json:"backups,omitempty"` + + // Unreachable: List of locations that existing backups were not able to + // be fetched from. Instead of failing the entire requests when a single + // location is unreachable, this response returns a partial result set + // and list of locations unable to be reached here. The request can be + // retried against a single location to get a concrete error. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Backups") 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. "Backups") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1ListBackupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1ListDatabasesResponse: The list of databases // for a project. type GoogleFirestoreAdminV1ListDatabasesResponse struct { @@ -2296,6 +2626,83 @@ func (s *GoogleFirestoreAdminV1Progress) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1RestoreDatabaseRequest: The request message for +// FirestoreAdmin.RestoreDatabase. +type GoogleFirestoreAdminV1RestoreDatabaseRequest struct { + // Backup: Required. Backup to restore from. Must be from the same + // project as the parent. Format is: + // `projects/{project_id}/locations/{location}/backups/{backup}` + Backup string `json:"backup,omitempty"` + + // DatabaseId: Required. The ID to use for the database, which will + // become the final component of the database's resource name. This + // database id must not be associated with an existing database. This + // value should be 4-63 characters. Valid characters are /a-z-/ with + // first character a letter and the last a letter or a number. Must not + // be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" + // database id is also valid. + DatabaseId string `json:"databaseId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Backup") 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. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1RestoreDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1RestoreDatabaseRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleFirestoreAdminV1Stats: Backup specific statistics. +type GoogleFirestoreAdminV1Stats struct { + // DocumentCount: Output only. The total number of documents contained + // in the backup. + DocumentCount int64 `json:"documentCount,omitempty,string"` + + // IndexCount: Output only. The total number of index entries contained + // in the backup. + IndexCount int64 `json:"indexCount,omitempty,string"` + + // SizeBytes: Output only. Summation of the size of all documents and + // index entries in the backup, measured in bytes. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DocumentCount") 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. "DocumentCount") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1Stats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1Stats + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1TtlConfig: The TTL (time-to-live) configuration // for documents that have this `Field` set. Storing a timestamp value // into a TTL-enabled field will be treated as the document's absolute @@ -2383,6 +2790,46 @@ func (s *GoogleFirestoreAdminV1TtlConfigDelta) MarshalJSON() ([]byte, error) { type GoogleFirestoreAdminV1UpdateDatabaseMetadata struct { } +// GoogleFirestoreAdminV1WeeklyRecurrence: Represents a recurring +// schedule that runs on a specified day of the week. The time zone is +// UTC. +type GoogleFirestoreAdminV1WeeklyRecurrence struct { + // Day: The day of week to run. DAY_OF_WEEK_UNSPECIFIED is not allowed. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1WeeklyRecurrence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1WeeklyRecurrence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -3543,6 +3990,13 @@ type Target struct { // Documents: A target specified by a set of document names. Documents *DocumentsTarget `json:"documents,omitempty"` + // ExpectedCount: The number of documents that last matched the query at + // the resume token or read time. This value is only relevant when a + // `resume_type` is provided. This value being present and greater than + // zero signals that the client wants `ExistenceFilter.unchanged_names` + // to be included in the response. + ExpectedCount int64 `json:"expectedCount,omitempty"` + // Once: If the target should be removed once it is current and // consistent. Once bool `json:"once,omitempty"` @@ -5089,97 +5543,101 @@ func (c *ProjectsDatabasesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLo } -// method id "firestore.projects.databases.collectionGroups.fields.get": +// method id "firestore.projects.databases.restore": -type ProjectsDatabasesCollectionGroupsFieldsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesRestoreCall struct { + s *Service + parent string + googlefirestoreadminv1restoredatabaserequest *GoogleFirestoreAdminV1RestoreDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the metadata and configuration for a Field. +// Restore: Create a new database by restore from an existing backup. +// The new database must be in the same cloud region or multi-region +// location as the existing backup. This behaves similar to +// FirestoreAdmin.CreateDatabase except instead of creating a new empty +// database, a new database is created with the database type, index +// configuration, and documents from an existing backup. The +// long-running operation can be used to track the progress of the +// restore, with the Operation's metadata field type being the +// RestoreDatabaseMetadata. The response type is the Database if the +// restore was successful. The new database is not readable or writeable +// until the LRO has completed. Cancelling the returned operation will +// stop the restore and delete the in-progress database, if the restore +// is still active. // -// - name: A name of the form -// `projects/{project_id}/databases/{database_id}/collectionGroups/{col -// lection_id}/fields/{field_id}`. -func (r *ProjectsDatabasesCollectionGroupsFieldsService) Get(name string) *ProjectsDatabasesCollectionGroupsFieldsGetCall { - c := &ProjectsDatabasesCollectionGroupsFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The project to restore the database in. Format is +// `projects/{project_id}`. +func (r *ProjectsDatabasesService) Restore(parent string, googlefirestoreadminv1restoredatabaserequest *GoogleFirestoreAdminV1RestoreDatabaseRequest) *ProjectsDatabasesRestoreCall { + c := &ProjectsDatabasesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlefirestoreadminv1restoredatabaserequest = googlefirestoreadminv1restoredatabaserequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsGetCall { +func (c *ProjectsDatabasesRestoreCall) Fields(s ...googleapi.Field) *ProjectsDatabasesRestoreCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsGetCall { +func (c *ProjectsDatabasesRestoreCall) Context(ctx context.Context) *ProjectsDatabasesRestoreCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Header() http.Header { +func (c *ProjectsDatabasesRestoreCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesRestoreCall) doRequest(alt string) (*http.Response, 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.googlefirestoreadminv1restoredatabaserequest) + 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}/databases:restore") 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 "firestore.projects.databases.collectionGroups.fields.get" call. -// Exactly one of *GoogleFirestoreAdminV1Field or error will be non-nil. +// Do executes the "firestore.projects.databases.restore" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleFirestoreAdminV1Field.ServerResponse.Header or (if a response +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Field, error) { +func (c *ProjectsDatabasesRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5198,7 +5656,7 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleFirestoreAdminV1Field{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5210,25 +5668,28 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets the metadata and configuration for a Field.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/fields/{fieldsId}", - // "httpMethod": "GET", - // "id": "firestore.projects.databases.collectionGroups.fields.get", + // "description": "Create a new database by restore from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. The long-running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed. Cancelling the returned operation will stop the restore and delete the in-progress database, if the restore is still active.", + // "flatPath": "v1/projects/{projectsId}/databases:restore", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.restore", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`", + // "parent": { + // "description": "Required. The project to restore the database in. Format is `projects/{project_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/databases:restore", + // "request": { + // "$ref": "GoogleFirestoreAdminV1RestoreDatabaseRequest" + // }, // "response": { - // "$ref": "GoogleFirestoreAdminV1Field" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -5238,108 +5699,74 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Do(opts ...googleapi.Ca } -// method id "firestore.projects.databases.collectionGroups.fields.list": +// method id "firestore.projects.databases.backupSchedules.create": -type ProjectsDatabasesCollectionGroupsFieldsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesBackupSchedulesCreateCall struct { + s *Service + parent string + googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the field configuration and metadata for this database. -// Currently, FirestoreAdmin.ListFields only supports listing fields -// that have been explicitly overridden. To issue this query, call -// FirestoreAdmin.ListFields with the filter set to -// `indexConfig.usesAncestorConfig:false` . +// Create: Creates a backup schedule on a database. At most two backup +// schedules can be configured on a database, one daily backup schedule +// with retention up to 7 days and one weekly backup schedule with +// retention up to 14 weeks. // -// - parent: A parent name of the form -// `projects/{project_id}/databases/{database_id}/collectionGroups/{col -// lection_id}`. -func (r *ProjectsDatabasesCollectionGroupsFieldsService) List(parent string) *ProjectsDatabasesCollectionGroupsFieldsListCall { - c := &ProjectsDatabasesCollectionGroupsFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent database. Format +// `projects/{project}/databases/{database}`. +func (r *ProjectsDatabasesBackupSchedulesService) Create(parent string, googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule) *ProjectsDatabasesBackupSchedulesCreateCall { + c := &ProjectsDatabasesBackupSchedulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The filter to apply to -// list results. Currently, FirestoreAdmin.ListFields only supports -// listing fields that have been explicitly overridden. To issue this -// query, call FirestoreAdmin.ListFields with a filter that includes -// `indexConfig.usesAncestorConfig:false` . -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsFieldsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The number of -// results to return. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsFieldsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// returned from a previous call to FirestoreAdmin.ListFields, that may -// be used to get the next page of results. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsFieldsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googlefirestoreadminv1backupschedule = googlefirestoreadminv1backupschedule return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsListCall { +func (c *ProjectsDatabasesBackupSchedulesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsListCall { +func (c *ProjectsDatabasesBackupSchedulesCreateCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Header() http.Header { +func (c *ProjectsDatabasesBackupSchedulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesBackupSchedulesCreateCall) doRequest(alt string) (*http.Response, 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.googlefirestoreadminv1backupschedule) + 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}/fields") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupSchedules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -5350,16 +5777,15 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.collectionGroups.fields.list" call. -// Exactly one of *GoogleFirestoreAdminV1ListFieldsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleFirestoreAdminV1ListFieldsResponse.ServerResponse.Header or +// Do executes the "firestore.projects.databases.backupSchedules.create" call. +// Exactly one of *GoogleFirestoreAdminV1BackupSchedule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleFirestoreAdminV1BackupSchedule.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListFieldsResponse, error) { +func (c *ProjectsDatabasesBackupSchedulesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5378,7 +5804,7 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleFirestoreAdminV1ListFieldsResponse{ + ret := &GoogleFirestoreAdminV1BackupSchedule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5390,41 +5816,28 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Lists the field configuration and metadata for this database. Currently, FirestoreAdmin.ListFields only supports listing fields that have been explicitly overridden. To issue this query, call FirestoreAdmin.ListFields with the filter set to `indexConfig.usesAncestorConfig:false` .", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/fields", - // "httpMethod": "GET", - // "id": "firestore.projects.databases.collectionGroups.fields.list", + // "description": "Creates a backup schedule on a database. At most two backup schedules can be configured on a database, one daily backup schedule with retention up to 7 days and one weekly backup schedule with retention up to 14 weeks.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.backupSchedules.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "The filter to apply to list results. Currently, FirestoreAdmin.ListFields only supports listing fields that have been explicitly overridden. To issue this query, call FirestoreAdmin.ListFields with a filter that includes `indexConfig.usesAncestorConfig:false` .", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, returned from a previous call to FirestoreAdmin.ListFields, that may be used to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`", + // "description": "Required. The parent database. Format `projects/{project}/databases/{database}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/fields", + // "path": "v1/{+parent}/backupSchedules", + // "request": { + // "$ref": "GoogleFirestoreAdminV1BackupSchedule" + // }, // "response": { - // "$ref": "GoogleFirestoreAdminV1ListFieldsResponse" + // "$ref": "GoogleFirestoreAdminV1BackupSchedule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -5434,91 +5847,31 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Do(opts ...googleapi.C } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListFieldsResponse) 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 "firestore.projects.databases.collectionGroups.fields.patch": +// method id "firestore.projects.databases.backupSchedules.delete": -type ProjectsDatabasesCollectionGroupsFieldsPatchCall struct { - s *Service - name string - googlefirestoreadminv1field *GoogleFirestoreAdminV1Field - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesBackupSchedulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a field configuration. Currently, field updates apply -// only to single field index configuration. However, calls to -// FirestoreAdmin.UpdateField should provide a field mask to avoid -// changing any configuration that the caller isn't aware of. The field -// mask should be specified as: `{ paths: "index_config" }`. This call -// returns a google.longrunning.Operation which may be used to track the -// status of the field update. The metadata for the operation will be -// the type FieldOperationMetadata. To configure the default field -// settings for the database, use the special `Field` with resource -// name: -// `projects/{project_id}/databases/{database_id}/collectionGroups/__defa -// ult__/fields/*`. +// Delete: Deletes a backup schedule. // -// - name: A field name of the form -// `projects/{project_id}/databases/{database_id}/collectionGroups/{col -// lection_id}/fields/{field_path}` A field path may be a simple field -// name, e.g. `address` or a path to fields within map_value , e.g. -// `address.city`, or a special field path. The only valid special -// field is `*`, which represents any field. Field paths may be quoted -// using ` (backtick). The only character that needs to be escaped -// within a quoted field path is the backtick character itself, -// escaped using a backslash. Special characters in field paths that -// must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well -// as any ascii symbolic characters. Examples: (Note: Comments here -// are written in markdown syntax, so there is an additional layer of -// backticks to represent a code block) `\`address.city\“ represents -// a field named `address.city`, not the map key `city` in the field -// `address`. `\`*\“ represents a field named `*`, not any field. A -// special `Field` contains the default indexing settings for all -// fields. This field's resource name is: -// `projects/{project_id}/databases/{database_id}/collectionGroups/__de -// fault__/fields/*` Indexes defined on this `Field` will be applied -// to all fields which do not have their own `Field` index -// configuration. -func (r *ProjectsDatabasesCollectionGroupsFieldsService) Patch(name string, googlefirestoreadminv1field *GoogleFirestoreAdminV1Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { - c := &ProjectsDatabasesCollectionGroupsFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of backup schedule. Format +// `projects/{project}/databases/{database}/backupSchedules/{backup_sch +// edule}`. +func (r *ProjectsDatabasesBackupSchedulesService) Delete(name string) *ProjectsDatabasesBackupSchedulesDeleteCall { + c := &ProjectsDatabasesBackupSchedulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlefirestoreadminv1field = googlefirestoreadminv1field - return c -} - -// UpdateMask sets the optional parameter "updateMask": A mask, relative -// to the field. If specified, only configuration specified by this -// field_mask will be updated in the field. -func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { - 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 *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { +func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5526,21 +5879,21 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) 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 *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { +func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Header() http.Header { +func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesBackupSchedulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5548,16 +5901,11 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1field) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -5568,14 +5916,14 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.collectionGroups.fields.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 *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "firestore.projects.databases.backupSchedules.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsDatabasesBackupSchedulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5594,7 +5942,7 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5606,34 +5954,25 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Updates a field configuration. Currently, field updates apply only to single field index configuration. However, calls to FirestoreAdmin.UpdateField should provide a field mask to avoid changing any configuration that the caller isn't aware of. The field mask should be specified as: `{ paths: \"index_config\" }`. This call returns a google.longrunning.Operation which may be used to track the status of the field update. The metadata for the operation will be the type FieldOperationMetadata. To configure the default field settings for the database, use the special `Field` with resource name: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/fields/{fieldsId}", - // "httpMethod": "PATCH", - // "id": "firestore.projects.databases.collectionGroups.fields.patch", + // "description": "Deletes a backup schedule.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + // "httpMethod": "DELETE", + // "id": "firestore.projects.databases.backupSchedules.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A field name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\\`address.city\\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\\`*\\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.", + // "description": "Required. The name of backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "A mask, relative to the field. If specified, only configuration specified by this field_mask will be updated in the field.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "GoogleFirestoreAdminV1Field" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -5643,93 +5982,98 @@ func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Do(opts ...googleapi. } -// method id "firestore.projects.databases.collectionGroups.indexes.create": +// method id "firestore.projects.databases.backupSchedules.get": -type ProjectsDatabasesCollectionGroupsIndexesCreateCall struct { - s *Service - parent string - googlefirestoreadminv1index *GoogleFirestoreAdminV1Index - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesBackupSchedulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a composite index. This returns a -// google.longrunning.Operation which may be used to track the status of -// the creation. The metadata for the operation will be the type -// IndexOperationMetadata. +// Get: Gets information about a backup schedule. // -// - parent: A parent name of the form -// `projects/{project_id}/databases/{database_id}/collectionGroups/{col -// lection_id}`. -func (r *ProjectsDatabasesCollectionGroupsIndexesService) Create(parent string, googlefirestoreadminv1index *GoogleFirestoreAdminV1Index) *ProjectsDatabasesCollectionGroupsIndexesCreateCall { - c := &ProjectsDatabasesCollectionGroupsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlefirestoreadminv1index = googlefirestoreadminv1index +// - name: The name of the backup schedule. Format +// `projects/{project}/databases/{database}/backupSchedules/{backup_sch +// edule}`. +func (r *ProjectsDatabasesBackupSchedulesService) Get(name string) *ProjectsDatabasesBackupSchedulesGetCall { + c := &ProjectsDatabasesBackupSchedulesGetCall{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 *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesCreateCall { +func (c *ProjectsDatabasesBackupSchedulesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesBackupSchedulesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesBackupSchedulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesCreateCall { +func (c *ProjectsDatabasesBackupSchedulesGetCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Header() http.Header { +func (c *ProjectsDatabasesBackupSchedulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesBackupSchedulesGetCall) doRequest(alt string) (*http.Response, 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.googlefirestoreadminv1index) - 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}/indexes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.collectionGroups.indexes.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 *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "firestore.projects.databases.backupSchedules.get" call. +// Exactly one of *GoogleFirestoreAdminV1BackupSchedule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleFirestoreAdminV1BackupSchedule.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsDatabasesBackupSchedulesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5748,7 +6092,7 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleFirestoreAdminV1BackupSchedule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5760,28 +6104,25 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a composite index. This returns a google.longrunning.Operation which may be used to track the status of the creation. The metadata for the operation will be the type IndexOperationMetadata.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.collectionGroups.indexes.create", + // "description": "Gets information about a backup schedule.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.backupSchedules.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`", + // "name": { + // "description": "Required. The name of the backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/indexes", - // "request": { - // "$ref": "GoogleFirestoreAdminV1Index" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleFirestoreAdminV1BackupSchedule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -5791,83 +6132,98 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Do(opts ...googleap } -// method id "firestore.projects.databases.collectionGroups.indexes.delete": +// method id "firestore.projects.databases.backupSchedules.list": -type ProjectsDatabasesCollectionGroupsIndexesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesBackupSchedulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a composite index. +// List: List backup schedules. // -// - name: A name of the form -// `projects/{project_id}/databases/{database_id}/collectionGroups/{col -// lection_id}/indexes/{index_id}`. -func (r *ProjectsDatabasesCollectionGroupsIndexesService) Delete(name string) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall { - c := &ProjectsDatabasesCollectionGroupsIndexesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent database. Format is +// `projects/{project}/databases/{database}`. +func (r *ProjectsDatabasesBackupSchedulesService) List(parent string) *ProjectsDatabasesBackupSchedulesListCall { + c := &ProjectsDatabasesBackupSchedulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall { +func (c *ProjectsDatabasesBackupSchedulesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesBackupSchedulesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesBackupSchedulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall { +func (c *ProjectsDatabasesBackupSchedulesListCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Header() http.Header { +func (c *ProjectsDatabasesBackupSchedulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesBackupSchedulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupSchedules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.collectionGroups.indexes.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "firestore.projects.databases.backupSchedules.list" call. +// Exactly one of *GoogleFirestoreAdminV1ListBackupSchedulesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleFirestoreAdminV1ListBackupSchedulesResponse.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 *ProjectsDatabasesBackupSchedulesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListBackupSchedulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5886,7 +6242,7 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleFirestoreAdminV1ListBackupSchedulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5898,25 +6254,25 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a composite index.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes/{indexesId}", - // "httpMethod": "DELETE", - // "id": "firestore.projects.databases.collectionGroups.indexes.delete", + // "description": "List backup schedules.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.backupSchedules.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`", + // "parent": { + // "description": "Required. The parent database. Format is `projects/{project}/databases/{database}`.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/backupSchedules", // "response": { - // "$ref": "Empty" + // "$ref": "GoogleFirestoreAdminV1ListBackupSchedulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -5926,97 +6282,100 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Do(opts ...googleap } -// method id "firestore.projects.databases.collectionGroups.indexes.get": +// method id "firestore.projects.databases.backupSchedules.patch": -type ProjectsDatabasesCollectionGroupsIndexesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesBackupSchedulesPatchCall struct { + s *Service + nameid string + googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a composite index. +// Patch: Updates a backup schedule. // -// - name: A name of the form -// `projects/{project_id}/databases/{database_id}/collectionGroups/{col -// lection_id}/indexes/{index_id}`. -func (r *ProjectsDatabasesCollectionGroupsIndexesService) Get(name string) *ProjectsDatabasesCollectionGroupsIndexesGetCall { - c := &ProjectsDatabasesCollectionGroupsIndexesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - name: Output only. The unique backup schedule identifier across all +// locations and databases for the given project. This will be +// auto-assigned. Format is +// `projects/{project}/databases/{database}/backupSchedules/{backup_sch +// edule}`. +func (r *ProjectsDatabasesBackupSchedulesService) Patch(nameid string, googlefirestoreadminv1backupschedule *GoogleFirestoreAdminV1BackupSchedule) *ProjectsDatabasesBackupSchedulesPatchCall { + c := &ProjectsDatabasesBackupSchedulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.googlefirestoreadminv1backupschedule = googlefirestoreadminv1backupschedule + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *ProjectsDatabasesBackupSchedulesPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesBackupSchedulesPatchCall { + 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 *ProjectsDatabasesCollectionGroupsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesGetCall { +func (c *ProjectsDatabasesBackupSchedulesPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBackupSchedulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesGetCall { +func (c *ProjectsDatabasesBackupSchedulesPatchCall) Context(ctx context.Context) *ProjectsDatabasesBackupSchedulesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Header() http.Header { +func (c *ProjectsDatabasesBackupSchedulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesBackupSchedulesPatchCall) doRequest(alt string) (*http.Response, 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.googlefirestoreadminv1backupschedule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.collectionGroups.indexes.get" call. -// Exactly one of *GoogleFirestoreAdminV1Index or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleFirestoreAdminV1Index.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Index, error) { +// Do executes the "firestore.projects.databases.backupSchedules.patch" call. +// Exactly one of *GoogleFirestoreAdminV1BackupSchedule or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleFirestoreAdminV1BackupSchedule.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsDatabasesBackupSchedulesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1BackupSchedule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6035,7 +6394,7 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleFirestoreAdminV1Index{ + ret := &GoogleFirestoreAdminV1BackupSchedule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6047,25 +6406,34 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets a composite index.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes/{indexesId}", - // "httpMethod": "GET", - // "id": "firestore.projects.databases.collectionGroups.indexes.get", + // "description": "Updates a backup schedule.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + // "httpMethod": "PATCH", + // "id": "firestore.projects.databases.backupSchedules.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`", + // "description": "Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleFirestoreAdminV1BackupSchedule" + // }, // "response": { - // "$ref": "GoogleFirestoreAdminV1Index" + // "$ref": "GoogleFirestoreAdminV1BackupSchedule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -6075,54 +6443,32 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Do(opts ...googleapi.C } -// method id "firestore.projects.databases.collectionGroups.indexes.list": +// method id "firestore.projects.databases.collectionGroups.fields.get": -type ProjectsDatabasesCollectionGroupsIndexesListCall struct { +type ProjectsDatabasesCollectionGroupsFieldsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists composite indexes. +// Get: Gets the metadata and configuration for a Field. // -// - parent: A parent name of the form +// - name: A name of the form // `projects/{project_id}/databases/{database_id}/collectionGroups/{col -// lection_id}`. -func (r *ProjectsDatabasesCollectionGroupsIndexesService) List(parent string) *ProjectsDatabasesCollectionGroupsIndexesListCall { - c := &ProjectsDatabasesCollectionGroupsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The filter to apply to -// list results. -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsIndexesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The number of -// results to return. -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsIndexesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// returned from a previous call to FirestoreAdmin.ListIndexes, that may -// be used to get the next page of results. -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsIndexesListCall { - c.urlParams_.Set("pageToken", pageToken) +// lection_id}/fields/{field_id}`. +func (r *ProjectsDatabasesCollectionGroupsFieldsService) Get(name string) *ProjectsDatabasesCollectionGroupsFieldsGetCall { + c := &ProjectsDatabasesCollectionGroupsFieldsGetCall{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 *ProjectsDatabasesCollectionGroupsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesListCall { +func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6132,7 +6478,7 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesListCall { +func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -6140,21 +6486,21 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesListCall { +func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Header() http.Header { +func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6167,7 +6513,7 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) 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}/indexes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6175,21 +6521,19 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) 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 "firestore.projects.databases.collectionGroups.indexes.list" call. -// Exactly one of *GoogleFirestoreAdminV1ListIndexesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleFirestoreAdminV1ListIndexesResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListIndexesResponse, error) { +// Do executes the "firestore.projects.databases.collectionGroups.fields.get" call. +// Exactly one of *GoogleFirestoreAdminV1Field or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleFirestoreAdminV1Field.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesCollectionGroupsFieldsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Field, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6208,7 +6552,7 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleFirestoreAdminV1ListIndexesResponse{ + ret := &GoogleFirestoreAdminV1Field{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6220,41 +6564,25 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists composite indexes.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes", + // "description": "Gets the metadata and configuration for a Field.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/fields/{fieldsId}", // "httpMethod": "GET", - // "id": "firestore.projects.databases.collectionGroups.indexes.list", + // "id": "firestore.projects.databases.collectionGroups.fields.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "The filter to apply to list results.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, returned from a previous call to FirestoreAdmin.ListIndexes, that may be used to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`", + // "name": { + // "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/indexes", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleFirestoreAdminV1ListIndexesResponse" + // "$ref": "GoogleFirestoreAdminV1Field" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -6264,112 +6592,128 @@ func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Do(opts ...googleapi. } -// 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 *ProjectsDatabasesCollectionGroupsIndexesListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListIndexesResponse) 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 "firestore.projects.databases.collectionGroups.fields.list": + +type ProjectsDatabasesCollectionGroupsFieldsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "firestore.projects.databases.documents.batchGet": +// List: Lists the field configuration and metadata for this database. +// Currently, FirestoreAdmin.ListFields only supports listing fields +// that have been explicitly overridden. To issue this query, call +// FirestoreAdmin.ListFields with the filter set to +// `indexConfig.usesAncestorConfig:false` . +// +// - parent: A parent name of the form +// `projects/{project_id}/databases/{database_id}/collectionGroups/{col +// lection_id}`. +func (r *ProjectsDatabasesCollectionGroupsFieldsService) List(parent string) *ProjectsDatabasesCollectionGroupsFieldsListCall { + c := &ProjectsDatabasesCollectionGroupsFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -type ProjectsDatabasesDocumentsBatchGetCall struct { - s *Service - database string - batchgetdocumentsrequest *BatchGetDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Filter sets the optional parameter "filter": The filter to apply to +// list results. Currently, FirestoreAdmin.ListFields only supports +// listing fields that have been explicitly overridden. To issue this +// query, call FirestoreAdmin.ListFields with a filter that includes +// `indexConfig.usesAncestorConfig:false` . +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsFieldsListCall { + c.urlParams_.Set("filter", filter) + return c } -// BatchGet: Gets multiple documents. Documents returned by this method -// are not guaranteed to be returned in the same order that they were -// requested. -// -// - database: The database name. In the format: -// `projects/{project_id}/databases/{database_id}`. -func (r *ProjectsDatabasesDocumentsService) BatchGet(database string, batchgetdocumentsrequest *BatchGetDocumentsRequest) *ProjectsDatabasesDocumentsBatchGetCall { - c := &ProjectsDatabasesDocumentsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.database = database - c.batchgetdocumentsrequest = batchgetdocumentsrequest +// PageSize sets the optional parameter "pageSize": The number of +// results to return. +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsFieldsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// returned from a previous call to FirestoreAdmin.ListFields, that may +// be used to get the next page of results. +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsFieldsListCall { + 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 *ProjectsDatabasesDocumentsBatchGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchGetCall { +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsFieldsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsBatchGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchGetCall { +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsBatchGetCall) Header() http.Header { +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsBatchGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) doRequest(alt string) (*http.Response, 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.batchgetdocumentsrequest) - 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/{+database}/documents:batchGet") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/fields") 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{ - "database": c.database, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.batchGet" call. -// Exactly one of *BatchGetDocumentsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BatchGetDocumentsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetDocumentsResponse, error) { +// Do executes the "firestore.projects.databases.collectionGroups.fields.list" call. +// Exactly one of *GoogleFirestoreAdminV1ListFieldsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleFirestoreAdminV1ListFieldsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsDatabasesCollectionGroupsFieldsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListFieldsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6388,7 +6732,7 @@ func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BatchGetDocumentsResponse{ + ret := &GoogleFirestoreAdminV1ListFieldsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6400,28 +6744,41 @@ func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:batchGet", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.batchGet", + // "description": "Lists the field configuration and metadata for this database. Currently, FirestoreAdmin.ListFields only supports listing fields that have been explicitly overridden. To issue this query, call FirestoreAdmin.ListFields with the filter set to `indexConfig.usesAncestorConfig:false` .", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/fields", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.collectionGroups.fields.list", // "parameterOrder": [ - // "database" + // "parent" // ], // "parameters": { - // "database": { - // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+database}/documents:batchGet", - // "request": { - // "$ref": "BatchGetDocumentsRequest" + // "filter": { + // "description": "The filter to apply to list results. Currently, FirestoreAdmin.ListFields only supports listing fields that have been explicitly overridden. To issue this query, call FirestoreAdmin.ListFields with a filter that includes `indexConfig.usesAncestorConfig:false` .", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, returned from a previous call to FirestoreAdmin.ListFields, that may be used to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+$", + // "required": true, + // "type": "string" + // } // }, + // "path": "v1/{+parent}/fields", // "response": { - // "$ref": "BatchGetDocumentsResponse" + // "$ref": "GoogleFirestoreAdminV1ListFieldsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -6431,37 +6788,91 @@ func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption } -// method id "firestore.projects.databases.documents.batchWrite": +// 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 *ProjectsDatabasesCollectionGroupsFieldsListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListFieldsResponse) 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 ProjectsDatabasesDocumentsBatchWriteCall struct { - s *Service - database string - batchwriterequest *BatchWriteRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "firestore.projects.databases.collectionGroups.fields.patch": + +type ProjectsDatabasesCollectionGroupsFieldsPatchCall struct { + s *Service + name string + googlefirestoreadminv1field *GoogleFirestoreAdminV1Field + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchWrite: Applies a batch of write operations. The BatchWrite -// method does not apply the write operations atomically and can apply -// them out of order. Method does not allow more than one write per -// document. Each write succeeds or fails independently. See the -// BatchWriteResponse for the success status of each write. If you -// require an atomically applied set of writes, use Commit instead. +// Patch: Updates a field configuration. Currently, field updates apply +// only to single field index configuration. However, calls to +// FirestoreAdmin.UpdateField should provide a field mask to avoid +// changing any configuration that the caller isn't aware of. The field +// mask should be specified as: `{ paths: "index_config" }`. This call +// returns a google.longrunning.Operation which may be used to track the +// status of the field update. The metadata for the operation will be +// the type FieldOperationMetadata. To configure the default field +// settings for the database, use the special `Field` with resource +// name: +// `projects/{project_id}/databases/{database_id}/collectionGroups/__defa +// ult__/fields/*`. // -// - database: The database name. In the format: -// `projects/{project_id}/databases/{database_id}`. -func (r *ProjectsDatabasesDocumentsService) BatchWrite(database string, batchwriterequest *BatchWriteRequest) *ProjectsDatabasesDocumentsBatchWriteCall { - c := &ProjectsDatabasesDocumentsBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.database = database - c.batchwriterequest = batchwriterequest +// - name: A field name of the form +// `projects/{project_id}/databases/{database_id}/collectionGroups/{col +// lection_id}/fields/{field_path}` A field path may be a simple field +// name, e.g. `address` or a path to fields within map_value , e.g. +// `address.city`, or a special field path. The only valid special +// field is `*`, which represents any field. Field paths may be quoted +// using ` (backtick). The only character that needs to be escaped +// within a quoted field path is the backtick character itself, +// escaped using a backslash. Special characters in field paths that +// must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well +// as any ascii symbolic characters. Examples: (Note: Comments here +// are written in markdown syntax, so there is an additional layer of +// backticks to represent a code block) `\`address.city\“ represents +// a field named `address.city`, not the map key `city` in the field +// `address`. `\`*\“ represents a field named `*`, not any field. A +// special `Field` contains the default indexing settings for all +// fields. This field's resource name is: +// `projects/{project_id}/databases/{database_id}/collectionGroups/__de +// fault__/fields/*` Indexes defined on this `Field` will be applied +// to all fields which do not have their own `Field` index +// configuration. +func (r *ProjectsDatabasesCollectionGroupsFieldsService) Patch(name string, googlefirestoreadminv1field *GoogleFirestoreAdminV1Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { + c := &ProjectsDatabasesCollectionGroupsFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlefirestoreadminv1field = googlefirestoreadminv1field + return c +} + +// UpdateMask sets the optional parameter "updateMask": A mask, relative +// to the field. If specified, only configuration specified by this +// field_mask will be updated in the field. +func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) UpdateMask(updateMask string) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { + 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 *ProjectsDatabasesDocumentsBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchWriteCall { +func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6469,21 +6880,21 @@ func (c *ProjectsDatabasesDocumentsBatchWriteCall) 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 *ProjectsDatabasesDocumentsBatchWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchWriteCall { +func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsFieldsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsBatchWriteCall) Header() http.Header { +func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsBatchWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6491,34 +6902,34 @@ func (c *ProjectsDatabasesDocumentsBatchWriteCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchwriterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1field) 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/{+database}/documents:batchWrite") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "database": c.database, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.batchWrite" call. -// Exactly one of *BatchWriteResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BatchWriteResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "firestore.projects.databases.collectionGroups.fields.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 *ProjectsDatabasesDocumentsBatchWriteCall) Do(opts ...googleapi.CallOption) (*BatchWriteResponse, error) { +func (c *ProjectsDatabasesCollectionGroupsFieldsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6537,7 +6948,7 @@ func (c *ProjectsDatabasesDocumentsBatchWriteCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BatchWriteResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6549,28 +6960,34 @@ func (c *ProjectsDatabasesDocumentsBatchWriteCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the BatchWriteResponse for the success status of each write. If you require an atomically applied set of writes, use Commit instead.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:batchWrite", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.batchWrite", + // "description": "Updates a field configuration. Currently, field updates apply only to single field index configuration. However, calls to FirestoreAdmin.UpdateField should provide a field mask to avoid changing any configuration that the caller isn't aware of. The field mask should be specified as: `{ paths: \"index_config\" }`. This call returns a google.longrunning.Operation which may be used to track the status of the field update. The metadata for the operation will be the type FieldOperationMetadata. To configure the default field settings for the database, use the special `Field` with resource name: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/fields/{fieldsId}", + // "httpMethod": "PATCH", + // "id": "firestore.projects.databases.collectionGroups.fields.patch", // "parameterOrder": [ - // "database" + // "name" // ], // "parameters": { - // "database": { - // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "name": { + // "description": "Required. A field name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\\`address.city\\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\\`*\\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "A mask, relative to the field. If specified, only configuration specified by this field_mask will be updated in the field.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+database}/documents:batchWrite", + // "path": "v1/{+name}", // "request": { - // "$ref": "BatchWriteRequest" + // "$ref": "GoogleFirestoreAdminV1Field" // }, // "response": { - // "$ref": "BatchWriteResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -6580,32 +6997,36 @@ func (c *ProjectsDatabasesDocumentsBatchWriteCall) Do(opts ...googleapi.CallOpti } -// method id "firestore.projects.databases.documents.beginTransaction": +// method id "firestore.projects.databases.collectionGroups.indexes.create": -type ProjectsDatabasesDocumentsBeginTransactionCall struct { - s *Service - database string - begintransactionrequest *BeginTransactionRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesCollectionGroupsIndexesCreateCall struct { + s *Service + parent string + googlefirestoreadminv1index *GoogleFirestoreAdminV1Index + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BeginTransaction: Starts a new transaction. +// Create: Creates a composite index. This returns a +// google.longrunning.Operation which may be used to track the status of +// the creation. The metadata for the operation will be the type +// IndexOperationMetadata. // -// - database: The database name. In the format: -// `projects/{project_id}/databases/{database_id}`. -func (r *ProjectsDatabasesDocumentsService) BeginTransaction(database string, begintransactionrequest *BeginTransactionRequest) *ProjectsDatabasesDocumentsBeginTransactionCall { - c := &ProjectsDatabasesDocumentsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.database = database - c.begintransactionrequest = begintransactionrequest +// - parent: A parent name of the form +// `projects/{project_id}/databases/{database_id}/collectionGroups/{col +// lection_id}`. +func (r *ProjectsDatabasesCollectionGroupsIndexesService) Create(parent string, googlefirestoreadminv1index *GoogleFirestoreAdminV1Index) *ProjectsDatabasesCollectionGroupsIndexesCreateCall { + c := &ProjectsDatabasesCollectionGroupsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlefirestoreadminv1index = googlefirestoreadminv1index return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBeginTransactionCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6613,21 +7034,21 @@ func (c *ProjectsDatabasesDocumentsBeginTransactionCall) 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 *ProjectsDatabasesDocumentsBeginTransactionCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBeginTransactionCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Header() http.Header { +func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsBeginTransactionCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6635,14 +7056,14 @@ func (c *ProjectsDatabasesDocumentsBeginTransactionCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1index) 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/{+database}/documents:beginTransaction") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6650,19 +7071,19 @@ func (c *ProjectsDatabasesDocumentsBeginTransactionCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "database": c.database, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.beginTransaction" call. -// Exactly one of *BeginTransactionResponse or error will be non-nil. +// Do executes the "firestore.projects.databases.collectionGroups.indexes.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 -// *BeginTransactionResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) { +func (c *ProjectsDatabasesCollectionGroupsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6681,7 +7102,7 @@ func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BeginTransactionResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6693,28 +7114,28 @@ func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Starts a new transaction.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:beginTransaction", + // "description": "Creates a composite index. This returns a google.longrunning.Operation which may be used to track the status of the creation. The metadata for the operation will be the type IndexOperationMetadata.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes", // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.beginTransaction", + // "id": "firestore.projects.databases.collectionGroups.indexes.create", // "parameterOrder": [ - // "database" + // "parent" // ], // "parameters": { - // "database": { - // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "parent": { + // "description": "Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+database}/documents:beginTransaction", + // "path": "v1/{+parent}/indexes", // "request": { - // "$ref": "BeginTransactionRequest" + // "$ref": "GoogleFirestoreAdminV1Index" // }, // "response": { - // "$ref": "BeginTransactionResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -6724,32 +7145,31 @@ func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.Ca } -// method id "firestore.projects.databases.documents.commit": +// method id "firestore.projects.databases.collectionGroups.indexes.delete": -type ProjectsDatabasesDocumentsCommitCall struct { - s *Service - database string - commitrequest *CommitRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesCollectionGroupsIndexesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Commit: Commits a transaction, while optionally updating documents. +// Delete: Deletes a composite index. // -// - database: The database name. In the format: -// `projects/{project_id}/databases/{database_id}`. -func (r *ProjectsDatabasesDocumentsService) Commit(database string, commitrequest *CommitRequest) *ProjectsDatabasesDocumentsCommitCall { - c := &ProjectsDatabasesDocumentsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.database = database - c.commitrequest = commitrequest +// - name: A name of the form +// `projects/{project_id}/databases/{database_id}/collectionGroups/{col +// lection_id}/indexes/{index_id}`. +func (r *ProjectsDatabasesCollectionGroupsIndexesService) Delete(name string) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall { + c := &ProjectsDatabasesCollectionGroupsIndexesDeleteCall{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 *ProjectsDatabasesDocumentsCommitCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCommitCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6757,21 +7177,21 @@ func (c *ProjectsDatabasesDocumentsCommitCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsCommitCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCommitCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsCommitCall) Header() http.Header { +func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsCommitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6779,34 +7199,29 @@ func (c *ProjectsDatabasesDocumentsCommitCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest) - 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/{+database}/documents:commit") + 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{ - "database": c.database, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.commit" call. -// Exactly one of *CommitResponse or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *CommitResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) { +// Do executes the "firestore.projects.databases.collectionGroups.indexes.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsDatabasesCollectionGroupsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6825,7 +7240,7 @@ func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CommitResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6837,28 +7252,25 @@ func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Commits a transaction, while optionally updating documents.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:commit", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.commit", + // "description": "Deletes a composite index.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes/{indexesId}", + // "httpMethod": "DELETE", + // "id": "firestore.projects.databases.collectionGroups.indexes.delete", // "parameterOrder": [ - // "database" + // "name" // ], // "parameters": { - // "database": { - // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "name": { + // "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+database}/documents:commit", - // "request": { - // "$ref": "CommitRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "CommitResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -6868,112 +7280,97 @@ func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) } -// method id "firestore.projects.databases.documents.createDocument": +// method id "firestore.projects.databases.collectionGroups.indexes.get": -type ProjectsDatabasesDocumentsCreateDocumentCall struct { +type ProjectsDatabasesCollectionGroupsIndexesGetCall struct { s *Service - parent string - collectionId string - document *Document + name string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CreateDocument: Creates a new document. +// Get: Gets a composite index. // -// - collectionId: The collection ID, relative to `parent`, to list. For -// example: `chatrooms`. -// - parent: The parent resource. For example: -// `projects/{project_id}/databases/{database_id}/documents` or -// `projects/{project_id}/databases/{database_id}/documents/chatrooms/{ -// chatroom_id}`. -func (r *ProjectsDatabasesDocumentsService) CreateDocument(parent string, collectionId string, document *Document) *ProjectsDatabasesDocumentsCreateDocumentCall { - c := &ProjectsDatabasesDocumentsCreateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.collectionId = collectionId - c.document = document - return c -} - -// DocumentId sets the optional parameter "documentId": The -// client-assigned document ID to use for this document. If not -// specified, an ID will be assigned by the service. -func (c *ProjectsDatabasesDocumentsCreateDocumentCall) DocumentId(documentId string) *ProjectsDatabasesDocumentsCreateDocumentCall { - c.urlParams_.Set("documentId", documentId) - return c -} - -// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The -// list of field paths in the mask. See Document.fields for a field path -// syntax reference. -func (c *ProjectsDatabasesDocumentsCreateDocumentCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsCreateDocumentCall { - c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) +// - name: A name of the form +// `projects/{project_id}/databases/{database_id}/collectionGroups/{col +// lection_id}/indexes/{index_id}`. +func (r *ProjectsDatabasesCollectionGroupsIndexesService) Get(name string) *ProjectsDatabasesCollectionGroupsIndexesGetCall { + c := &ProjectsDatabasesCollectionGroupsIndexesGetCall{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 *ProjectsDatabasesDocumentsCreateDocumentCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCreateDocumentCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCreateDocumentCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Header() http.Header { +func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsCreateDocumentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) doRequest(alt string) (*http.Response, 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.document) - 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}/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - "collectionId": c.collectionId, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.createDocument" call. -// Exactly one of *Document or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Document.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.CallOption) (*Document, error) { +// Do executes the "firestore.projects.databases.collectionGroups.indexes.get" call. +// Exactly one of *GoogleFirestoreAdminV1Index or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleFirestoreAdminV1Index.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesCollectionGroupsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Index, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6992,7 +7389,7 @@ func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Document{ + ret := &GoogleFirestoreAdminV1Index{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7004,46 +7401,25 @@ func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a new document.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{collectionId}", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.createDocument", + // "description": "Gets a composite index.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes/{indexesId}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.collectionGroups.indexes.get", // "parameterOrder": [ - // "parent", - // "collectionId" + // "name" // ], // "parameters": { - // "collectionId": { - // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "documentId": { - // "description": "The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service.", - // "location": "query", - // "type": "string" - // }, - // "mask.fieldPaths": { - // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource. For example: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`", + // "name": { + // "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/documents/.*$", + // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/{collectionId}", - // "request": { - // "$ref": "Document" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Document" + // "$ref": "GoogleFirestoreAdminV1Index" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -7053,100 +7429,121 @@ func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.Call } -// method id "firestore.projects.databases.documents.delete": +// method id "firestore.projects.databases.collectionGroups.indexes.list": -type ProjectsDatabasesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesCollectionGroupsIndexesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a document. +// List: Lists composite indexes. // -// - name: The resource name of the Document to delete. In the format: -// `projects/{project_id}/databases/{database_id}/documents/{document_p -// ath}`. -func (r *ProjectsDatabasesDocumentsService) Delete(name string) *ProjectsDatabasesDocumentsDeleteCall { - c := &ProjectsDatabasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} +// - parent: A parent name of the form +// `projects/{project_id}/databases/{database_id}/collectionGroups/{col +// lection_id}`. +func (r *ProjectsDatabasesCollectionGroupsIndexesService) List(parent string) *ProjectsDatabasesCollectionGroupsIndexesListCall { + c := &ProjectsDatabasesCollectionGroupsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -// CurrentDocumentExists sets the optional parameter -// "currentDocument.exists": When set to `true`, the target document -// must exist. When set to `false`, the target document must not exist. -func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsDeleteCall { - c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists)) +// Filter sets the optional parameter "filter": The filter to apply to +// list results. +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Filter(filter string) *ProjectsDatabasesCollectionGroupsIndexesListCall { + c.urlParams_.Set("filter", filter) return c } -// CurrentDocumentUpdateTime sets the optional parameter -// "currentDocument.updateTime": When set, the target document must -// exist and have been last updated at that time. Timestamp must be -// microsecond aligned. -func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsDeleteCall { - c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime) +// PageSize sets the optional parameter "pageSize": The number of +// results to return. +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageSize(pageSize int64) *ProjectsDatabasesCollectionGroupsIndexesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// returned from a previous call to FirestoreAdmin.ListIndexes, that may +// be used to get the next page of results. +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) PageToken(pageToken string) *ProjectsDatabasesCollectionGroupsIndexesListCall { + 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 *ProjectsDatabasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsDeleteCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesCollectionGroupsIndexesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesCollectionGroupsIndexesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsDeleteCall { +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Context(ctx context.Context) *ProjectsDatabasesCollectionGroupsIndexesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "firestore.projects.databases.collectionGroups.indexes.list" call. +// Exactly one of *GoogleFirestoreAdminV1ListIndexesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleFirestoreAdminV1ListIndexesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListIndexesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7165,7 +7562,7 @@ func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleFirestoreAdminV1ListIndexesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7177,36 +7574,41 @@ func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a document.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}", - // "httpMethod": "DELETE", - // "id": "firestore.projects.databases.documents.delete", + // "description": "Lists composite indexes.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/collectionGroups/{collectionGroupsId}/indexes", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.collectionGroups.indexes.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "currentDocument.exists": { - // "description": "When set to `true`, the target document must exist. When set to `false`, the target document must not exist.", + // "filter": { + // "description": "The filter to apply to list results.", // "location": "query", - // "type": "boolean" + // "type": "string" // }, - // "currentDocument.updateTime": { - // "description": "When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.", - // "format": "google-datetime", + // "pageSize": { + // "description": "The number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, returned from a previous call to FirestoreAdmin.ListIndexes, that may be used to get the next page of results.", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "Required. The resource name of the Document to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`.", + // "parent": { + // "description": "Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/indexes", // "response": { - // "$ref": "Empty" + // "$ref": "GoogleFirestoreAdminV1ListIndexesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -7216,120 +7618,112 @@ func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "firestore.projects.databases.documents.get": - -type ProjectsDatabasesDocumentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a single document. -// -// - name: The resource name of the Document to get. In the format: -// `projects/{project_id}/databases/{database_id}/documents/{document_p -// ath}`. -func (r *ProjectsDatabasesDocumentsService) Get(name string) *ProjectsDatabasesDocumentsGetCall { - c := &ProjectsDatabasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsDatabasesCollectionGroupsIndexesListCall) Pages(ctx context.Context, f func(*GoogleFirestoreAdminV1ListIndexesResponse) 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) + } } -// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The -// list of field paths in the mask. See Document.fields for a field path -// syntax reference. -func (c *ProjectsDatabasesDocumentsGetCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsGetCall { - c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) - return c -} +// method id "firestore.projects.databases.documents.batchGet": -// ReadTime sets the optional parameter "readTime": Reads the version of -// the document at the given time. This may not be older than 270 -// seconds. -func (c *ProjectsDatabasesDocumentsGetCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsGetCall { - c.urlParams_.Set("readTime", readTime) - return c +type ProjectsDatabasesDocumentsBatchGetCall struct { + s *Service + database string + batchgetdocumentsrequest *BatchGetDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Transaction sets the optional parameter "transaction": Reads the -// document in a transaction. -func (c *ProjectsDatabasesDocumentsGetCall) Transaction(transaction string) *ProjectsDatabasesDocumentsGetCall { - c.urlParams_.Set("transaction", transaction) +// BatchGet: Gets multiple documents. Documents returned by this method +// are not guaranteed to be returned in the same order that they were +// requested. +// +// - database: The database name. In the format: +// `projects/{project_id}/databases/{database_id}`. +func (r *ProjectsDatabasesDocumentsService) BatchGet(database string, batchgetdocumentsrequest *BatchGetDocumentsRequest) *ProjectsDatabasesDocumentsBatchGetCall { + c := &ProjectsDatabasesDocumentsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.database = database + c.batchgetdocumentsrequest = batchgetdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsGetCall { +func (c *ProjectsDatabasesDocumentsBatchGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsGetCall { +func (c *ProjectsDatabasesDocumentsBatchGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsGetCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsBatchGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsBatchGetCall) doRequest(alt string) (*http.Response, 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.batchgetdocumentsrequest) + 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/{+database}/documents:batchGet") 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, + "database": c.database, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.get" call. -// Exactly one of *Document or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Document.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*Document, error) { +// Do executes the "firestore.projects.databases.documents.batchGet" call. +// Exactly one of *BatchGetDocumentsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *BatchGetDocumentsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7348,7 +7742,7 @@ func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*D if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Document{ + ret := &BatchGetDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7360,43 +7754,1439 @@ func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*D } return ret, nil // { - // "description": "Gets a single document.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}", - // "httpMethod": "GET", - // "id": "firestore.projects.databases.documents.get", + // "description": "Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:batchGet", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.batchGet", // "parameterOrder": [ - // "name" + // "database" // ], // "parameters": { - // "mask.fieldPaths": { - // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", - // "location": "query", + // "database": { + // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+database}/documents:batchGet", + // "request": { + // "$ref": "BatchGetDocumentsRequest" + // }, + // "response": { + // "$ref": "BatchGetDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "firestore.projects.databases.documents.batchWrite": + +type ProjectsDatabasesDocumentsBatchWriteCall struct { + s *Service + database string + batchwriterequest *BatchWriteRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchWrite: Applies a batch of write operations. The BatchWrite +// method does not apply the write operations atomically and can apply +// them out of order. Method does not allow more than one write per +// document. Each write succeeds or fails independently. See the +// BatchWriteResponse for the success status of each write. If you +// require an atomically applied set of writes, use Commit instead. +// +// - database: The database name. In the format: +// `projects/{project_id}/databases/{database_id}`. +func (r *ProjectsDatabasesDocumentsService) BatchWrite(database string, batchwriterequest *BatchWriteRequest) *ProjectsDatabasesDocumentsBatchWriteCall { + c := &ProjectsDatabasesDocumentsBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.database = database + c.batchwriterequest = batchwriterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBatchWriteCall { + 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 *ProjectsDatabasesDocumentsBatchWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBatchWriteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsBatchWriteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsBatchWriteCall) doRequest(alt string) (*http.Response, 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.batchwriterequest) + 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/{+database}/documents:batchWrite") + 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{ + "database": c.database, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.batchWrite" call. +// Exactly one of *BatchWriteResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BatchWriteResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsBatchWriteCall) Do(opts ...googleapi.CallOption) (*BatchWriteResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &BatchWriteResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the BatchWriteResponse for the success status of each write. If you require an atomically applied set of writes, use Commit instead.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:batchWrite", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.batchWrite", + // "parameterOrder": [ + // "database" + // ], + // "parameters": { + // "database": { + // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+database}/documents:batchWrite", + // "request": { + // "$ref": "BatchWriteRequest" + // }, + // "response": { + // "$ref": "BatchWriteResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "firestore.projects.databases.documents.beginTransaction": + +type ProjectsDatabasesDocumentsBeginTransactionCall struct { + s *Service + database string + begintransactionrequest *BeginTransactionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BeginTransaction: Starts a new transaction. +// +// - database: The database name. In the format: +// `projects/{project_id}/databases/{database_id}`. +func (r *ProjectsDatabasesDocumentsService) BeginTransaction(database string, begintransactionrequest *BeginTransactionRequest) *ProjectsDatabasesDocumentsBeginTransactionCall { + c := &ProjectsDatabasesDocumentsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.database = database + c.begintransactionrequest = begintransactionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsBeginTransactionCall { + 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 *ProjectsDatabasesDocumentsBeginTransactionCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsBeginTransactionCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsBeginTransactionCall) doRequest(alt string) (*http.Response, 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.begintransactionrequest) + 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/{+database}/documents:beginTransaction") + 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{ + "database": c.database, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.beginTransaction" call. +// Exactly one of *BeginTransactionResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *BeginTransactionResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*BeginTransactionResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &BeginTransactionResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts a new transaction.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:beginTransaction", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.beginTransaction", + // "parameterOrder": [ + // "database" + // ], + // "parameters": { + // "database": { + // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+database}/documents:beginTransaction", + // "request": { + // "$ref": "BeginTransactionRequest" + // }, + // "response": { + // "$ref": "BeginTransactionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "firestore.projects.databases.documents.commit": + +type ProjectsDatabasesDocumentsCommitCall struct { + s *Service + database string + commitrequest *CommitRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Commit: Commits a transaction, while optionally updating documents. +// +// - database: The database name. In the format: +// `projects/{project_id}/databases/{database_id}`. +func (r *ProjectsDatabasesDocumentsService) Commit(database string, commitrequest *CommitRequest) *ProjectsDatabasesDocumentsCommitCall { + c := &ProjectsDatabasesDocumentsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.database = database + c.commitrequest = commitrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsCommitCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCommitCall { + 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 *ProjectsDatabasesDocumentsCommitCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCommitCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsCommitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsCommitCall) doRequest(alt string) (*http.Response, 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.commitrequest) + 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/{+database}/documents:commit") + 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{ + "database": c.database, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.commit" call. +// Exactly one of *CommitResponse or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CommitResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &CommitResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Commits a transaction, while optionally updating documents.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:commit", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.commit", + // "parameterOrder": [ + // "database" + // ], + // "parameters": { + // "database": { + // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+database}/documents:commit", + // "request": { + // "$ref": "CommitRequest" + // }, + // "response": { + // "$ref": "CommitResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "firestore.projects.databases.documents.createDocument": + +type ProjectsDatabasesDocumentsCreateDocumentCall struct { + s *Service + parent string + collectionId string + document *Document + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CreateDocument: Creates a new document. +// +// - collectionId: The collection ID, relative to `parent`, to list. For +// example: `chatrooms`. +// - parent: The parent resource. For example: +// `projects/{project_id}/databases/{database_id}/documents` or +// `projects/{project_id}/databases/{database_id}/documents/chatrooms/{ +// chatroom_id}`. +func (r *ProjectsDatabasesDocumentsService) CreateDocument(parent string, collectionId string, document *Document) *ProjectsDatabasesDocumentsCreateDocumentCall { + c := &ProjectsDatabasesDocumentsCreateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.collectionId = collectionId + c.document = document + return c +} + +// DocumentId sets the optional parameter "documentId": The +// client-assigned document ID to use for this document. If not +// specified, an ID will be assigned by the service. +func (c *ProjectsDatabasesDocumentsCreateDocumentCall) DocumentId(documentId string) *ProjectsDatabasesDocumentsCreateDocumentCall { + c.urlParams_.Set("documentId", documentId) + return c +} + +// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The +// list of field paths in the mask. See Document.fields for a field path +// syntax reference. +func (c *ProjectsDatabasesDocumentsCreateDocumentCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsCreateDocumentCall { + c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsCreateDocumentCall { + 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 *ProjectsDatabasesDocumentsCreateDocumentCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsCreateDocumentCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsCreateDocumentCall) doRequest(alt string) (*http.Response, 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.document) + 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}/{collectionId}") + 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, + "collectionId": c.collectionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.createDocument" call. +// Exactly one of *Document or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Document.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsCreateDocumentCall) Do(opts ...googleapi.CallOption) (*Document, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Document{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new document.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{collectionId}", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.createDocument", + // "parameterOrder": [ + // "parent", + // "collectionId" + // ], + // "parameters": { + // "collectionId": { + // "description": "Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "documentId": { + // "description": "The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service.", + // "location": "query", + // "type": "string" + // }, + // "mask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource. For example: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/{collectionId}", + // "request": { + // "$ref": "Document" + // }, + // "response": { + // "$ref": "Document" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "firestore.projects.databases.documents.delete": + +type ProjectsDatabasesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a document. +// +// - name: The resource name of the Document to delete. In the format: +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. +func (r *ProjectsDatabasesDocumentsService) Delete(name string) *ProjectsDatabasesDocumentsDeleteCall { + c := &ProjectsDatabasesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// CurrentDocumentExists sets the optional parameter +// "currentDocument.exists": When set to `true`, the target document +// must exist. When set to `false`, the target document must not exist. +func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsDeleteCall { + c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists)) + return c +} + +// CurrentDocumentUpdateTime sets the optional parameter +// "currentDocument.updateTime": When set, the target document must +// exist and have been last updated at that time. Timestamp must be +// microsecond aligned. +func (c *ProjectsDatabasesDocumentsDeleteCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsDeleteCall { + c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsDeleteCall { + 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 *ProjectsDatabasesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsDeleteCall) doRequest(alt string) (*http.Response, 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 "firestore.projects.databases.documents.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsDatabasesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a document.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}", + // "httpMethod": "DELETE", + // "id": "firestore.projects.databases.documents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "currentDocument.exists": { + // "description": "When set to `true`, the target document must exist. When set to `false`, the target document must not exist.", + // "location": "query", + // "type": "boolean" + // }, + // "currentDocument.updateTime": { + // "description": "When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the Document to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "firestore.projects.databases.documents.get": + +type ProjectsDatabasesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a single document. +// +// - name: The resource name of the Document to get. In the format: +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. +func (r *ProjectsDatabasesDocumentsService) Get(name string) *ProjectsDatabasesDocumentsGetCall { + c := &ProjectsDatabasesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The +// list of field paths in the mask. See Document.fields for a field path +// syntax reference. +func (c *ProjectsDatabasesDocumentsGetCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsGetCall { + c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) + return c +} + +// ReadTime sets the optional parameter "readTime": Reads the version of +// the document at the given time. This may not be older than 270 +// seconds. +func (c *ProjectsDatabasesDocumentsGetCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsGetCall { + c.urlParams_.Set("readTime", readTime) + return c +} + +// Transaction sets the optional parameter "transaction": Reads the +// document in a transaction. +func (c *ProjectsDatabasesDocumentsGetCall) Transaction(transaction string) *ProjectsDatabasesDocumentsGetCall { + c.urlParams_.Set("transaction", transaction) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDatabasesDocumentsGetCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsGetCall) doRequest(alt string) (*http.Response, 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 "firestore.projects.databases.documents.get" call. +// Exactly one of *Document or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Document.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*Document, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Document{ + ServerResponse: googleapi.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 single document.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.documents.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "mask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the Document to get. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "required": true, + // "type": "string" + // }, + // "readTime": { + // "description": "Reads the version of the document at the given time. This may not be older than 270 seconds.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "transaction": { + // "description": "Reads the document in a transaction.", + // "format": "byte", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Document" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// method id "firestore.projects.databases.documents.list": + +type ProjectsDatabasesDocumentsListCall struct { + s *Service + parent string + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists documents. +// +// - collectionId: Optional. The collection ID, relative to `parent`, to +// list. For example: `chatrooms` or `messages`. This is optional, and +// when not provided, Firestore will list documents from all +// collections under the provided `parent`. +// - parent: The parent resource name. In the format: +// `projects/{project_id}/databases/{database_id}/documents` or +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. For example: +// `projects/my-project/databases/my-database/documents` or +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) List(parent string, collectionId string) *ProjectsDatabasesDocumentsListCall { + c := &ProjectsDatabasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.collectionId = collectionId + return c +} + +// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The +// list of field paths in the mask. See Document.fields for a field path +// syntax reference. +func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) + return c +} + +// OrderBy sets the optional parameter "orderBy": The optional ordering +// of the documents to return. For example: `priority desc, __name__ +// desc`. This mirrors the `ORDER BY` used in Firestore queries but in a +// string representation. When absent, documents are ordered based on +// `__name__ ASC`. +func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of documents to return in a single response. Firestore may return +// fewer than this value. +func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListDocuments` response. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// (with the exception of `page_size`) must match the values set in the +// request that generated the page token. +func (c *ProjectsDatabasesDocumentsListCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadTime sets the optional parameter "readTime": Perform the read at +// the provided time. This may not be older than 270 seconds. +func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.Set("readTime", readTime) + return c +} + +// ShowMissing sets the optional parameter "showMissing": If the list +// should show missing documents. A document is missing if it does not +// exist, but there are sub-documents nested underneath it. When true, +// such missing documents will be returned with a key but will not have +// fields, `create_time`, or `update_time` set. Requests with +// `show_missing` may not specify `where` or `order_by`. +func (c *ProjectsDatabasesDocumentsListCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) + return c +} + +// Transaction sets the optional parameter "transaction": Perform the +// read as part of an already active transaction. +func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.Set("transaction", transaction) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDatabasesDocumentsListCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsListCall) doRequest(alt string) (*http.Response, 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}/{collectionId}") + 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, + "collectionId": c.collectionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.list" call. +// Exactly one of *ListDocumentsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDocumentsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListDocumentsResponse{ + ServerResponse: googleapi.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 documents.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}/{collectionId}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.documents.list", + // "parameterOrder": [ + // "parent", + // "collectionId" + // ], + // "parameters": { + // "collectionId": { + // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "mask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + // "location": "query", // "repeated": true, // "type": "string" // }, - // "name": { - // "description": "Required. The resource name of the Document to get. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`.", + // "orderBy": { + // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", // "location": "path", // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", // "required": true, // "type": "string" // }, // "readTime": { - // "description": "Reads the version of the document at the given time. This may not be older than 270 seconds.", + // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", // "format": "google-datetime", // "location": "query", // "type": "string" // }, + // "showMissing": { + // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "location": "query", + // "type": "boolean" + // }, // "transaction": { - // "description": "Reads the document in a transaction.", + // "description": "Perform the read as part of an already active transaction.", // "format": "byte", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/{collectionId}", + // "response": { + // "$ref": "ListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// 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 *ProjectsDatabasesDocumentsListCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) 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 "firestore.projects.databases.documents.listCollectionIds": + +type ProjectsDatabasesDocumentsListCollectionIdsCall struct { + s *Service + parent string + listcollectionidsrequest *ListCollectionIdsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListCollectionIds: Lists all the collection IDs underneath a +// document. +// +// - parent: The parent document. In the format: +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. For example: +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) ListCollectionIds(parent string, listcollectionidsrequest *ListCollectionIdsRequest) *ProjectsDatabasesDocumentsListCollectionIdsCall { + c := &ProjectsDatabasesDocumentsListCollectionIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.listcollectionidsrequest = listcollectionidsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCollectionIdsCall { + 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 *ProjectsDatabasesDocumentsListCollectionIdsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCollectionIdsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) doRequest(alt string) (*http.Response, 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.listcollectionidsrequest) + 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}:listCollectionIds") + 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 "firestore.projects.databases.documents.listCollectionIds" call. +// Exactly one of *ListCollectionIdsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListCollectionIdsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.CallOption) (*ListCollectionIdsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListCollectionIdsResponse{ + ServerResponse: googleapi.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 the collection IDs underneath a document.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:listCollectionIds", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.listCollectionIds", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:listCollectionIds", + // "request": { + // "$ref": "ListCollectionIdsRequest" + // }, // "response": { - // "$ref": "Document" + // "$ref": "ListCollectionIdsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -7406,9 +9196,30 @@ func (c *ProjectsDatabasesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*D } -// method id "firestore.projects.databases.documents.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Pages(ctx context.Context, f func(*ListCollectionIdsResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.listcollectionidsrequest.PageToken = pt }(c.listcollectionidsrequest.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.listcollectionidsrequest.PageToken = x.NextPageToken + } +} -type ProjectsDatabasesDocumentsListCall struct { +// method id "firestore.projects.databases.documents.listDocuments": + +type ProjectsDatabasesDocumentsListDocumentsCall struct { s *Service parent string collectionId string @@ -7418,7 +9229,7 @@ type ProjectsDatabasesDocumentsListCall struct { header_ http.Header } -// List: Lists documents. +// ListDocuments: Lists documents. // // - collectionId: Optional. The collection ID, relative to `parent`, to // list. For example: `chatrooms` or `messages`. This is optional, and @@ -7431,8 +9242,8 @@ type ProjectsDatabasesDocumentsListCall struct { // `projects/my-project/databases/my-database/documents` or // `projects/my-project/databases/my-database/documents/chatrooms/my-ch // atroom`. -func (r *ProjectsDatabasesDocumentsService) List(parent string, collectionId string) *ProjectsDatabasesDocumentsListCall { - c := &ProjectsDatabasesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsDatabasesDocumentsService) ListDocuments(parent string, collectionId string) *ProjectsDatabasesDocumentsListDocumentsCall { + c := &ProjectsDatabasesDocumentsListDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.collectionId = collectionId return c @@ -7441,7 +9252,7 @@ func (r *ProjectsDatabasesDocumentsService) List(parent string, collectionId str // MaskFieldPaths sets the optional parameter "mask.fieldPaths": The // list of field paths in the mask. See Document.fields for a field path // syntax reference. -func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) return c } @@ -7451,7 +9262,7 @@ func (c *ProjectsDatabasesDocumentsListCall) MaskFieldPaths(maskFieldPaths ...st // desc`. This mirrors the `ORDER BY` used in Firestore queries but in a // string representation. When absent, documents are ordered based on // `__name__ ASC`. -func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -7459,7 +9270,7 @@ func (c *ProjectsDatabasesDocumentsListCall) OrderBy(orderBy string) *ProjectsDa // PageSize sets the optional parameter "pageSize": The maximum number // of documents to return in a single response. Firestore may return // fewer than this value. -func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -7469,14 +9280,14 @@ func (c *ProjectsDatabasesDocumentsListCall) PageSize(pageSize int64) *ProjectsD // retrieve the subsequent page. When paginating, all other parameters // (with the exception of `page_size`) must match the values set in the // request that generated the page token. -func (c *ProjectsDatabasesDocumentsListCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadTime sets the optional parameter "readTime": Perform the read at // the provided time. This may not be older than 270 seconds. -func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("readTime", readTime) return c } @@ -7487,14 +9298,14 @@ func (c *ProjectsDatabasesDocumentsListCall) ReadTime(readTime string) *Projects // such missing documents will be returned with a key but will not have // fields, `create_time`, or `update_time` set. Requests with // `show_missing` may not specify `where` or `order_by`. -func (c *ProjectsDatabasesDocumentsListCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) return c } // Transaction sets the optional parameter "transaction": Perform the // read as part of an already active transaction. -func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("transaction", transaction) return c } @@ -7502,7 +9313,7 @@ func (c *ProjectsDatabasesDocumentsListCall) Transaction(transaction string) *Pr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListDocumentsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7512,7 +9323,7 @@ func (c *ProjectsDatabasesDocumentsListCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListDocumentsCall { c.ifNoneMatch_ = entityTag return c } @@ -7520,55 +9331,264 @@ func (c *ProjectsDatabasesDocumentsListCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsListCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCall { +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListDocumentsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesDocumentsListDocumentsCall) doRequest(alt string) (*http.Response, 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}/{collectionId}") + 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, + "collectionId": c.collectionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.documents.listDocuments" call. +// Exactly one of *ListDocumentsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDocumentsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListDocumentsResponse{ + ServerResponse: googleapi.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 documents.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{collectionId}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.documents.listDocuments", + // "parameterOrder": [ + // "parent", + // "collectionId" + // ], + // "parameters": { + // "collectionId": { + // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "mask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "location": "path", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents$", + // "required": true, + // "type": "string" + // }, + // "readTime": { + // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "showMissing": { + // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", + // "location": "query", + // "type": "boolean" + // }, + // "transaction": { + // "description": "Perform the read as part of an already active transaction.", + // "format": "byte", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/{collectionId}", + // "response": { + // "$ref": "ListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + +// 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 *ProjectsDatabasesDocumentsListDocumentsCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) 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 "firestore.projects.databases.documents.listen": + +type ProjectsDatabasesDocumentsListenCall struct { + s *Service + database string + listenrequest *ListenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Listen: Listens to changes. This method is only available via gRPC or +// WebChannel (not REST). +// +// - database: The database name. In the format: +// `projects/{project_id}/databases/{database_id}`. +func (r *ProjectsDatabasesDocumentsService) Listen(database string, listenrequest *ListenRequest) *ProjectsDatabasesDocumentsListenCall { + c := &ProjectsDatabasesDocumentsListenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.database = database + c.listenrequest = listenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDatabasesDocumentsListenCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListenCall { + 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 *ProjectsDatabasesDocumentsListenCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListenCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsListCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsListenCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsListenCall) doRequest(alt string) (*http.Response, 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.listenrequest) + 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}/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:listen") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - "collectionId": c.collectionId, + "database": c.database, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.list" call. -// Exactly one of *ListDocumentsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListDocumentsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "firestore.projects.databases.documents.listen" call. +// Exactly one of *ListenResponse or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ListenResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) { +func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) (*ListenResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7587,7 +9607,7 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListDocumentsResponse{ + ret := &ListenResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7599,71 +9619,28 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Lists documents.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}/{collectionId}", - // "httpMethod": "GET", - // "id": "firestore.projects.databases.documents.list", + // "description": "Listens to changes. This method is only available via gRPC or WebChannel (not REST).", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:listen", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.listen", // "parameterOrder": [ - // "parent", - // "collectionId" + // "database" // ], // "parameters": { - // "collectionId": { - // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "mask.fieldPaths": { - // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "database": { + // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "pattern": "^projects/[^/]+/databases/[^/]+$", // "required": true, // "type": "string" - // }, - // "readTime": { - // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "showMissing": { - // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", - // "location": "query", - // "type": "boolean" - // }, - // "transaction": { - // "description": "Perform the read as part of an already active transaction.", - // "format": "byte", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/{collectionId}", + // "path": "v1/{+database}/documents:listen", + // "request": { + // "$ref": "ListenRequest" + // }, // "response": { - // "$ref": "ListDocumentsResponse" + // "$ref": "ListenResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -7673,57 +9650,37 @@ func (c *ProjectsDatabasesDocumentsListCall) Do(opts ...googleapi.CallOption) (* } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsDatabasesDocumentsListCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) 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 "firestore.projects.databases.documents.listCollectionIds": +// method id "firestore.projects.databases.documents.partitionQuery": -type ProjectsDatabasesDocumentsListCollectionIdsCall struct { - s *Service - parent string - listcollectionidsrequest *ListCollectionIdsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesDocumentsPartitionQueryCall struct { + s *Service + parent string + partitionqueryrequest *PartitionQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListCollectionIds: Lists all the collection IDs underneath a -// document. +// PartitionQuery: Partitions a query by returning partition cursors +// that can be used to run the query in parallel. The returned partition +// cursors are split points that can be used by RunQuery as starting/end +// points for the query results. // -// - parent: The parent document. In the format: -// `projects/{project_id}/databases/{database_id}/documents/{document_p -// ath}`. For example: -// `projects/my-project/databases/my-database/documents/chatrooms/my-ch -// atroom`. -func (r *ProjectsDatabasesDocumentsService) ListCollectionIds(parent string, listcollectionidsrequest *ListCollectionIdsRequest) *ProjectsDatabasesDocumentsListCollectionIdsCall { - c := &ProjectsDatabasesDocumentsListCollectionIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name. In the format: +// `projects/{project_id}/databases/{database_id}/documents`. Document +// resource names are not supported; only database resource names can +// be specified. +func (r *ProjectsDatabasesDocumentsService) PartitionQuery(parent string, partitionqueryrequest *PartitionQueryRequest) *ProjectsDatabasesDocumentsPartitionQueryCall { + c := &ProjectsDatabasesDocumentsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.listcollectionidsrequest = listcollectionidsrequest + c.partitionqueryrequest = partitionqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListCollectionIdsCall { +func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPartitionQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7731,21 +9688,21 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) 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 *ProjectsDatabasesDocumentsListCollectionIdsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListCollectionIdsCall { +func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPartitionQueryCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsPartitionQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -7753,14 +9710,14 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.listcollectionidsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionqueryrequest) 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}:listCollectionIds") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:partitionQuery") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7773,14 +9730,14 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.listCollectionIds" call. -// Exactly one of *ListCollectionIdsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListCollectionIdsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "firestore.projects.databases.documents.partitionQuery" call. +// Exactly one of *PartitionQueryResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PartitionQueryResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.CallOption) (*ListCollectionIdsResponse, error) { +func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.CallOption) (*PartitionQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7799,7 +9756,7 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCollectionIdsResponse{ + ret := &PartitionQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7811,28 +9768,28 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Lists all the collection IDs underneath a document.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:listCollectionIds", + // "description": "Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:partitionQuery", // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.listCollectionIds", + // "id": "firestore.projects.databases.documents.partitionQuery", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents`. Document resource names are not supported; only database resource names can be specified.", // "location": "path", // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:listCollectionIds", + // "path": "v1/{+parent}:partitionQuery", // "request": { - // "$ref": "ListCollectionIdsRequest" + // "$ref": "PartitionQueryRequest" // }, // "response": { - // "$ref": "ListCollectionIdsResponse" + // "$ref": "PartitionQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -7845,187 +9802,141 @@ func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Do(opts ...googleapi.C // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsDatabasesDocumentsListCollectionIdsCall) Pages(ctx context.Context, f func(*ListCollectionIdsResponse) error) error { +func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Pages(ctx context.Context, f func(*PartitionQueryResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.listcollectionidsrequest.PageToken = pt }(c.listcollectionidsrequest.PageToken) // reset paging to original point + defer func(pt string) { c.partitionqueryrequest.PageToken = pt }(c.partitionqueryrequest.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.listcollectionidsrequest.PageToken = x.NextPageToken - } -} - -// method id "firestore.projects.databases.documents.listDocuments": - -type ProjectsDatabasesDocumentsListDocumentsCall struct { - s *Service - parent string - collectionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListDocuments: Lists documents. -// -// - collectionId: Optional. The collection ID, relative to `parent`, to -// list. For example: `chatrooms` or `messages`. This is optional, and -// when not provided, Firestore will list documents from all -// collections under the provided `parent`. -// - parent: The parent resource name. In the format: -// `projects/{project_id}/databases/{database_id}/documents` or -// `projects/{project_id}/databases/{database_id}/documents/{document_p -// ath}`. For example: -// `projects/my-project/databases/my-database/documents` or -// `projects/my-project/databases/my-database/documents/chatrooms/my-ch -// atroom`. -func (r *ProjectsDatabasesDocumentsService) ListDocuments(parent string, collectionId string) *ProjectsDatabasesDocumentsListDocumentsCall { - c := &ProjectsDatabasesDocumentsListDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.collectionId = collectionId - return c + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.partitionqueryrequest.PageToken = x.NextPageToken + } } -// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The -// list of field paths in the mask. See Document.fields for a field path -// syntax reference. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsListDocumentsCall { - c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) - return c -} +// method id "firestore.projects.databases.documents.patch": -// OrderBy sets the optional parameter "orderBy": The optional ordering -// of the documents to return. For example: `priority desc, __name__ -// desc`. This mirrors the `ORDER BY` used in Firestore queries but in a -// string representation. When absent, documents are ordered based on -// `__name__ ASC`. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) OrderBy(orderBy string) *ProjectsDatabasesDocumentsListDocumentsCall { - c.urlParams_.Set("orderBy", orderBy) - return c +type ProjectsDatabasesDocumentsPatchCall struct { + s *Service + name string + document *Document + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageSize sets the optional parameter "pageSize": The maximum number -// of documents to return in a single response. Firestore may return -// fewer than this value. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageSize(pageSize int64) *ProjectsDatabasesDocumentsListDocumentsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Patch: Updates or inserts a document. +// +// - name: The resource name of the document, for example +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. +func (r *ProjectsDatabasesDocumentsService) Patch(name string, document *Document) *ProjectsDatabasesDocumentsPatchCall { + c := &ProjectsDatabasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.document = document return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListDocuments` response. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// (with the exception of `page_size`) must match the values set in the -// request that generated the page token. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) PageToken(pageToken string) *ProjectsDatabasesDocumentsListDocumentsCall { - c.urlParams_.Set("pageToken", pageToken) +// CurrentDocumentExists sets the optional parameter +// "currentDocument.exists": When set to `true`, the target document +// must exist. When set to `false`, the target document must not exist. +func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsPatchCall { + c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists)) return c } -// ReadTime sets the optional parameter "readTime": Perform the read at -// the provided time. This may not be older than 270 seconds. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) ReadTime(readTime string) *ProjectsDatabasesDocumentsListDocumentsCall { - c.urlParams_.Set("readTime", readTime) +// CurrentDocumentUpdateTime sets the optional parameter +// "currentDocument.updateTime": When set, the target document must +// exist and have been last updated at that time. Timestamp must be +// microsecond aligned. +func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsPatchCall { + c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime) return c } -// ShowMissing sets the optional parameter "showMissing": If the list -// should show missing documents. A document is missing if it does not -// exist, but there are sub-documents nested underneath it. When true, -// such missing documents will be returned with a key but will not have -// fields, `create_time`, or `update_time` set. Requests with -// `show_missing` may not specify `where` or `order_by`. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) ShowMissing(showMissing bool) *ProjectsDatabasesDocumentsListDocumentsCall { - c.urlParams_.Set("showMissing", fmt.Sprint(showMissing)) +// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The +// list of field paths in the mask. See Document.fields for a field path +// syntax reference. +func (c *ProjectsDatabasesDocumentsPatchCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall { + c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) return c } -// Transaction sets the optional parameter "transaction": Perform the -// read as part of an already active transaction. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) Transaction(transaction string) *ProjectsDatabasesDocumentsListDocumentsCall { - c.urlParams_.Set("transaction", transaction) +// UpdateMaskFieldPaths sets the optional parameter +// "updateMask.fieldPaths": The list of field paths in the mask. See +// Document.fields for a field path syntax reference. +func (c *ProjectsDatabasesDocumentsPatchCall) UpdateMaskFieldPaths(updateMaskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall { + c.urlParams_.SetMulti("updateMask.fieldPaths", append([]string{}, updateMaskFieldPaths...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListDocumentsCall { +func (c *ProjectsDatabasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) IfNoneMatch(entityTag string) *ProjectsDatabasesDocumentsListDocumentsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListDocumentsCall { +func (c *ProjectsDatabasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsListDocumentsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsPatchCall) doRequest(alt string) (*http.Response, 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.document) + 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}/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - "collectionId": c.collectionId, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.listDocuments" call. -// Exactly one of *ListDocumentsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListDocumentsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallOption) (*ListDocumentsResponse, error) { +// Do executes the "firestore.projects.databases.documents.patch" call. +// Exactly one of *Document or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Document.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*Document, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8044,7 +9955,7 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListDocumentsResponse{ + ret := &Document{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8056,71 +9967,51 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists documents.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{collectionId}", - // "httpMethod": "GET", - // "id": "firestore.projects.databases.documents.listDocuments", + // "description": "Updates or inserts a document.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}", + // "httpMethod": "PATCH", + // "id": "firestore.projects.databases.documents.patch", // "parameterOrder": [ - // "parent", - // "collectionId" + // "name" // ], // "parameters": { - // "collectionId": { - // "description": "Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "mask.fieldPaths": { - // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", + // "currentDocument.exists": { + // "description": "When set to `true`, the target document must exist. When set to `false`, the target document must not exist.", // "location": "query", - // "repeated": true, - // "type": "string" + // "type": "boolean" // }, - // "orderBy": { - // "description": "Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`.", + // "currentDocument.updateTime": { + // "description": "When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.", + // "format": "google-datetime", // "location": "query", // "type": "string" // }, - // "pageSize": { - // "description": "Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token.", + // "mask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", // "location": "query", + // "repeated": true, // "type": "string" // }, - // "parent": { - // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "name": { + // "description": "The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/documents$", + // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", // "required": true, // "type": "string" // }, - // "readTime": { - // "description": "Perform the read at the provided time. This may not be older than 270 seconds.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "showMissing": { - // "description": "If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`.", - // "location": "query", - // "type": "boolean" - // }, - // "transaction": { - // "description": "Perform the read as part of an already active transaction.", - // "format": "byte", + // "updateMask.fieldPaths": { + // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", // "location": "query", + // "repeated": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/{collectionId}", + // "path": "v1/{+name}", + // "request": { + // "$ref": "Document" + // }, // "response": { - // "$ref": "ListDocumentsResponse" + // "$ref": "Document" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -8130,54 +10021,32 @@ func (c *ProjectsDatabasesDocumentsListDocumentsCall) Do(opts ...googleapi.CallO } -// 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 *ProjectsDatabasesDocumentsListDocumentsCall) Pages(ctx context.Context, f func(*ListDocumentsResponse) 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 "firestore.projects.databases.documents.listen": +// method id "firestore.projects.databases.documents.rollback": -type ProjectsDatabasesDocumentsListenCall struct { - s *Service - database string - listenrequest *ListenRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesDocumentsRollbackCall struct { + s *Service + database string + rollbackrequest *RollbackRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Listen: Listens to changes. This method is only available via gRPC or -// WebChannel (not REST). +// Rollback: Rolls back a transaction. // // - database: The database name. In the format: // `projects/{project_id}/databases/{database_id}`. -func (r *ProjectsDatabasesDocumentsService) Listen(database string, listenrequest *ListenRequest) *ProjectsDatabasesDocumentsListenCall { - c := &ProjectsDatabasesDocumentsListenCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsDatabasesDocumentsService) Rollback(database string, rollbackrequest *RollbackRequest) *ProjectsDatabasesDocumentsRollbackCall { + c := &ProjectsDatabasesDocumentsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.database = database - c.listenrequest = listenrequest + c.rollbackrequest = rollbackrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsListenCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsListenCall { +func (c *ProjectsDatabasesDocumentsRollbackCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRollbackCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8185,21 +10054,21 @@ func (c *ProjectsDatabasesDocumentsListenCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsListenCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsListenCall { +func (c *ProjectsDatabasesDocumentsRollbackCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRollbackCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsListenCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsRollbackCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsListenCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsRollbackCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8207,14 +10076,14 @@ func (c *ProjectsDatabasesDocumentsListenCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.listenrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest) 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/{+database}/documents:listen") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:rollback") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8227,14 +10096,14 @@ func (c *ProjectsDatabasesDocumentsListenCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.listen" call. -// Exactly one of *ListenResponse or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ListenResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) (*ListenResponse, error) { +// Do executes the "firestore.projects.databases.documents.rollback" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8253,7 +10122,7 @@ func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListenResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8265,10 +10134,10 @@ func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Listens to changes. This method is only available via gRPC or WebChannel (not REST).", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:listen", + // "description": "Rolls back a transaction.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:rollback", // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.listen", + // "id": "firestore.projects.databases.documents.rollback", // "parameterOrder": [ // "database" // ], @@ -8281,12 +10150,12 @@ func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "v1/{+database}/documents:listen", + // "path": "v1/{+database}/documents:rollback", // "request": { - // "$ref": "ListenRequest" + // "$ref": "RollbackRequest" // }, // "response": { - // "$ref": "ListenResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -8296,37 +10165,42 @@ func (c *ProjectsDatabasesDocumentsListenCall) Do(opts ...googleapi.CallOption) } -// method id "firestore.projects.databases.documents.partitionQuery": +// method id "firestore.projects.databases.documents.runAggregationQuery": -type ProjectsDatabasesDocumentsPartitionQueryCall struct { - s *Service - parent string - partitionqueryrequest *PartitionQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesDocumentsRunAggregationQueryCall struct { + s *Service + parent string + runaggregationqueryrequest *RunAggregationQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PartitionQuery: Partitions a query by returning partition cursors -// that can be used to run the query in parallel. The returned partition -// cursors are split points that can be used by RunQuery as starting/end -// points for the query results. +// RunAggregationQuery: Runs an aggregation query. Rather than producing +// Document results like Firestore.RunQuery, this API allows running an +// aggregation to produce a series of AggregationResult server-side. +// High-Level Example: ``` -- Return the number of documents in table +// given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true +// ); ``` // // - parent: The parent resource name. In the format: -// `projects/{project_id}/databases/{database_id}/documents`. Document -// resource names are not supported; only database resource names can -// be specified. -func (r *ProjectsDatabasesDocumentsService) PartitionQuery(parent string, partitionqueryrequest *PartitionQueryRequest) *ProjectsDatabasesDocumentsPartitionQueryCall { - c := &ProjectsDatabasesDocumentsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_id}/databases/{database_id}/documents` or +// `projects/{project_id}/databases/{database_id}/documents/{document_p +// ath}`. For example: +// `projects/my-project/databases/my-database/documents` or +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) RunAggregationQuery(parent string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsDatabasesDocumentsRunAggregationQueryCall { + c := &ProjectsDatabasesDocumentsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.partitionqueryrequest = partitionqueryrequest + c.runaggregationqueryrequest = runaggregationqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPartitionQueryCall { +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunAggregationQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8334,21 +10208,21 @@ func (c *ProjectsDatabasesDocumentsPartitionQueryCall) 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 *ProjectsDatabasesDocumentsPartitionQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPartitionQueryCall { +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunAggregationQueryCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsPartitionQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8356,14 +10230,14 @@ func (c *ProjectsDatabasesDocumentsPartitionQueryCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest) 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}:partitionQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runAggregationQuery") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8376,14 +10250,14 @@ func (c *ProjectsDatabasesDocumentsPartitionQueryCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.partitionQuery" call. -// Exactly one of *PartitionQueryResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *PartitionQueryResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "firestore.projects.databases.documents.runAggregationQuery" call. +// Exactly one of *RunAggregationQueryResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RunAggregationQueryResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.CallOption) (*PartitionQueryResponse, error) { +func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8402,7 +10276,7 @@ func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PartitionQueryResponse{ + ret := &RunAggregationQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8414,28 +10288,28 @@ func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:partitionQuery", + // "description": "Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example: ``` -- Return the number of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); ```", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runAggregationQuery", // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.partitionQuery", + // "id": "firestore.projects.databases.documents.runAggregationQuery", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents`. Document resource names are not supported; only database resource names can be specified.", + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", // "location": "path", // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:partitionQuery", + // "path": "v1/{+parent}:runAggregationQuery", // "request": { - // "$ref": "PartitionQueryRequest" + // "$ref": "RunAggregationQueryRequest" // }, // "response": { - // "$ref": "PartitionQueryResponse" + // "$ref": "RunAggregationQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -8445,87 +10319,37 @@ func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Do(opts ...googleapi.Call } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsDatabasesDocumentsPartitionQueryCall) Pages(ctx context.Context, f func(*PartitionQueryResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.partitionqueryrequest.PageToken = pt }(c.partitionqueryrequest.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.partitionqueryrequest.PageToken = x.NextPageToken - } -} - -// method id "firestore.projects.databases.documents.patch": +// method id "firestore.projects.databases.documents.runQuery": -type ProjectsDatabasesDocumentsPatchCall struct { - s *Service - name string - document *Document - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesDocumentsRunQueryCall struct { + s *Service + parent string + runqueryrequest *RunQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates or inserts a document. +// RunQuery: Runs a query. // -// - name: The resource name of the document, for example +// - parent: The parent resource name. In the format: +// `projects/{project_id}/databases/{database_id}/documents` or // `projects/{project_id}/databases/{database_id}/documents/{document_p -// ath}`. -func (r *ProjectsDatabasesDocumentsService) Patch(name string, document *Document) *ProjectsDatabasesDocumentsPatchCall { - c := &ProjectsDatabasesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.document = document - return c -} - -// CurrentDocumentExists sets the optional parameter -// "currentDocument.exists": When set to `true`, the target document -// must exist. When set to `false`, the target document must not exist. -func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentExists(currentDocumentExists bool) *ProjectsDatabasesDocumentsPatchCall { - c.urlParams_.Set("currentDocument.exists", fmt.Sprint(currentDocumentExists)) - return c -} - -// CurrentDocumentUpdateTime sets the optional parameter -// "currentDocument.updateTime": When set, the target document must -// exist and have been last updated at that time. Timestamp must be -// microsecond aligned. -func (c *ProjectsDatabasesDocumentsPatchCall) CurrentDocumentUpdateTime(currentDocumentUpdateTime string) *ProjectsDatabasesDocumentsPatchCall { - c.urlParams_.Set("currentDocument.updateTime", currentDocumentUpdateTime) - return c -} - -// MaskFieldPaths sets the optional parameter "mask.fieldPaths": The -// list of field paths in the mask. See Document.fields for a field path -// syntax reference. -func (c *ProjectsDatabasesDocumentsPatchCall) MaskFieldPaths(maskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall { - c.urlParams_.SetMulti("mask.fieldPaths", append([]string{}, maskFieldPaths...)) - return c -} - -// UpdateMaskFieldPaths sets the optional parameter -// "updateMask.fieldPaths": The list of field paths in the mask. See -// Document.fields for a field path syntax reference. -func (c *ProjectsDatabasesDocumentsPatchCall) UpdateMaskFieldPaths(updateMaskFieldPaths ...string) *ProjectsDatabasesDocumentsPatchCall { - c.urlParams_.SetMulti("updateMask.fieldPaths", append([]string{}, updateMaskFieldPaths...)) +// ath}`. For example: +// `projects/my-project/databases/my-database/documents` or +// `projects/my-project/databases/my-database/documents/chatrooms/my-ch +// atroom`. +func (r *ProjectsDatabasesDocumentsService) RunQuery(parent string, runqueryrequest *RunQueryRequest) *ProjectsDatabasesDocumentsRunQueryCall { + c := &ProjectsDatabasesDocumentsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.runqueryrequest = runqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsPatchCall { +func (c *ProjectsDatabasesDocumentsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8533,21 +10357,21 @@ func (c *ProjectsDatabasesDocumentsPatchCall) Fields(s ...googleapi.Field) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsPatchCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsPatchCall { +func (c *ProjectsDatabasesDocumentsRunQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunQueryCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsRunQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsRunQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8555,34 +10379,34 @@ func (c *ProjectsDatabasesDocumentsPatchCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.document) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest) 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}:runQuery") 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 "firestore.projects.databases.documents.patch" call. -// Exactly one of *Document or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Document.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*Document, error) { +// Do executes the "firestore.projects.databases.documents.runQuery" call. +// Exactly one of *RunQueryResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *RunQueryResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8601,7 +10425,7 @@ func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Document{ + ret := &RunQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8610,54 +10434,31 @@ func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) ( target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil - // { - // "description": "Updates or inserts a document.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}", - // "httpMethod": "PATCH", - // "id": "firestore.projects.databases.documents.patch", + } + return ret, nil + // { + // "description": "Runs a query.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runQuery", + // "httpMethod": "POST", + // "id": "firestore.projects.databases.documents.runQuery", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "currentDocument.exists": { - // "description": "When set to `true`, the target document must exist. When set to `false`, the target document must not exist.", - // "location": "query", - // "type": "boolean" - // }, - // "currentDocument.updateTime": { - // "description": "When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "mask.fieldPaths": { - // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "name": { - // "description": "The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.", + // "parent": { + // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", // "location": "path", // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", // "required": true, // "type": "string" - // }, - // "updateMask.fieldPaths": { - // "description": "The list of field paths in the mask. See Document.fields for a field path syntax reference.", - // "location": "query", - // "repeated": true, - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}:runQuery", // "request": { - // "$ref": "Document" + // "$ref": "RunQueryRequest" // }, // "response": { - // "$ref": "Document" + // "$ref": "RunQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -8667,32 +10468,34 @@ func (c *ProjectsDatabasesDocumentsPatchCall) Do(opts ...googleapi.CallOption) ( } -// method id "firestore.projects.databases.documents.rollback": +// method id "firestore.projects.databases.documents.write": -type ProjectsDatabasesDocumentsRollbackCall struct { - s *Service - database string - rollbackrequest *RollbackRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesDocumentsWriteCall struct { + s *Service + database string + writerequest *WriteRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Rollback: Rolls back a transaction. +// Write: Streams batches of document updates and deletes, in order. +// This method is only available via gRPC or WebChannel (not REST). // // - database: The database name. In the format: -// `projects/{project_id}/databases/{database_id}`. -func (r *ProjectsDatabasesDocumentsService) Rollback(database string, rollbackrequest *RollbackRequest) *ProjectsDatabasesDocumentsRollbackCall { - c := &ProjectsDatabasesDocumentsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_id}/databases/{database_id}`. This is only +// required in the first message. +func (r *ProjectsDatabasesDocumentsService) Write(database string, writerequest *WriteRequest) *ProjectsDatabasesDocumentsWriteCall { + c := &ProjectsDatabasesDocumentsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.database = database - c.rollbackrequest = rollbackrequest + c.writerequest = writerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsRollbackCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRollbackCall { +func (c *ProjectsDatabasesDocumentsWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8700,21 +10503,21 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) Fields(s ...googleapi.Field) *P // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsRollbackCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRollbackCall { +func (c *ProjectsDatabasesDocumentsWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsWriteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsRollbackCall) Header() http.Header { +func (c *ProjectsDatabasesDocumentsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsRollbackCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesDocumentsWriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8722,14 +10525,14 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.writerequest) 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/{+database}/documents:rollback") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/documents:write") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8742,14 +10545,14 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.rollback" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "firestore.projects.databases.documents.write" call. +// Exactly one of *WriteResponse or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *WriteResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) (*WriteResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8768,7 +10571,7 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &WriteResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8780,28 +10583,28 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Rolls back a transaction.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:rollback", + // "description": "Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:write", // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.rollback", + // "id": "firestore.projects.databases.documents.write", // "parameterOrder": [ // "database" // ], // "parameters": { // "database": { - // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`.", + // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. This is only required in the first message.", // "location": "path", // "pattern": "^projects/[^/]+/databases/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+database}/documents:rollback", + // "path": "v1/{+database}/documents:write", // "request": { - // "$ref": "RollbackRequest" + // "$ref": "WriteRequest" // }, // "response": { - // "$ref": "Empty" + // "$ref": "WriteResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -8811,42 +10614,40 @@ func (c *ProjectsDatabasesDocumentsRollbackCall) Do(opts ...googleapi.CallOption } -// method id "firestore.projects.databases.documents.runAggregationQuery": +// method id "firestore.projects.databases.operations.cancel": -type ProjectsDatabasesDocumentsRunAggregationQueryCall struct { - s *Service - parent string - runaggregationqueryrequest *RunAggregationQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RunAggregationQuery: Runs an aggregation query. Rather than producing -// Document results like Firestore.RunQuery, this API allows running an -// aggregation to produce a series of AggregationResult server-side. -// High-Level Example: ``` -- Return the number of documents in table -// given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true -// ); ``` +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - parent: The parent resource name. In the format: -// `projects/{project_id}/databases/{database_id}/documents` or -// `projects/{project_id}/databases/{database_id}/documents/{document_p -// ath}`. For example: -// `projects/my-project/databases/my-database/documents` or -// `projects/my-project/databases/my-database/documents/chatrooms/my-ch -// atroom`. -func (r *ProjectsDatabasesDocumentsService) RunAggregationQuery(parent string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsDatabasesDocumentsRunAggregationQueryCall { - c := &ProjectsDatabasesDocumentsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.runaggregationqueryrequest = runaggregationqueryrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsDatabasesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsDatabasesOperationsCancelCall { + c := &ProjectsDatabasesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunAggregationQueryCall { +func (c *ProjectsDatabasesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8854,21 +10655,21 @@ func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) 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 *ProjectsDatabasesDocumentsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunAggregationQueryCall { +func (c *ProjectsDatabasesOperationsCancelCall) Context(ctx context.Context) *ProjectsDatabasesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Header() http.Header { +func (c *ProjectsDatabasesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8876,14 +10677,14 @@ func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.runaggregationqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:runAggregationQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8891,19 +10692,19 @@ func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) 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 "firestore.projects.databases.documents.runAggregationQuery" call. -// Exactly one of *RunAggregationQueryResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *RunAggregationQueryResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, error) { +// Do executes the "firestore.projects.databases.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8922,7 +10723,7 @@ func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RunAggregationQueryResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8934,28 +10735,28 @@ func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example: ``` -- Return the number of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); ```", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runAggregationQuery", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations/{operationsId}:cancel", // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.runAggregationQuery", + // "id": "firestore.projects.databases.operations.cancel", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "name": { + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "pattern": "^projects/[^/]+/databases/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:runAggregationQuery", + // "path": "v1/{+name}:cancel", // "request": { - // "$ref": "RunAggregationQueryRequest" + // "$ref": "GoogleLongrunningCancelOperationRequest" // }, // "response": { - // "$ref": "RunAggregationQueryResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -8965,37 +10766,32 @@ func (c *ProjectsDatabasesDocumentsRunAggregationQueryCall) Do(opts ...googleapi } -// method id "firestore.projects.databases.documents.runQuery": +// method id "firestore.projects.databases.operations.delete": -type ProjectsDatabasesDocumentsRunQueryCall struct { - s *Service - parent string - runqueryrequest *RunQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RunQuery: Runs a query. +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. // -// - parent: The parent resource name. In the format: -// `projects/{project_id}/databases/{database_id}/documents` or -// `projects/{project_id}/databases/{database_id}/documents/{document_p -// ath}`. For example: -// `projects/my-project/databases/my-database/documents` or -// `projects/my-project/databases/my-database/documents/chatrooms/my-ch -// atroom`. -func (r *ProjectsDatabasesDocumentsService) RunQuery(parent string, runqueryrequest *RunQueryRequest) *ProjectsDatabasesDocumentsRunQueryCall { - c := &ProjectsDatabasesDocumentsRunQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.runqueryrequest = runqueryrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsDatabasesOperationsService) Delete(name string) *ProjectsDatabasesOperationsDeleteCall { + c := &ProjectsDatabasesOperationsDeleteCall{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 *ProjectsDatabasesDocumentsRunQueryCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsRunQueryCall { +func (c *ProjectsDatabasesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9003,21 +10799,21 @@ func (c *ProjectsDatabasesDocumentsRunQueryCall) Fields(s ...googleapi.Field) *P // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsRunQueryCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsRunQueryCall { +func (c *ProjectsDatabasesOperationsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsRunQueryCall) Header() http.Header { +func (c *ProjectsDatabasesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsRunQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -9025,34 +10821,29 @@ func (c *ProjectsDatabasesDocumentsRunQueryCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest) - 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}:runQuery") + 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 "firestore.projects.databases.documents.runQuery" call. -// Exactly one of *RunQueryResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *RunQueryResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption) (*RunQueryResponse, error) { +// Do executes the "firestore.projects.databases.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9071,7 +10862,7 @@ func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RunQueryResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9083,28 +10874,25 @@ func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Runs a query.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents/{documentsId}/{documentsId1}:runQuery", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.runQuery", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "firestore.projects.databases.operations.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/documents/[^/]+/.*$", + // "pattern": "^projects/[^/]+/databases/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}:runQuery", - // "request": { - // "$ref": "RunQueryRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "RunQueryResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -9114,91 +10902,97 @@ func (c *ProjectsDatabasesDocumentsRunQueryCall) Do(opts ...googleapi.CallOption } -// method id "firestore.projects.databases.documents.write": +// method id "firestore.projects.databases.operations.get": -type ProjectsDatabasesDocumentsWriteCall struct { +type ProjectsDatabasesOperationsGetCall struct { s *Service - database string - writerequest *WriteRequest + name string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Write: Streams batches of document updates and deletes, in order. -// This method is only available via gRPC or WebChannel (not REST). +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - database: The database name. In the format: -// `projects/{project_id}/databases/{database_id}`. This is only -// required in the first message. -func (r *ProjectsDatabasesDocumentsService) Write(database string, writerequest *WriteRequest) *ProjectsDatabasesDocumentsWriteCall { - c := &ProjectsDatabasesDocumentsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.database = database - c.writerequest = writerequest +// - name: The name of the operation resource. +func (r *ProjectsDatabasesOperationsService) Get(name string) *ProjectsDatabasesOperationsGetCall { + c := &ProjectsDatabasesOperationsGetCall{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 *ProjectsDatabasesDocumentsWriteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesDocumentsWriteCall { +func (c *ProjectsDatabasesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesDocumentsWriteCall) Context(ctx context.Context) *ProjectsDatabasesDocumentsWriteCall { +func (c *ProjectsDatabasesOperationsGetCall) Context(ctx context.Context) *ProjectsDatabasesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesDocumentsWriteCall) Header() http.Header { +func (c *ProjectsDatabasesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesDocumentsWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesOperationsGetCall) doRequest(alt string) (*http.Response, 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.writerequest) - 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/{+database}/documents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "database": c.database, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.documents.write" call. -// Exactly one of *WriteResponse or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *WriteResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "firestore.projects.databases.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) (*WriteResponse, error) { +func (c *ProjectsDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9217,7 +11011,7 @@ func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &WriteResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9229,28 +11023,25 @@ func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/documents:write", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.documents.write", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.operations.get", // "parameterOrder": [ - // "database" + // "name" // ], // "parameters": { - // "database": { - // "description": "Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. This is only required in the first message.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+database}/documents:write", - // "request": { - // "$ref": "WriteRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "WriteResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -9260,79 +11051,100 @@ func (c *ProjectsDatabasesDocumentsWriteCall) Do(opts ...googleapi.CallOption) ( } -// method id "firestore.projects.databases.operations.cancel": +// method id "firestore.projects.databases.operations.list": -type ProjectsDatabasesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDatabasesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsDatabasesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsDatabasesOperationsCancelCall { - c := &ProjectsDatabasesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsDatabasesOperationsService) List(name string) *ProjectsDatabasesOperationsListCall { + c := &ProjectsDatabasesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsDatabasesOperationsListCall) Filter(filter string) *ProjectsDatabasesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsDatabasesOperationsListCall) PageSize(pageSize int64) *ProjectsDatabasesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsDatabasesOperationsListCall) PageToken(pageToken string) *ProjectsDatabasesOperationsListCall { + 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 *ProjectsDatabasesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsCancelCall { +func (c *ProjectsDatabasesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDatabasesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesOperationsCancelCall) Context(ctx context.Context) *ProjectsDatabasesOperationsCancelCall { +func (c *ProjectsDatabasesOperationsListCall) Context(ctx context.Context) *ProjectsDatabasesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesOperationsCancelCall) Header() http.Header { +func (c *ProjectsDatabasesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDatabasesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err + 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}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -9343,14 +11155,15 @@ func (c *ProjectsDatabasesOperationsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "firestore.projects.databases.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9369,7 +11182,7 @@ func (c *ProjectsDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9381,28 +11194,41 @@ func (c *ProjectsDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "firestore.projects.databases.operations.cancel", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations", + // "httpMethod": "GET", + // "id": "firestore.projects.databases.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/databases/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", - // "request": { - // "$ref": "GoogleLongrunningCancelOperationRequest" - // }, + // "path": "v1/{+name}/operations", // "response": { - // "$ref": "Empty" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -9412,24 +11238,43 @@ func (c *ProjectsDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "firestore.projects.databases.operations.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsDatabasesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsDatabasesOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "firestore.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Get: Gets information about a location. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsDatabasesOperationsService) Delete(name string) *ProjectsDatabasesOperationsDeleteCall { - c := &ProjectsDatabasesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -9437,41 +11282,54 @@ func (r *ProjectsDatabasesOperationsService) Delete(name string) *ProjectsDataba // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsDeleteCall { +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesOperationsDeleteCall) Context(ctx context.Context) *ProjectsDatabasesOperationsDeleteCall { +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -9482,14 +11340,14 @@ func (c *ProjectsDatabasesOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// Do executes the "firestore.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9508,7 +11366,7 @@ func (c *ProjectsDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Location{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9520,25 +11378,25 @@ func (c *ProjectsDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "firestore.projects.databases.operations.delete", + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "firestore.projects.locations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Resource name for the location.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "Location" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -9548,9 +11406,9 @@ func (c *ProjectsDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "firestore.projects.databases.operations.get": +// method id "firestore.projects.locations.list": -type ProjectsDatabasesOperationsGetCall struct { +type ProjectsLocationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -9559,21 +11417,45 @@ type ProjectsDatabasesOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// List: Lists information about the supported locations for this +// service. // -// - name: The name of the operation resource. -func (r *ProjectsDatabasesOperationsService) Get(name string) *ProjectsDatabasesOperationsGetCall { - c := &ProjectsDatabasesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDatabasesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsGetCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9583,7 +11465,7 @@ func (c *ProjectsDatabasesOperationsGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsGetCall { +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -9591,21 +11473,21 @@ func (c *ProjectsDatabasesOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesOperationsGetCall) Context(ctx context.Context) *ProjectsDatabasesOperationsGetCall { +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -9618,7 +11500,7 @@ func (c *ProjectsDatabasesOperationsGetCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9631,14 +11513,14 @@ func (c *ProjectsDatabasesOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "firestore.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9657,7 +11539,7 @@ func (c *ProjectsDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &ListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9669,25 +11551,41 @@ func (c *ProjectsDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations/{operationsId}", + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", // "httpMethod": "GET", - // "id": "firestore.projects.databases.operations.get", + // "id": "firestore.projects.locations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The resource that owns the locations collection, if applicable.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}/locations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "ListLocationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -9697,100 +11595,85 @@ func (c *ProjectsDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "firestore.projects.databases.operations.list": - -type ProjectsDatabasesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. -// -// - name: The name of the operation's parent resource. -func (r *ProjectsDatabasesOperationsService) List(name string) *ProjectsDatabasesOperationsListCall { - c := &ProjectsDatabasesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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) + } } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsDatabasesOperationsListCall) Filter(filter string) *ProjectsDatabasesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} +// method id "firestore.projects.locations.backups.delete": -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsDatabasesOperationsListCall) PageSize(pageSize int64) *ProjectsDatabasesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsDatabasesOperationsListCall) PageToken(pageToken string) *ProjectsDatabasesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Delete: Deletes a backup. +// +// - name: Name of the backup to delete. format is +// `projects/{project}/locations/{location}/backups/{backup}`. +func (r *ProjectsLocationsBackupsService) Delete(name string) *ProjectsLocationsBackupsDeleteCall { + c := &ProjectsLocationsBackupsDeleteCall{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 *ProjectsDatabasesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsDatabasesOperationsListCall { +func (c *ProjectsLocationsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsDatabasesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsDatabasesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDatabasesOperationsListCall) Context(ctx context.Context) *ProjectsDatabasesOperationsListCall { +func (c *ProjectsLocationsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDatabasesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsBackupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDatabasesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := 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 } @@ -9801,15 +11684,14 @@ func (c *ProjectsDatabasesOperationsListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.databases.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "firestore.projects.locations.backups.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9828,7 +11710,7 @@ func (c *ProjectsDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9840,41 +11722,25 @@ func (c *ProjectsDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/databases/{databasesId}/operations", - // "httpMethod": "GET", - // "id": "firestore.projects.databases.operations.list", + // "description": "Deletes a backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", + // "httpMethod": "DELETE", + // "id": "firestore.projects.locations.backups.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. Name of the backup to delete. format is `projects/{project}/locations/{location}/backups/{backup}`.", // "location": "path", - // "pattern": "^projects/[^/]+/databases/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -9884,30 +11750,9 @@ func (c *ProjectsDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsDatabasesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "firestore.projects.locations.get": +// method id "firestore.projects.locations.backups.get": -type ProjectsLocationsGetCall struct { +type ProjectsLocationsBackupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -9916,11 +11761,12 @@ type ProjectsLocationsGetCall struct { header_ http.Header } -// Get: Gets information about a location. +// Get: Gets information about a backup. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the backup to fetch. Format is +// `projects/{project}/locations/{location}/backups/{backup}`. +func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBackupsGetCall { + c := &ProjectsLocationsBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -9928,7 +11774,7 @@ func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9938,7 +11784,7 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -9946,21 +11792,21 @@ func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocati // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsBackupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBackupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -9986,14 +11832,14 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Location.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +// Do executes the "firestore.projects.locations.backups.get" call. +// Exactly one of *GoogleFirestoreAdminV1Backup or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleFirestoreAdminV1Backup.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1Backup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10012,7 +11858,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &GoogleFirestoreAdminV1Backup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10024,25 +11870,25 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "description": "Gets information about a backup.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups/{backupsId}", // "httpMethod": "GET", - // "id": "firestore.projects.locations.get", + // "id": "firestore.projects.locations.backups.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Resource name for the location.", + // "description": "Required. Name of the backup to fetch. Format is `projects/{project}/locations/{location}/backups/{backup}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/backups/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Location" + // "$ref": "GoogleFirestoreAdminV1Backup" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -10052,56 +11898,34 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "firestore.projects.locations.list": +// method id "firestore.projects.locations.backups.list": -type ProjectsLocationsListCall struct { +type ProjectsLocationsBackupsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// List: Lists all the backups. // -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The location to list backups from. Format is +// `projects/{project}/locations/{location}`. Use `{location} = '-'` +// to list backups from all locations for the given project. This +// allows listing backups from a single location or from all +// locations. +func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocationsBackupsListCall { + c := &ProjectsLocationsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10111,7 +11935,7 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *ProjectsLocationsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsListCall { c.ifNoneMatch_ = entityTag return c } @@ -10119,21 +11943,21 @@ func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsBackupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBackupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10146,7 +11970,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10154,19 +11978,21 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "firestore.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +// Do executes the "firestore.projects.locations.backups.list" call. +// Exactly one of *GoogleFirestoreAdminV1ListBackupsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleFirestoreAdminV1ListBackupsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleFirestoreAdminV1ListBackupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10185,7 +12011,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &GoogleFirestoreAdminV1ListBackupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10197,41 +12023,25 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", + // "description": "Lists all the backups.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backups", // "httpMethod": "GET", - // "id": "firestore.projects.locations.list", + // "id": "firestore.projects.locations.backups.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", + // "parent": { + // "description": "Required. The location to list backups from. Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list backups from all locations for the given project. This allows listing backups from a single location or from all locations.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}/locations", + // "path": "v1/{+parent}/backups", // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "GoogleFirestoreAdminV1ListBackupsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -10240,24 +12050,3 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat // } } - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index d0542b50de6..d93997f6d08 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -950,7 +950,7 @@ } } }, - "revision": "20230328", + "revision": "20230508", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -1118,6 +1118,39 @@ }, "type": "object" }, + "BitSequence": { + "description": "A sequence of bits, encoded in a byte array. Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only exception is the last byte, which may store 8 _or fewer_ bits. The `padding` defines the number of bits of the last byte to be ignored as \"padding\". The values of these \"padding\" bits are unspecified and must be ignored. To retrieve the first bit, bit 0, calculate: `(bitmap[0] \u0026 0x01) != 0`. To retrieve the second bit, bit 1, calculate: `(bitmap[0] \u0026 0x02) != 0`. To retrieve the third bit, bit 2, calculate: `(bitmap[0] \u0026 0x04) != 0`. To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] \u0026 0x08) != 0`. To retrieve bit n, calculate: `(bitmap[n / 8] \u0026 (0x01 \u003c\u003c (n % 8))) != 0`. The \"size\" of a `BitSequence` (the number of bits it contains) is calculated by this formula: `(bitmap.length * 8) - padding`.", + "id": "BitSequence", + "properties": { + "bitmap": { + "description": "The bytes that encode the bit sequence. May have a length of zero.", + "format": "byte", + "type": "string" + }, + "padding": { + "description": "The number of bits of the last byte in `bitmap` to ignore as \"padding\". If the length of `bitmap` is zero, then this value must be `0`. Otherwise, this value must be between 0 and 7, inclusive.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BloomFilter": { + "description": "A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). The bloom filter hashes the entries with MD5 and treats the resulting 128-bit hash as 2 distinct 64-bit hash values, interpreted as unsigned integers using 2's complement encoding. These two hash values, named `h1` and `h2`, are then used to compute the `hash_count` hash values using the formula, starting at `i=0`: h(i) = h1 + (i * h2) These resulting values are then taken modulo the number of bits in the bloom filter to get the bits of the bloom filter to test for the given entry.", + "id": "BloomFilter", + "properties": { + "bits": { + "$ref": "BitSequence", + "description": "The bloom filter data." + }, + "hashCount": { + "description": "The number of hashes used by the algorithm.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CollectionSelector": { "description": "A selection of a collection, such as `messages as m1`.", "id": "CollectionSelector", @@ -1397,6 +1430,10 @@ "description": "The target ID to which this filter applies.", "format": "int32", "type": "integer" + }, + "unchangedNames": { + "$ref": "BloomFilter", + "description": "A bloom filter that contains the UTF-8 byte encodings of the resource names of the documents that match target_id, in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}` that have NOT changed since the query results indicated by the resume token or timestamp given in `Target.resume_type`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync." } }, "type": "object" @@ -2367,6 +2404,11 @@ "$ref": "DocumentsTarget", "description": "A target specified by a set of document names." }, + "expectedCount": { + "description": "The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.", + "format": "int32", + "type": "integer" + }, "once": { "description": "If the target should be removed once it is current and consistent.", "type": "boolean" diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 11350d73369..9cb293a3c85 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -527,6 +527,91 @@ func (s *BeginTransactionResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BitSequence: A sequence of bits, encoded in a byte array. Each byte +// in the `bitmap` byte array stores 8 bits of the sequence. The only +// exception is the last byte, which may store 8 _or fewer_ bits. The +// `padding` defines the number of bits of the last byte to be ignored +// as "padding". The values of these "padding" bits are unspecified and +// must be ignored. To retrieve the first bit, bit 0, calculate: +// `(bitmap[0] & 0x01) != 0`. To retrieve the second bit, bit 1, +// calculate: `(bitmap[0] & 0x02) != 0`. To retrieve the third bit, bit +// 2, calculate: `(bitmap[0] & 0x04) != 0`. To retrieve the fourth bit, +// bit 3, calculate: `(bitmap[0] & 0x08) != 0`. To retrieve bit n, +// calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. The "size" of +// a `BitSequence` (the number of bits it contains) is calculated by +// this formula: `(bitmap.length * 8) - padding`. +type BitSequence struct { + // Bitmap: The bytes that encode the bit sequence. May have a length of + // zero. + Bitmap string `json:"bitmap,omitempty"` + + // Padding: The number of bits of the last byte in `bitmap` to ignore as + // "padding". If the length of `bitmap` is zero, then this value must be + // `0`. Otherwise, this value must be between 0 and 7, inclusive. + Padding int64 `json:"padding,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bitmap") 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. "Bitmap") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BitSequence) MarshalJSON() ([]byte, error) { + type NoMethod BitSequence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BloomFilter: A bloom filter +// (https://en.wikipedia.org/wiki/Bloom_filter). The bloom filter hashes +// the entries with MD5 and treats the resulting 128-bit hash as 2 +// distinct 64-bit hash values, interpreted as unsigned integers using +// 2's complement encoding. These two hash values, named `h1` and `h2`, +// are then used to compute the `hash_count` hash values using the +// formula, starting at `i=0`: h(i) = h1 + (i * h2) These resulting +// values are then taken modulo the number of bits in the bloom filter +// to get the bits of the bloom filter to test for the given entry. +type BloomFilter struct { + // Bits: The bloom filter data. + Bits *BitSequence `json:"bits,omitempty"` + + // HashCount: The number of hashes used by the algorithm. + HashCount int64 `json:"hashCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bits") 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. "Bits") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BloomFilter) MarshalJSON() ([]byte, error) { + type NoMethod BloomFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CollectionSelector: A selection of a collection, such as `messages as // m1`. type CollectionSelector struct { @@ -1045,6 +1130,21 @@ type ExistenceFilter struct { // TargetId: The target ID to which this filter applies. TargetId int64 `json:"targetId,omitempty"` + // UnchangedNames: A bloom filter that contains the UTF-8 byte encodings + // of the resource names of the documents that match target_id, in the + // form + // `projects/{project_id}/databases/{database_id}/documents/{document_pat + // h}` that have NOT changed since the query results indicated by the + // resume token or timestamp given in `Target.resume_type`. This bloom + // filter may be omitted at the server's discretion, such as if it is + // deemed that the client will not make use of it or if it is too + // computationally expensive to calculate or transmit. Clients must + // gracefully handle this field being absent by falling back to the + // logic used before this field existed; that is, re-add the target + // without a resume token to figure out which documents in the client's + // cache are out of sync. + UnchangedNames *BloomFilter `json:"unchangedNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2799,6 +2899,13 @@ type Target struct { // Documents: A target specified by a set of document names. Documents *DocumentsTarget `json:"documents,omitempty"` + // ExpectedCount: The number of documents that last matched the query at + // the resume token or read time. This value is only relevant when a + // `resume_type` is provided. This value being present and greater than + // zero signals that the client wants `ExistenceFilter.unchanged_names` + // to be included in the response. + ExpectedCount int64 `json:"expectedCount,omitempty"` + // Once: If the target should be removed once it is current and // consistent. Once bool `json:"once,omitempty"` diff --git a/gkebackup/v1/gkebackup-api.json b/gkebackup/v1/gkebackup-api.json index 44a384de835..6c361110242 100644 --- a/gkebackup/v1/gkebackup-api.json +++ b/gkebackup/v1/gkebackup-api.json @@ -1688,7 +1688,7 @@ } } }, - "revision": "20230308", + "revision": "20230503", "rootUrl": "https://gkebackup.googleapis.com/", "schemas": { "AuditConfig": { @@ -2365,7 +2365,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/gkebackup/v1/gkebackup-gen.go b/gkebackup/v1/gkebackup-gen.go index 35e89e0845e..39f874c60ef 100644 --- a/gkebackup/v1/gkebackup-gen.go +++ b/gkebackup/v1/gkebackup-gen.go @@ -1384,7 +1384,7 @@ func (s *ListVolumeRestoresResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index ada6f3e69fa..09cc65a2987 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -260,6 +260,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/bareMetalAdminClusters/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "View for bare metal admin cluster. When `BASIC` is specified, only the cluster resource name and membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the complete cluster configuration details.", + "enum": [ + "CLUSTER_VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "If the value is not set, the default `FULL` view is used.", + "Includes basic information of a cluster resource including cluster resource name and membership.", + "Includes the complete configuration for bare metal admin cluster resource. This is the default value for GetBareMetalAdminClusterRequest method." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -724,6 +739,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/bareMetalClusters/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "View for bare metal user cluster. When `BASIC` is specified, only the cluster resource name and admin cluster membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the complete cluster configuration details.", + "enum": [ + "CLUSTER_VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "If the value is not set, the default `FULL` view is used.", + "Includes basic information of a cluster resource including cluster resource name and admin cluster membership.", + "Includes the complete configuration for bare metal cluster resource. This is the default value for GetBareMetalClusterRequest method." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -2096,6 +2126,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/vmwareClusters/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "View for VMware user cluster. When `BASIC` is specified, only the cluster resource name and admin cluster membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the complete cluster configuration details.", + "enum": [ + "CLUSTER_VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "If the value is not set, the default `FULL` view is used.", + "Includes basic information of a cluster resource including cluster resource name and admin cluster membership.", + "Includes the complete configuration for VMware cluster resource. This is the default value for GetVmwareClusterRequest method." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -2861,7 +2906,7 @@ } } }, - "revision": "20230426", + "revision": "20230507", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -4214,10 +4259,6 @@ "description": "User provided OnePlatform identifier that is used as part of the resource name. This must be unique among all GKE on-prem clusters within a project and location and will return a 409 if the cluster already exists. This value must be up to 40 characters and follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format.", "type": "string" }, - "localName": { - "description": "The object name of the bare metal OnPremAdminCluster custom resource on the associated admin cluster. This field is used to support conflicting resource names when enrolling existing clusters to the API. When not provided, this field will resolve to the bare_metal_admin_cluster_id. Otherwise, it must match the object name of the bare metal OnPremAdminCluster custom resource. It is not modifiable outside / beyond the enrollment operation.", - "type": "string" - }, "membership": { "description": "Required. This is the full resource name of this admin cluster's fleet membership.", "type": "string" diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index ce43335c5f9..13287c481fd 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -2830,15 +2830,6 @@ type EnrollBareMetalAdminClusterRequest struct { // and follow RFC-1123 (https://tools.ietf.org/html/rfc1123) format. BareMetalAdminClusterId string `json:"bareMetalAdminClusterId,omitempty"` - // LocalName: The object name of the bare metal OnPremAdminCluster - // custom resource on the associated admin cluster. This field is used - // to support conflicting resource names when enrolling existing - // clusters to the API. When not provided, this field will resolve to - // the bare_metal_admin_cluster_id. Otherwise, it must match the object - // name of the bare metal OnPremAdminCluster custom resource. It is not - // modifiable outside / beyond the enrollment operation. - LocalName string `json:"localName,omitempty"` - // Membership: Required. This is the full resource name of this admin // cluster's fleet membership. Membership string `json:"membership,omitempty"` @@ -6796,6 +6787,31 @@ func (r *ProjectsLocationsBareMetalAdminClustersService) Get(name string) *Proje return c } +// View sets the optional parameter "view": View for bare metal admin +// cluster. When `BASIC` is specified, only the cluster resource name +// and membership are returned. The default/unset value +// `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the +// complete cluster configuration details. +// +// Possible values: +// +// "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default +// +// `FULL` view is used. +// +// "BASIC" - Includes basic information of a cluster resource +// +// including cluster resource name and membership. +// +// "FULL" - Includes the complete configuration for bare metal admin +// +// cluster resource. This is the default value for +// GetBareMetalAdminClusterRequest method. +func (c *ProjectsLocationsBareMetalAdminClustersGetCall) View(view string) *ProjectsLocationsBareMetalAdminClustersGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -6909,6 +6925,21 @@ func (c *ProjectsLocationsBareMetalAdminClustersGetCall) Do(opts ...googleapi.Ca // "pattern": "^projects/[^/]+/locations/[^/]+/bareMetalAdminClusters/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "View for bare metal admin cluster. When `BASIC` is specified, only the cluster resource name and membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the complete cluster configuration details.", + // "enum": [ + // "CLUSTER_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "If the value is not set, the default `FULL` view is used.", + // "Includes basic information of a cluster resource including cluster resource name and membership.", + // "Includes the complete configuration for bare metal admin cluster resource. This is the default value for GetBareMetalAdminClusterRequest method." + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", @@ -9033,6 +9064,31 @@ func (r *ProjectsLocationsBareMetalClustersService) Get(name string) *ProjectsLo return c } +// View sets the optional parameter "view": View for bare metal user +// cluster. When `BASIC` is specified, only the cluster resource name +// and admin cluster membership are returned. The default/unset value +// `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the +// complete cluster configuration details. +// +// Possible values: +// +// "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default +// +// `FULL` view is used. +// +// "BASIC" - Includes basic information of a cluster resource +// +// including cluster resource name and admin cluster membership. +// +// "FULL" - Includes the complete configuration for bare metal cluster +// +// resource. This is the default value for GetBareMetalClusterRequest +// method. +func (c *ProjectsLocationsBareMetalClustersGetCall) View(view string) *ProjectsLocationsBareMetalClustersGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9146,6 +9202,21 @@ func (c *ProjectsLocationsBareMetalClustersGetCall) Do(opts ...googleapi.CallOpt // "pattern": "^projects/[^/]+/locations/[^/]+/bareMetalClusters/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "View for bare metal user cluster. When `BASIC` is specified, only the cluster resource name and admin cluster membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the complete cluster configuration details.", + // "enum": [ + // "CLUSTER_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "If the value is not set, the default `FULL` view is used.", + // "Includes basic information of a cluster resource including cluster resource name and admin cluster membership.", + // "Includes the complete configuration for bare metal cluster resource. This is the default value for GetBareMetalClusterRequest method." + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", @@ -15715,6 +15786,31 @@ func (r *ProjectsLocationsVmwareClustersService) Get(name string) *ProjectsLocat return c } +// View sets the optional parameter "view": View for VMware user +// cluster. When `BASIC` is specified, only the cluster resource name +// and admin cluster membership are returned. The default/unset value +// `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the +// complete cluster configuration details. +// +// Possible values: +// +// "CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, the default +// +// `FULL` view is used. +// +// "BASIC" - Includes basic information of a cluster resource +// +// including cluster resource name and admin cluster membership. +// +// "FULL" - Includes the complete configuration for VMware cluster +// +// resource. This is the default value for GetVmwareClusterRequest +// method. +func (c *ProjectsLocationsVmwareClustersGetCall) View(view string) *ProjectsLocationsVmwareClustersGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15828,6 +15924,21 @@ func (c *ProjectsLocationsVmwareClustersGetCall) Do(opts ...googleapi.CallOption // "pattern": "^projects/[^/]+/locations/[^/]+/vmwareClusters/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "View for VMware user cluster. When `BASIC` is specified, only the cluster resource name and admin cluster membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as `FULL', which returns the complete cluster configuration details.", + // "enum": [ + // "CLUSTER_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "If the value is not set, the default `FULL` view is used.", + // "Includes basic information of a cluster resource including cluster resource name and admin cluster membership.", + // "Includes the complete configuration for VMware cluster resource. This is the default value for GetVmwareClusterRequest method." + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index e0083a97d86..21039264205 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -4078,7 +4078,7 @@ } } }, - "revision": "20230427", + "revision": "20230509", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -6495,8 +6495,8 @@ ], "enumDescriptions": [ "No schema type specified. This type is unsupported.", - "Analytics schema defined by the FHIR community. See https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. BigQuery only allows a maximum of 10,000 columns per table. Due to this limitation, the server will not generate schemas for fields of type `Resource`, which can hold any resource type. The affected fields are `Parameters.parameter.resource`, `Bundle.entry.resource`, and `Bundle.entry.response.outcome`.", - "Analytics V2, similar to schema defined by the FHIR community, with added support for extensions with one or more occurrences and contained resources in stringified JSON. Analytics V2 uses more space in the destination table than Analytics V1." + "Analytics schema defined by the FHIR community. See https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. BigQuery only allows a maximum of 10,000 columns per table. Due to this limitation, the server will not generate schemas for fields of type `Resource`, which can hold any resource type. The affected fields are `Parameters.parameter.resource`, `Bundle.entry.resource`, and `Bundle.entry.response.outcome`. Analytics schema does not gracefully handle extensions with one or more occurrences, anaytics schema also does not handle contained resource.", + "Analytics V2, similar to schema defined by the FHIR community, with added support for extensions with one or more occurrences and contained resources in stringified JSON. Analytics V2 uses more space in the destination table than Analytics V1. It is generally recommended to use Analytics V2 over Analytics." ], "type": "string" } diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index aa53c1abc6c..9395052c220 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -5244,11 +5244,14 @@ type SchemaConfig struct { // this limitation, the server will not generate schemas for fields of // type `Resource`, which can hold any resource type. The affected // fields are `Parameters.parameter.resource`, `Bundle.entry.resource`, - // and `Bundle.entry.response.outcome`. + // and `Bundle.entry.response.outcome`. Analytics schema does not + // gracefully handle extensions with one or more occurrences, anaytics + // schema also does not handle contained resource. // "ANALYTICS_V2" - Analytics V2, similar to schema defined by the // FHIR community, with added support for extensions with one or more // occurrences and contained resources in stringified JSON. Analytics V2 - // uses more space in the destination table than Analytics V1. + // uses more space in the destination table than Analytics V1. It is + // generally recommended to use Analytics V2 over Analytics. SchemaType string `json:"schemaType,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 13a538892c5..80feadf7151 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4941,7 +4941,7 @@ } } }, - "revision": "20230427", + "revision": "20230509", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "Action": { @@ -8167,8 +8167,8 @@ "enumDescriptions": [ "No schema type specified. This type is unsupported.", "A data-driven schema generated from the fields present in the FHIR data being exported, with no additional simplification. This type cannot be used for streaming to BigQuery.", - "Analytics schema defined by the FHIR community. See https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. BigQuery only allows a maximum of 10,000 columns per table. Due to this limitation, the server will not generate schemas for fields of type `Resource`, which can hold any resource type. The affected fields are `Parameters.parameter.resource`, `Bundle.entry.resource`, and `Bundle.entry.response.outcome`.", - "Analytics V2, similar to schema defined by the FHIR community, with added support for extensions with one or more occurrences and contained resources in stringified JSON. Analytics V2 uses more space in the destination table than Analytics V1." + "Analytics schema defined by the FHIR community. See https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md. BigQuery only allows a maximum of 10,000 columns per table. Due to this limitation, the server will not generate schemas for fields of type `Resource`, which can hold any resource type. The affected fields are `Parameters.parameter.resource`, `Bundle.entry.resource`, and `Bundle.entry.response.outcome`. Analytics schema does not gracefully handle extensions with one or more occurrences, anaytics schema also does not handle contained resource.", + "Analytics V2, similar to schema defined by the FHIR community, with added support for extensions with one or more occurrences and contained resources in stringified JSON. Analytics V2 uses more space in the destination table than Analytics V1. It is generally recommended to use Analytics V2 over Analytics." ], "type": "string" } diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 2f621e09c1a..3d02e25627f 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -6783,11 +6783,14 @@ type SchemaConfig struct { // this limitation, the server will not generate schemas for fields of // type `Resource`, which can hold any resource type. The affected // fields are `Parameters.parameter.resource`, `Bundle.entry.resource`, - // and `Bundle.entry.response.outcome`. + // and `Bundle.entry.response.outcome`. Analytics schema does not + // gracefully handle extensions with one or more occurrences, anaytics + // schema also does not handle contained resource. // "ANALYTICS_V2" - Analytics V2, similar to schema defined by the // FHIR community, with added support for extensions with one or more // occurrences and contained resources in stringified JSON. Analytics V2 - // uses more space in the destination table than Analytics V1. + // uses more space in the destination table than Analytics V1. It is + // generally recommended to use Analytics V2 over Analytics. SchemaType string `json:"schemaType,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/identitytoolkit/v1/identitytoolkit-api.json b/identitytoolkit/v1/identitytoolkit-api.json index 9a29a8f6bcd..ec13a3e7ff1 100644 --- a/identitytoolkit/v1/identitytoolkit-api.json +++ b/identitytoolkit/v1/identitytoolkit-api.json @@ -1237,7 +1237,7 @@ } } }, - "revision": "20230421", + "revision": "20230508", "rootUrl": "https://identitytoolkit.googleapis.com/", "schemas": { "GoogleCloudIdentitytoolkitV1Argon2Parameters": { @@ -3219,6 +3219,13 @@ "registered": { "description": "Whether the email is for an existing account. Always true.", "type": "boolean" + }, + "userNotifications": { + "description": "Warning notifications for the user.", + "items": { + "$ref": "GoogleCloudIdentitytoolkitV1UserNotification" + }, + "type": "array" } }, "type": "object" @@ -3725,6 +3732,39 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitV1UserNotification": { + "description": "Warning notifications for the user.", + "id": "GoogleCloudIdentitytoolkitV1UserNotification", + "properties": { + "notificationCode": { + "description": "Warning notification enum. Can be used for localization.", + "enum": [ + "NOTIFICATION_CODE_UNSPECIFIED", + "MISSING_LOWERCASE_CHARACTER", + "MISSING_UPPERCASE_CHARACTER", + "MISSING_NUMERIC_CHARACTER", + "MISSING_NON_ALPHANUMERIC_CHARACTER", + "MINIMUM_PASSWORD_LENGTH", + "MAXIMUM_PASSWORD_LENGTH" + ], + "enumDescriptions": [ + "No notification specified.", + "Password missing lowercase character.", + "Password missing uppercase character.", + "Password missing numeric character.", + "Password missing non alphanumeric character.", + "Password less than minimum required length.", + "Password greater than maximum required length." + ], + "type": "string" + }, + "notificationMessage": { + "description": "Warning notification string. Can be used as fallback.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitV1VerifyIosClientRequest": { "description": "Request message for VerifyIosClient", "id": "GoogleCloudIdentitytoolkitV1VerifyIosClientRequest", diff --git a/identitytoolkit/v1/identitytoolkit-gen.go b/identitytoolkit/v1/identitytoolkit-gen.go index 3579badf9bb..45b2ac5c533 100644 --- a/identitytoolkit/v1/identitytoolkit-gen.go +++ b/identitytoolkit/v1/identitytoolkit-gen.go @@ -3106,6 +3106,9 @@ type GoogleCloudIdentitytoolkitV1SignInWithPasswordResponse struct { // true. Registered bool `json:"registered,omitempty"` + // UserNotifications: Warning notifications for the user. + UserNotifications []*GoogleCloudIdentitytoolkitV1UserNotification `json:"userNotifications,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -3807,6 +3810,55 @@ func (s *GoogleCloudIdentitytoolkitV1UserInfo) UnmarshalJSON(data []byte) error return nil } +// GoogleCloudIdentitytoolkitV1UserNotification: Warning notifications +// for the user. +type GoogleCloudIdentitytoolkitV1UserNotification struct { + // NotificationCode: Warning notification enum. Can be used for + // localization. + // + // Possible values: + // "NOTIFICATION_CODE_UNSPECIFIED" - No notification specified. + // "MISSING_LOWERCASE_CHARACTER" - Password missing lowercase + // character. + // "MISSING_UPPERCASE_CHARACTER" - Password missing uppercase + // character. + // "MISSING_NUMERIC_CHARACTER" - Password missing numeric character. + // "MISSING_NON_ALPHANUMERIC_CHARACTER" - Password missing non + // alphanumeric character. + // "MINIMUM_PASSWORD_LENGTH" - Password less than minimum required + // length. + // "MAXIMUM_PASSWORD_LENGTH" - Password greater than maximum required + // length. + NotificationCode string `json:"notificationCode,omitempty"` + + // NotificationMessage: Warning notification string. Can be used as + // fallback. + NotificationMessage string `json:"notificationMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NotificationCode") 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. "NotificationCode") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitV1UserNotification) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitV1UserNotification + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudIdentitytoolkitV1VerifyIosClientRequest: Request message // for VerifyIosClient type GoogleCloudIdentitytoolkitV1VerifyIosClientRequest struct { diff --git a/identitytoolkit/v2/identitytoolkit-api.json b/identitytoolkit/v2/identitytoolkit-api.json index 4a756d6b6e3..25bf6d9de15 100644 --- a/identitytoolkit/v2/identitytoolkit-api.json +++ b/identitytoolkit/v2/identitytoolkit-api.json @@ -1660,6 +1660,27 @@ }, "v2": { "methods": { + "getPasswordPolicy": { + "description": "Gets password policy config set on the project or tenant.", + "flatPath": "v2/passwordPolicy", + "httpMethod": "GET", + "id": "identitytoolkit.getPasswordPolicy", + "parameterOrder": [], + "parameters": { + "tenantId": { + "description": "The id of a tenant.", + "location": "query", + "type": "string" + } + }, + "path": "v2/passwordPolicy", + "response": { + "$ref": "GoogleCloudIdentitytoolkitV2PasswordPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getRecaptchaConfig": { "description": "Gets parameters needed for reCAPTCHA analysis.", "flatPath": "v2/recaptchaConfig", @@ -1714,7 +1735,7 @@ } } }, - "revision": "20230414", + "revision": "20230508", "rootUrl": "https://identitytoolkit.googleapis.com/", "schemas": { "GoogleCloudIdentitytoolkitAdminV2AllowByDefault": { @@ -1905,6 +1926,10 @@ "$ref": "GoogleCloudIdentitytoolkitAdminV2NotificationConfig", "description": "Configuration related to sending notifications to users." }, + "passwordPolicyConfig": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig", + "description": "The project level password policy configuration." + }, "quota": { "$ref": "GoogleCloudIdentitytoolkitAdminV2QuotaConfig", "description": "Configuration related to quotas." @@ -1939,6 +1964,39 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions": { + "description": "Custom strength options to enforce on user passwords.", + "id": "GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions", + "properties": { + "containsLowercaseCharacter": { + "description": "The password must contain a lower case character.", + "type": "boolean" + }, + "containsNonAlphanumericCharacter": { + "description": "The password must contain a non alpha numeric character.", + "type": "boolean" + }, + "containsNumericCharacter": { + "description": "The password must contain a number.", + "type": "boolean" + }, + "containsUppercaseCharacter": { + "description": "The password must contain an upper case character.", + "type": "boolean" + }, + "maxPasswordLength": { + "description": "Maximum password length. No default max length", + "format": "int32", + "type": "integer" + }, + "minPasswordLength": { + "description": "Minimum password length. Range from 6 to 30", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitAdminV2DefaultSupportedIdp": { "description": "Standard Identity Toolkit-trusted IDPs.", "id": "GoogleCloudIdentitytoolkitAdminV2DefaultSupportedIdp", @@ -2505,6 +2563,61 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig": { + "description": "The configuration for the password policy on the project.", + "id": "GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig", + "properties": { + "forceUpgradeOnSignin": { + "description": "Users must have a password compliant with the password policy to sign-in.", + "type": "boolean" + }, + "lastUpdateTime": { + "description": "Output only. The last time the password policy on the project was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "passwordPolicyEnforcementState": { + "description": "Which enforcement mode to use for the password policy.", + "enum": [ + "PASSWORD_POLICY_ENFORCEMENT_STATE_UNSPECIFIED", + "OFF", + "ENFORCE" + ], + "enumDescriptions": [ + "Illegal State, should not be used.", + "Password Policy will not be used on the project.", + "Passwords non-compliant with the password policy will be rejected with an error thrown." + ], + "type": "string" + }, + "passwordPolicyVersions": { + "description": "Must be of length 1. Contains the strength attributes for the password policy.", + "items": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion": { + "description": "The strength attributes for the password policy on the project.", + "id": "GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion", + "properties": { + "customStrengthOptions": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions", + "description": "The custom strength options enforced by the password policy." + }, + "schemaVersion": { + "description": "Output only. schema version number for the password policy", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitAdminV2Permissions": { "description": "Configuration related to restricting a user's ability to affect their account.", "id": "GoogleCloudIdentitytoolkitAdminV2Permissions", @@ -2965,6 +3078,10 @@ "readOnly": true, "type": "string" }, + "passwordPolicyConfig": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig", + "description": "The tenant-level password policy config" + }, "recaptchaConfig": { "$ref": "GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig", "description": "The tenant-level reCAPTCHA config." @@ -3132,6 +3249,39 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitV2CustomStrengthOptions": { + "description": "Custom strength options to enforce on user passwords.", + "id": "GoogleCloudIdentitytoolkitV2CustomStrengthOptions", + "properties": { + "containsLowercaseCharacter": { + "description": "The password must contain a lower case character.", + "type": "boolean" + }, + "containsNonAlphanumericCharacter": { + "description": "The password must contain a non alpha numeric character.", + "type": "boolean" + }, + "containsNumericCharacter": { + "description": "The password must contain a number.", + "type": "boolean" + }, + "containsUppercaseCharacter": { + "description": "The password must contain an upper case character.", + "type": "boolean" + }, + "maxPasswordLength": { + "description": "Maximum password length. No default max length", + "format": "int32", + "type": "integer" + }, + "minPasswordLength": { + "description": "Minimum password length. Range from 6 to 30", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitV2FinalizeMfaEnrollmentRequest": { "description": "Finishes enrolling a second factor for the user.", "id": "GoogleCloudIdentitytoolkitV2FinalizeMfaEnrollmentRequest", @@ -3372,6 +3522,31 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitV2PasswordPolicy": { + "description": "Configuration for password policy.", + "id": "GoogleCloudIdentitytoolkitV2PasswordPolicy", + "properties": { + "allowedNonAlphanumericCharacters": { + "description": "Output only. Allowed characters which satisfy the non_alphanumeric requirement.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "customStrengthOptions": { + "$ref": "GoogleCloudIdentitytoolkitV2CustomStrengthOptions", + "description": "The custom strength options enforced by the password policy." + }, + "schemaVersion": { + "description": "Output only. schema version number for the password policy", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitV2PublicKeyCredentialCreationOptions": { "description": "Parameters for creating a FIDO key.", "id": "GoogleCloudIdentitytoolkitV2PublicKeyCredentialCreationOptions", diff --git a/identitytoolkit/v2/identitytoolkit-gen.go b/identitytoolkit/v2/identitytoolkit-gen.go index 0f0327324c8..01baa174075 100644 --- a/identitytoolkit/v2/identitytoolkit-gen.go +++ b/identitytoolkit/v2/identitytoolkit-gen.go @@ -678,6 +678,10 @@ type GoogleCloudIdentitytoolkitAdminV2Config struct { // users. Notification *GoogleCloudIdentitytoolkitAdminV2NotificationConfig `json:"notification,omitempty"` + // PasswordPolicyConfig: The project level password policy + // configuration. + PasswordPolicyConfig *GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig `json:"passwordPolicyConfig,omitempty"` + // Quota: Configuration related to quotas. Quota *GoogleCloudIdentitytoolkitAdminV2QuotaConfig `json:"quota,omitempty"` @@ -727,6 +731,55 @@ func (s *GoogleCloudIdentitytoolkitAdminV2Config) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions: Custom +// strength options to enforce on user passwords. +type GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions struct { + // ContainsLowercaseCharacter: The password must contain a lower case + // character. + ContainsLowercaseCharacter bool `json:"containsLowercaseCharacter,omitempty"` + + // ContainsNonAlphanumericCharacter: The password must contain a non + // alpha numeric character. + ContainsNonAlphanumericCharacter bool `json:"containsNonAlphanumericCharacter,omitempty"` + + // ContainsNumericCharacter: The password must contain a number. + ContainsNumericCharacter bool `json:"containsNumericCharacter,omitempty"` + + // ContainsUppercaseCharacter: The password must contain an upper case + // character. + ContainsUppercaseCharacter bool `json:"containsUppercaseCharacter,omitempty"` + + // MaxPasswordLength: Maximum password length. No default max length + MaxPasswordLength int64 `json:"maxPasswordLength,omitempty"` + + // MinPasswordLength: Minimum password length. Range from 6 to 30 + MinPasswordLength int64 `json:"minPasswordLength,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ContainsLowercaseCharacter") 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. + // "ContainsLowercaseCharacter") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudIdentitytoolkitAdminV2DefaultSupportedIdp: Standard // Identity Toolkit-trusted IDPs. type GoogleCloudIdentitytoolkitAdminV2DefaultSupportedIdp struct { @@ -1708,6 +1761,93 @@ func (s *GoogleCloudIdentitytoolkitAdminV2OAuthResponseType) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig: The +// configuration for the password policy on the project. +type GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig struct { + // ForceUpgradeOnSignin: Users must have a password compliant with the + // password policy to sign-in. + ForceUpgradeOnSignin bool `json:"forceUpgradeOnSignin,omitempty"` + + // LastUpdateTime: Output only. The last time the password policy on the + // project was updated. + LastUpdateTime string `json:"lastUpdateTime,omitempty"` + + // PasswordPolicyEnforcementState: Which enforcement mode to use for the + // password policy. + // + // Possible values: + // "PASSWORD_POLICY_ENFORCEMENT_STATE_UNSPECIFIED" - Illegal State, + // should not be used. + // "OFF" - Password Policy will not be used on the project. + // "ENFORCE" - Passwords non-compliant with the password policy will + // be rejected with an error thrown. + PasswordPolicyEnforcementState string `json:"passwordPolicyEnforcementState,omitempty"` + + // PasswordPolicyVersions: Must be of length 1. Contains the strength + // attributes for the password policy. + PasswordPolicyVersions []*GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion `json:"passwordPolicyVersions,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ForceUpgradeOnSignin") 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. "ForceUpgradeOnSignin") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion: The strength +// attributes for the password policy on the project. +type GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion struct { + // CustomStrengthOptions: The custom strength options enforced by the + // password policy. + CustomStrengthOptions *GoogleCloudIdentitytoolkitAdminV2CustomStrengthOptions `json:"customStrengthOptions,omitempty"` + + // SchemaVersion: Output only. schema version number for the password + // policy + SchemaVersion int64 `json:"schemaVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CustomStrengthOptions") 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. "CustomStrengthOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2PasswordPolicyVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudIdentitytoolkitAdminV2Permissions: Configuration related // to restricting a user's ability to affect their account. type GoogleCloudIdentitytoolkitAdminV2Permissions struct { @@ -2453,6 +2593,9 @@ type GoogleCloudIdentitytoolkitAdminV2Tenant struct { // "projects/{project-id}/tenants/{tenant-id}" Name string `json:"name,omitempty"` + // PasswordPolicyConfig: The tenant-level password policy config + PasswordPolicyConfig *GoogleCloudIdentitytoolkitAdminV2PasswordPolicyConfig `json:"passwordPolicyConfig,omitempty"` + // RecaptchaConfig: The tenant-level reCAPTCHA config. RecaptchaConfig *GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig `json:"recaptchaConfig,omitempty"` @@ -2781,6 +2924,55 @@ func (s *GoogleCloudIdentitytoolkitV2AutoRetrievalInfo) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudIdentitytoolkitV2CustomStrengthOptions: Custom strength +// options to enforce on user passwords. +type GoogleCloudIdentitytoolkitV2CustomStrengthOptions struct { + // ContainsLowercaseCharacter: The password must contain a lower case + // character. + ContainsLowercaseCharacter bool `json:"containsLowercaseCharacter,omitempty"` + + // ContainsNonAlphanumericCharacter: The password must contain a non + // alpha numeric character. + ContainsNonAlphanumericCharacter bool `json:"containsNonAlphanumericCharacter,omitempty"` + + // ContainsNumericCharacter: The password must contain a number. + ContainsNumericCharacter bool `json:"containsNumericCharacter,omitempty"` + + // ContainsUppercaseCharacter: The password must contain an upper case + // character. + ContainsUppercaseCharacter bool `json:"containsUppercaseCharacter,omitempty"` + + // MaxPasswordLength: Maximum password length. No default max length + MaxPasswordLength int64 `json:"maxPasswordLength,omitempty"` + + // MinPasswordLength: Minimum password length. Range from 6 to 30 + MinPasswordLength int64 `json:"minPasswordLength,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ContainsLowercaseCharacter") 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. + // "ContainsLowercaseCharacter") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitV2CustomStrengthOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitV2CustomStrengthOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudIdentitytoolkitV2FinalizeMfaEnrollmentRequest: Finishes // enrolling a second factor for the user. type GoogleCloudIdentitytoolkitV2FinalizeMfaEnrollmentRequest struct { @@ -3257,6 +3449,50 @@ func (s *GoogleCloudIdentitytoolkitV2MfaTotpSignInRequestInfo) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudIdentitytoolkitV2PasswordPolicy: Configuration for +// password policy. +type GoogleCloudIdentitytoolkitV2PasswordPolicy struct { + // AllowedNonAlphanumericCharacters: Output only. Allowed characters + // which satisfy the non_alphanumeric requirement. + AllowedNonAlphanumericCharacters []string `json:"allowedNonAlphanumericCharacters,omitempty"` + + // CustomStrengthOptions: The custom strength options enforced by the + // password policy. + CustomStrengthOptions *GoogleCloudIdentitytoolkitV2CustomStrengthOptions `json:"customStrengthOptions,omitempty"` + + // SchemaVersion: Output only. schema version number for the password + // policy + SchemaVersion int64 `json:"schemaVersion,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AllowedNonAlphanumericCharacters") 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. + // "AllowedNonAlphanumericCharacters") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitV2PasswordPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitV2PasswordPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudIdentitytoolkitV2PublicKeyCredentialCreationOptions: // Parameters for creating a FIDO key. type GoogleCloudIdentitytoolkitV2PublicKeyCredentialCreationOptions struct { @@ -12691,6 +12927,150 @@ func (c *ProjectsTenantsOauthIdpConfigsPatchCall) Do(opts ...googleapi.CallOptio } +// method id "identitytoolkit.getPasswordPolicy": + +type V2GetPasswordPolicyCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetPasswordPolicy: Gets password policy config set on the project or +// tenant. +func (r *V2Service) GetPasswordPolicy() *V2GetPasswordPolicyCall { + c := &V2GetPasswordPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// TenantId sets the optional parameter "tenantId": The id of a tenant. +func (c *V2GetPasswordPolicyCall) TenantId(tenantId string) *V2GetPasswordPolicyCall { + c.urlParams_.Set("tenantId", tenantId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *V2GetPasswordPolicyCall) Fields(s ...googleapi.Field) *V2GetPasswordPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *V2GetPasswordPolicyCall) IfNoneMatch(entityTag string) *V2GetPasswordPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *V2GetPasswordPolicyCall) Context(ctx context.Context) *V2GetPasswordPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *V2GetPasswordPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *V2GetPasswordPolicyCall) doRequest(alt string) (*http.Response, 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, "v2/passwordPolicy") + 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 "identitytoolkit.getPasswordPolicy" call. +// Exactly one of *GoogleCloudIdentitytoolkitV2PasswordPolicy or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudIdentitytoolkitV2PasswordPolicy.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *V2GetPasswordPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudIdentitytoolkitV2PasswordPolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudIdentitytoolkitV2PasswordPolicy{ + ServerResponse: googleapi.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 password policy config set on the project or tenant.", + // "flatPath": "v2/passwordPolicy", + // "httpMethod": "GET", + // "id": "identitytoolkit.getPasswordPolicy", + // "parameterOrder": [], + // "parameters": { + // "tenantId": { + // "description": "The id of a tenant.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/passwordPolicy", + // "response": { + // "$ref": "GoogleCloudIdentitytoolkitV2PasswordPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "identitytoolkit.getRecaptchaConfig": type V2GetRecaptchaConfigCall struct { diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index b3c7a8d5682..ef7f3eb8ba9 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -7007,7 +7007,7 @@ } } }, - "revision": "20230421", + "revision": "20230505", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryDataset": { @@ -7345,7 +7345,7 @@ "type": "string" }, "referer": { - "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", + "description": "The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).", "type": "string" }, "remoteIp": { diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index f54adeefe30..fcce7f2b511 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -1453,7 +1453,7 @@ type HttpRequest struct { // Referer: The referer URL of the request, as defined in HTTP/1.1 // Header Field Definitions - // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + // (https://datatracker.ietf.org/doc/html/rfc2616#section-14.36). Referer string `json:"referer,omitempty"` // RemoteIp: The IP address (IPv4 or IPv6) of the client that issued the diff --git a/managedidentities/v1/managedidentities-api.json b/managedidentities/v1/managedidentities-api.json index f3b01b98d25..9a53e890f16 100644 --- a/managedidentities/v1/managedidentities-api.json +++ b/managedidentities/v1/managedidentities-api.json @@ -295,6 +295,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "disableMigration": { + "description": "Disable Domain Migration", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:disableMigration", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.disableMigration", + "parameterOrder": [ + "domain" + ], + "parameters": { + "domain": { + "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+domain}:disableMigration", + "request": { + "$ref": "DisableMigrationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "domainJoinMachine": { "description": "DomainJoinMachine API joins a Compute Engine VM to the domain", "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:domainJoinMachine", @@ -323,6 +351,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "enableMigration": { + "description": "Enable Domain Migration", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:enableMigration", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.enableMigration", + "parameterOrder": [ + "domain" + ], + "parameters": { + "domain": { + "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+domain}:enableMigration", + "request": { + "$ref": "EnableMigrationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "extendSchema": { "description": "Extend Schema for Domain", "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:extendSchema", @@ -1431,7 +1487,7 @@ } } }, - "revision": "20230323", + "revision": "20230505", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1642,6 +1698,12 @@ }, "type": "object" }, + "DisableMigrationRequest": { + "description": "DisableMigrationRequest is the request message for DisableMigration method.", + "id": "DisableMigrationRequest", + "properties": {}, + "type": "object" + }, "Domain": { "description": "Represents a managed Microsoft Active Directory domain. If the domain is being changed, it will be placed into the UPDATING state, which indicates that the resource is being reconciled. At this point, Get will reflect an intermediate state.", "id": "Domain", @@ -1777,6 +1839,20 @@ "properties": {}, "type": "object" }, + "EnableMigrationRequest": { + "description": "EnableMigrationRequest is the request message for EnableMigration method.", + "id": "EnableMigrationRequest", + "properties": { + "migratingDomains": { + "description": "Required. List of the on-prem domains to be migrated.", + "items": { + "$ref": "OnPremDomainDetails" + }, + "type": "array" + } + }, + "type": "object" + }, "Expr": { "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", "id": "Expr", @@ -2396,7 +2472,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { @@ -2494,6 +2570,21 @@ }, "type": "object" }, + "OnPremDomainDetails": { + "description": "OnPremDomainDetails is the message which contains details of on-prem domain which is trusted and needs to be migrated.", + "id": "OnPremDomainDetails", + "properties": { + "disableSidFiltering": { + "description": "Optional. Option to disable SID filtering.", + "type": "boolean" + }, + "domainName": { + "description": "Required. FQDN of the on-prem domain being migrated.", + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", diff --git a/managedidentities/v1/managedidentities-gen.go b/managedidentities/v1/managedidentities-gen.go index de5276cc43c..5e94ba43af1 100644 --- a/managedidentities/v1/managedidentities-gen.go +++ b/managedidentities/v1/managedidentities-gen.go @@ -601,6 +601,11 @@ func (s *DetachTrustRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DisableMigrationRequest: DisableMigrationRequest is the request +// message for DisableMigration method. +type DisableMigrationRequest struct { +} + // Domain: Represents a managed Microsoft Active Directory domain. If // the domain is being changed, it will be placed into the UPDATING // state, which indicates that the resource is being reconciled. At this @@ -785,6 +790,37 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// EnableMigrationRequest: EnableMigrationRequest is the request message +// for EnableMigration method. +type EnableMigrationRequest struct { + // MigratingDomains: Required. List of the on-prem domains to be + // migrated. + MigratingDomains []*OnPremDomainDetails `json:"migratingDomains,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MigratingDomains") 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. "MigratingDomains") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *EnableMigrationRequest) MarshalJSON() ([]byte, error) { + type NoMethod EnableMigrationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Expr: Represents a textual expression in the Common Expression // Language (CEL) syntax. CEL is a C-like expression language. The // syntax and semantics of CEL are documented at @@ -1821,7 +1857,7 @@ func (s *ListSqlIntegrationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". @@ -1964,6 +2000,40 @@ func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OnPremDomainDetails: OnPremDomainDetails is the message which +// contains details of on-prem domain which is trusted and needs to be +// migrated. +type OnPremDomainDetails struct { + // DisableSidFiltering: Optional. Option to disable SID filtering. + DisableSidFiltering bool `json:"disableSidFiltering,omitempty"` + + // DomainName: Required. FQDN of the on-prem domain being migrated. + DomainName string `json:"domainName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableSidFiltering") + // 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. "DisableSidFiltering") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *OnPremDomainDetails) MarshalJSON() ([]byte, error) { + type NoMethod OnPremDomainDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -3782,6 +3852,149 @@ func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Do(opts ...googleapi.Cal } +// method id "managedidentities.projects.locations.global.domains.disableMigration": + +type ProjectsLocationsGlobalDomainsDisableMigrationCall struct { + s *Service + domain string + disablemigrationrequest *DisableMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DisableMigration: Disable Domain Migration +// +// - domain: The domain resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}`. +func (r *ProjectsLocationsGlobalDomainsService) DisableMigration(domain string, disablemigrationrequest *DisableMigrationRequest) *ProjectsLocationsGlobalDomainsDisableMigrationCall { + c := &ProjectsLocationsGlobalDomainsDisableMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.domain = domain + c.disablemigrationrequest = disablemigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGlobalDomainsDisableMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsDisableMigrationCall { + 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 *ProjectsLocationsGlobalDomainsDisableMigrationCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsDisableMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalDomainsDisableMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsDisableMigrationCall) doRequest(alt string) (*http.Response, 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.disablemigrationrequest) + 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/{+domain}:disableMigration") + 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{ + "domain": c.domain, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.disableMigration" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalDomainsDisableMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Disable Domain Migration", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:disableMigration", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.disableMigration", + // "parameterOrder": [ + // "domain" + // ], + // "parameters": { + // "domain": { + // "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+domain}:disableMigration", + // "request": { + // "$ref": "DisableMigrationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "managedidentities.projects.locations.global.domains.domainJoinMachine": type ProjectsLocationsGlobalDomainsDomainJoinMachineCall struct { @@ -3926,6 +4139,149 @@ func (c *ProjectsLocationsGlobalDomainsDomainJoinMachineCall) Do(opts ...googlea } +// method id "managedidentities.projects.locations.global.domains.enableMigration": + +type ProjectsLocationsGlobalDomainsEnableMigrationCall struct { + s *Service + domain string + enablemigrationrequest *EnableMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EnableMigration: Enable Domain Migration +// +// - domain: The domain resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}`. +func (r *ProjectsLocationsGlobalDomainsService) EnableMigration(domain string, enablemigrationrequest *EnableMigrationRequest) *ProjectsLocationsGlobalDomainsEnableMigrationCall { + c := &ProjectsLocationsGlobalDomainsEnableMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.domain = domain + c.enablemigrationrequest = enablemigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGlobalDomainsEnableMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsEnableMigrationCall { + 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 *ProjectsLocationsGlobalDomainsEnableMigrationCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsEnableMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalDomainsEnableMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsEnableMigrationCall) doRequest(alt string) (*http.Response, 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.enablemigrationrequest) + 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/{+domain}:enableMigration") + 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{ + "domain": c.domain, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.enableMigration" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalDomainsEnableMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Enable Domain Migration", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:enableMigration", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.enableMigration", + // "parameterOrder": [ + // "domain" + // ], + // "parameters": { + // "domain": { + // "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+domain}:enableMigration", + // "request": { + // "$ref": "EnableMigrationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "managedidentities.projects.locations.global.domains.extendSchema": type ProjectsLocationsGlobalDomainsExtendSchemaCall struct { diff --git a/managedidentities/v1alpha1/managedidentities-api.json b/managedidentities/v1alpha1/managedidentities-api.json index 5355626bda6..1a9d09eda19 100644 --- a/managedidentities/v1alpha1/managedidentities-api.json +++ b/managedidentities/v1alpha1/managedidentities-api.json @@ -1515,7 +1515,7 @@ } } }, - "revision": "20230323", + "revision": "20230505", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -2533,7 +2533,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/managedidentities/v1alpha1/managedidentities-gen.go b/managedidentities/v1alpha1/managedidentities-gen.go index 2d82e29df9b..019d0b2cd01 100644 --- a/managedidentities/v1alpha1/managedidentities-gen.go +++ b/managedidentities/v1alpha1/managedidentities-gen.go @@ -1912,7 +1912,7 @@ func (s *ListSQLIntegrationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/managedidentities/v1beta1/managedidentities-api.json b/managedidentities/v1beta1/managedidentities-api.json index 5af0416f0f8..f92ec31a613 100644 --- a/managedidentities/v1beta1/managedidentities-api.json +++ b/managedidentities/v1beta1/managedidentities-api.json @@ -1515,7 +1515,7 @@ } } }, - "revision": "20230323", + "revision": "20230505", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -2543,7 +2543,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/managedidentities/v1beta1/managedidentities-gen.go b/managedidentities/v1beta1/managedidentities-gen.go index 0e8a901872f..48e49343295 100644 --- a/managedidentities/v1beta1/managedidentities-gen.go +++ b/managedidentities/v1beta1/managedidentities-gen.go @@ -1920,7 +1920,7 @@ func (s *ListSqlIntegrationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index b6cedb02d04..11caf9f4de8 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20230420", + "revision": "20230504", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1080,7 +1080,7 @@ "MEMCACHE_1_5" ], "enumDescriptions": [ - "", + "Memcache version is not specified by customer", "Memcached 1.5 version." ], "type": "string" diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index 9c1dda4968b..f46df095cb4 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -1018,7 +1018,8 @@ type Instance struct { // minor version. // // Possible values: - // "MEMCACHE_VERSION_UNSPECIFIED" + // "MEMCACHE_VERSION_UNSPECIFIED" - Memcache version is not specified + // by customer // "MEMCACHE_1_5" - Memcached 1.5 version. MemcacheVersion string `json:"memcacheVersion,omitempty"` diff --git a/memcache/v1beta2/memcache-api.json b/memcache/v1beta2/memcache-api.json index ad70ee25d25..78613f568d8 100644 --- a/memcache/v1beta2/memcache-api.json +++ b/memcache/v1beta2/memcache-api.json @@ -584,7 +584,7 @@ } } }, - "revision": "20230420", + "revision": "20230504", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1126,7 +1126,7 @@ "MEMCACHE_1_5" ], "enumDescriptions": [ - "", + "Memcache version is not specified by customer", "Memcached 1.5 version." ], "type": "string" diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index 005ab99ec14..fa34b34911a 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -1051,7 +1051,8 @@ type Instance struct { // minor version. // // Possible values: - // "MEMCACHE_VERSION_UNSPECIFIED" + // "MEMCACHE_VERSION_UNSPECIFIED" - Memcache version is not specified + // by customer // "MEMCACHE_1_5" - Memcached 1.5 version. MemcacheVersion string `json:"memcacheVersion,omitempty"` diff --git a/migrationcenter/v1alpha1/migrationcenter-api.json b/migrationcenter/v1alpha1/migrationcenter-api.json index 59a2be84f08..0832da11c21 100644 --- a/migrationcenter/v1alpha1/migrationcenter-api.json +++ b/migrationcenter/v1alpha1/migrationcenter-api.json @@ -327,6 +327,36 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "delete": { + "description": "Deletes an asset.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.assets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the details of an asset.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", @@ -432,6 +462,45 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates the parameters of an asset.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + "httpMethod": "PATCH", + "id": "migrationcenter.projects.locations.assets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The full name of the asset.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "request": { + "$ref": "Asset" + }, + "response": { + "$ref": "Asset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "reportAssetFrames": { "description": "Reports a set of frames.", "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assets:reportAssetFrames", @@ -2033,7 +2102,7 @@ } } }, - "revision": "20230428", + "revision": "20230505", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -2422,7 +2491,7 @@ "type": "boolean" }, "names": { - "description": "Required. The IDs of the assets to delete. A maximum of 10 assets can be deleted in a batch. format: projects/{project}/locations/{location}/asset/{name}.", + "description": "Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted in a batch. format: projects/{project}/locations/{location}/asset/{name}.", "items": { "type": "string" }, @@ -5191,11 +5260,6 @@ "readOnly": true, "type": "string" }, - "uri": { - "description": "Output only. Upload URI for the file.", - "readOnly": true, - "type": "string" - }, "uriExpirationTime": { "description": "Output only. Expiration time of the upload URI.", "format": "google-datetime", diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index ffee2d0c781..599a1d777dd 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -964,7 +964,7 @@ type BatchDeleteAssetsRequest struct { // Default value is `false`. AllowMissing bool `json:"allowMissing,omitempty"` - // Names: Required. The IDs of the assets to delete. A maximum of 10 + // Names: Required. The IDs of the assets to delete. A maximum of 1000 // assets can be deleted in a batch. format: // projects/{project}/locations/{location}/asset/{name}. Names []string `json:"names,omitempty"` @@ -5411,9 +5411,6 @@ type UploadFileInfo struct { // SignedUri: Output only. Upload URI for the file. SignedUri string `json:"signedUri,omitempty"` - // Uri: Output only. Upload URI for the file. - Uri string `json:"uri,omitempty"` - // UriExpirationTime: Output only. Expiration time of the upload URI. UriExpirationTime string `json:"uriExpirationTime,omitempty"` @@ -7006,6 +7003,161 @@ func (c *ProjectsLocationsAssetsBatchUpdateCall) Do(opts ...googleapi.CallOption } +// method id "migrationcenter.projects.locations.assets.delete": + +type ProjectsLocationsAssetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an asset. +// +// - name: Name of the resource. +func (r *ProjectsLocationsAssetsService) Delete(name string) *ProjectsLocationsAssetsDeleteCall { + c := &ProjectsLocationsAssetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAssetsDeleteCall) RequestId(requestId string) *ProjectsLocationsAssetsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAssetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsDeleteCall { + 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 *ProjectsLocationsAssetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAssetsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAssetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsDeleteCall) doRequest(alt string) (*http.Response, 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, "v1alpha1/{+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 "migrationcenter.projects.locations.assets.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsAssetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an asset.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + // "httpMethod": "DELETE", + // "id": "migrationcenter.projects.locations.assets.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "migrationcenter.projects.locations.assets.get": type ProjectsLocationsAssetsGetCall struct { @@ -7452,6 +7604,188 @@ func (c *ProjectsLocationsAssetsListCall) Pages(ctx context.Context, f func(*Lis } } +// method id "migrationcenter.projects.locations.assets.patch": + +type ProjectsLocationsAssetsPatchCall struct { + s *Service + name string + asset *Asset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of an asset. +// +// - name: Output only. The full name of the asset. +func (r *ProjectsLocationsAssetsService) Patch(name string, asset *Asset) *ProjectsLocationsAssetsPatchCall { + c := &ProjectsLocationsAssetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.asset = asset + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAssetsPatchCall) RequestId(requestId string) *ProjectsLocationsAssetsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Asset` +// resource by the update. The values specified in the `update_mask` +// field are relative to the resource, not the full request. A field +// will be overwritten if it is in the mask. A single * value in the +// mask lets you to overwrite all fields. +func (c *ProjectsLocationsAssetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAssetsPatchCall { + 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 *ProjectsLocationsAssetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsPatchCall { + 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 *ProjectsLocationsAssetsPatchCall) Context(ctx context.Context) *ProjectsLocationsAssetsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAssetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsPatchCall) doRequest(alt string) (*http.Response, 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.asset) + 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, "v1alpha1/{+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 "migrationcenter.projects.locations.assets.patch" call. +// Exactly one of *Asset or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Asset.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsAssetsPatchCall) Do(opts ...googleapi.CallOption) (*Asset, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Asset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of an asset.", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assets/{assetsId}", + // "httpMethod": "PATCH", + // "id": "migrationcenter.projects.locations.assets.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The full name of the asset.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+name}", + // "request": { + // "$ref": "Asset" + // }, + // "response": { + // "$ref": "Asset" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "migrationcenter.projects.locations.assets.reportAssetFrames": type ProjectsLocationsAssetsReportAssetFramesCall struct { diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index 64059d7dae7..0ab17b68652 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -1217,7 +1217,7 @@ "type": "string" }, "pageSize": { - "description": "A positive number that is the maximum number of results to return.", + "description": "A positive number that is the maximum number of results to return. The default and maximum value is 10,000. If a page_size \u003c= 0 or \u003e 10,000 is submitted, will instead return a maximum of 10,000 results.", "format": "int32", "location": "query", "type": "integer" @@ -2714,7 +2714,7 @@ } } }, - "revision": "20230417", + "revision": "20230507", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 0bf15978559..2d7ae98f97c 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -11303,7 +11303,9 @@ func (c *ProjectsMetricDescriptorsListCall) Filter(filter string) *ProjectsMetri } // PageSize sets the optional parameter "pageSize": A positive number -// that is the maximum number of results to return. +// that is the maximum number of results to return. The default and +// maximum value is 10,000. If a page_size <= 0 or > 10,000 is +// submitted, will instead return a maximum of 10,000 results. func (c *ProjectsMetricDescriptorsListCall) PageSize(pageSize int64) *ProjectsMetricDescriptorsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -11438,7 +11440,7 @@ func (c *ProjectsMetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "pageSize": { - // "description": "A positive number that is the maximum number of results to return.", + // "description": "A positive number that is the maximum number of results to return. The default and maximum value is 10,000. If a page_size \u003c= 0 or \u003e 10,000 is submitted, will instead return a maximum of 10,000 results.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 4eae925d5bc..efc3b1a861c 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -848,102 +848,104 @@ }, "serviceClasses": { "methods": { - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", - "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.serviceClasses.getIamPolicy", + "create": { + "description": "Creates a new ServiceClass in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceClasses.create", "parameterOrder": [ - "resource" + "parent" ], "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "parent": { + "description": "Required. The parent resource's name of the ServiceClass.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "serviceClassId": { + "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceClasses/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", + "location": "query", + "type": "string" } }, - "path": "v1/{+resource}:getIamPolicy", + "path": "v1/{+parent}/serviceClasses", + "request": { + "$ref": "ServiceClass" + }, "response": { - "$ref": "Policy" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", - "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", + "delete": { + "description": "Deletes a single ServiceClass.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", + "httpMethod": "DELETE", + "id": "networkconnectivity.projects.locations.serviceClasses.delete", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Required. The name of the ServiceClass to delete.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, + "path": "v1/{+name}", "response": { - "$ref": "Policy" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", - "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", + "get": { + "description": "Gets details of a single ServiceClass.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceClasses.get", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Required. Name of the ServiceClass to get.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, + "path": "v1/{+name}", "response": { - "$ref": "TestIamPermissionsResponse" + "$ref": "ServiceClass" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - } - } - }, - "serviceConnectionMaps": { - "methods": { + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy", + "id": "networkconnectivity.projects.locations.serviceClasses.getIamPolicy", "parameterOrder": [ "resource" ], @@ -957,7 +959,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", "required": true, "type": "string" } @@ -970,92 +972,86 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", - "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", + "list": { + "description": "Lists ServiceClasses in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceClasses.list", "parameterOrder": [ - "resource" + "parent" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "filter": { + "description": "A filter expression that filters the results listed in the response.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results by a certain order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results per page that should be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource's name.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, + "path": "v1/{+parent}/serviceClasses", "response": { - "$ref": "Policy" + "$ref": "ListServiceClassesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", - "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", + "patch": { + "description": "Updates the parameters of a single ServiceClass.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", + "httpMethod": "PATCH", + "id": "networkconnectivity.projects.locations.serviceClasses.patch", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Immutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", "required": true, "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "serviceConnectionPolicies": { - "methods": { - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", - "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", - "type": "integer" + "type": "string" }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", - "required": true, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceClass resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", "type": "string" } }, - "path": "v1/{+resource}:getIamPolicy", + "path": "v1/{+name}", + "request": { + "$ref": "ServiceClass" + }, "response": { - "$ref": "Policy" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1063,9 +1059,9 @@ }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", + "id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", "parameterOrder": [ "resource" ], @@ -1073,7 +1069,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", "required": true, "type": "string" } @@ -1091,9 +1087,9 @@ }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", + "id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", "parameterOrder": [ "resource" ], @@ -1101,7 +1097,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", "required": true, "type": "string" } @@ -1119,38 +1115,38 @@ } } }, - "spokes": { + "serviceConnectionMaps": { "methods": { "create": { - "description": "Creates a Network Connectivity Center spoke.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", + "description": "Creates a new ServiceConnectionMap in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps", "httpMethod": "POST", - "id": "networkconnectivity.projects.locations.spokes.create", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The parent resource.", + "description": "Required. The parent resource's name of the ServiceConnectionMap.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, "requestId": { - "description": "Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" }, - "spokeId": { - "description": "Required. Unique id for the spoke to create.", + "serviceConnectionMapId": { + "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionMaps/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", "location": "query", "type": "string" } }, - "path": "v1/{+parent}/spokes", + "path": "v1/{+parent}/serviceConnectionMaps", "request": { - "$ref": "Spoke" + "$ref": "ServiceConnectionMap" }, "response": { "$ref": "GoogleLongrunningOperation" @@ -1160,23 +1156,23 @@ ] }, "delete": { - "description": "Deletes a Network Connectivity Center spoke.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", + "description": "Deletes a single ServiceConnectionMap.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", "httpMethod": "DELETE", - "id": "networkconnectivity.projects.locations.spokes.delete", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the spoke to delete.", + "description": "Required. The name of the ServiceConnectionMap to delete.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", "required": true, "type": "string" }, "requestId": { - "description": "Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" } @@ -1190,25 +1186,25 @@ ] }, "get": { - "description": "Gets details about a Network Connectivity Center spoke.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", + "description": "Gets details of a single ServiceConnectionMap.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.spokes.get", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the spoke resource.", + "description": "Required. Name of the ServiceConnectionMap to get.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", "required": true, "type": "string" } }, "path": "v1/{+name}", "response": { - "$ref": "Spoke" + "$ref": "ServiceConnectionMap" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1216,9 +1212,9 @@ }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:getIamPolicy", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.spokes.getIamPolicy", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy", "parameterOrder": [ "resource" ], @@ -1232,7 +1228,7 @@ "resource": { "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", "required": true, "type": "string" } @@ -1246,16 +1242,16 @@ ] }, "list": { - "description": "Lists the Network Connectivity Center spokes in a specified project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", + "description": "Lists ServiceConnectionMaps in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps", "httpMethod": "GET", - "id": "networkconnectivity.projects.locations.spokes.list", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.list", "parameterOrder": [ "parent" ], "parameters": { "filter": { - "description": "An expression that filters the list of results.", + "description": "A filter expression that filters the results listed in the response.", "location": "query", "type": "string" }, @@ -1265,7 +1261,7 @@ "type": "string" }, "pageSize": { - "description": "The maximum number of results to return per page.", + "description": "The maximum number of results per page that should be returned.", "format": "int32", "location": "query", "type": "integer" @@ -1276,44 +1272,44 @@ "type": "string" }, "parent": { - "description": "Required. The parent resource.", + "description": "Required. The parent resource's name.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+parent}/spokes", + "path": "v1/{+parent}/serviceConnectionMaps", "response": { - "$ref": "ListSpokesResponse" + "$ref": "ListServiceConnectionMapsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a Network Connectivity Center spoke.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", + "description": "Updates the parameters of a single ServiceConnectionMap.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", "httpMethod": "PATCH", - "id": "networkconnectivity.projects.locations.spokes.patch", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. The name of the spoke. Spoke names must be unique. They use the following form: `projects/{project_number}/locations/{region}/spokes/{spoke_id}`", + "description": "Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: https://google.aip.dev/122#fields-representing-resource-names", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", "required": true, "type": "string" }, "requestId": { - "description": "Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" }, "updateMask": { - "description": "Optional. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.", + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionMap resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1321,7 +1317,688 @@ }, "path": "v1/{+name}", "request": { - "$ref": "Spoke" + "$ref": "ServiceConnectionMap" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceConnectionPolicies": { + "methods": { + "create": { + "description": "Creates a new ServiceConnectionPolicy in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource's name of the ServiceConnectionPolicy.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "serviceConnectionPolicyId": { + "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/serviceConnectionPolicies", + "request": { + "$ref": "ServiceConnectionPolicy" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ServiceConnectionPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", + "httpMethod": "DELETE", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ServiceConnectionPolicy to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ServiceConnectionPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServiceConnectionPolicy to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ServiceConnectionPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ServiceConnectionPolicies in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters the results listed in the response.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results by a certain order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results per page that should be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource's name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceConnectionPolicies", + "response": { + "$ref": "ListServiceConnectionPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single ServiceConnectionPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", + "httpMethod": "PATCH", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "ServiceConnectionPolicy" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceConnectionTokens": { + "methods": { + "create": { + "description": "Creates a new ServiceConnectionToken in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionTokens.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource's name of the ServiceConnectionToken.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "serviceConnectionTokenId": { + "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ServiceConnectionTokens/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/serviceConnectionTokens", + "request": { + "$ref": "ServiceConnectionToken" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ServiceConnectionToken.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens/{serviceConnectionTokensId}", + "httpMethod": "DELETE", + "id": "networkconnectivity.projects.locations.serviceConnectionTokens.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ServiceConnectionToken to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionTokens/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ServiceConnectionToken.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens/{serviceConnectionTokensId}", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceConnectionTokens.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServiceConnectionToken to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionTokens/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ServiceConnectionToken" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ServiceConnectionTokens in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceConnectionTokens.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters the results listed in the response.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results by a certain order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results per page that should be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource's name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serviceConnectionTokens", + "response": { + "$ref": "ListServiceConnectionTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "spokes": { + "methods": { + "create": { + "description": "Creates a Network Connectivity Center spoke.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.spokes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "spokeId": { + "description": "Required. Unique id for the spoke to create.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/spokes", + "request": { + "$ref": "Spoke" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Network Connectivity Center spoke.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", + "httpMethod": "DELETE", + "id": "networkconnectivity.projects.locations.spokes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the spoke to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details about a Network Connectivity Center spoke.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.spokes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the spoke resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Spoke" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.spokes.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the Network Connectivity Center spokes in a specified project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.spokes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "An expression that filters the list of results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results by a certain order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return per page.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/spokes", + "response": { + "$ref": "ListSpokesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a Network Connectivity Center spoke.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", + "httpMethod": "PATCH", + "id": "networkconnectivity.projects.locations.spokes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The name of the spoke. Spoke names must be unique. They use the following form: `projects/{project_number}/locations/{region}/spokes/{spoke_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Spoke" }, "response": { "$ref": "GoogleLongrunningOperation" @@ -1393,7 +2070,7 @@ } } }, - "revision": "20230308", + "revision": "20230502", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1466,6 +2143,98 @@ }, "type": "object" }, + "ConsumerPscConfig": { + "description": "Allow the producer to specify which consumers can connect to it.", + "id": "ConsumerPscConfig", + "properties": { + "disableGlobalAccess": { + "description": "This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.", + "type": "boolean" + }, + "network": { + "description": "The resource path of the consumer network where PSC connections are allowed to be created in. Note, this network does not need be in the ConsumerPscConfig.project in the case of SharedVPC. Example: projects/{projectNumOrId}/global/networks/{networkId}.", + "type": "string" + }, + "project": { + "description": "The consumer project where PSC connections are allowed to be created in.", + "type": "string" + } + }, + "type": "object" + }, + "ConsumerPscConnection": { + "description": "PSC connection details on consumer side.", + "id": "ConsumerPscConnection", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "The most recent error during operating this connection." + }, + "errorType": { + "description": "The error type indicates whether the error is consumer facing, producer facing or system internal.", + "enum": [ + "CONNECTION_ERROR_TYPE_UNSPECIFIED", + "ERROR_INTERNAL", + "ERROR_CONSUMER_SIDE", + "ERROR_PRODUCER_SIDE" + ], + "enumDescriptions": [ + "An invalid error type as the default case.", + "The error is due to Service Automation system internal.", + "The error is due to the setup on consumer side.", + "The error is due to the setup on producer side." + ], + "type": "string" + }, + "forwardingRule": { + "description": "The URI of the consumer forwarding rule created. Example: projects/{projectNumOrId}/regions/us-east1/networks/{resourceId}.", + "type": "string" + }, + "gceOperation": { + "description": "The last Compute Engine operation to setup PSC connection.", + "type": "string" + }, + "ip": { + "description": "The IP literal allocated on the consumer network for the PSC forwarding rule that is created to connect to the producer service attachment in this service connection map.", + "type": "string" + }, + "network": { + "description": "The consumer network whose PSC forwarding rule is connected to the service attachments in this service connection map. Note that the network could be on a different project (shared VPC).", + "type": "string" + }, + "project": { + "description": "The consumer project whose PSC forwarding rule is connected to the service attachments in this service connection map.", + "type": "string" + }, + "pscConnectionId": { + "description": "The PSC connection id of the PSC forwarding rule connected to the service attachments in this service connection map.", + "type": "string" + }, + "serviceAttachmentUri": { + "description": "The URI of a service attachment which is the target of the PSC connection.", + "type": "string" + }, + "state": { + "description": "The state of the PSC connection.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "FAILED", + "CREATING", + "DELETING" + ], + "enumDescriptions": [ + "An invalid state as the default case.", + "The connection is fully established and ready to use.", + "The connection is not functional since some resources on the connection fail to be created.", + "The connection is being created.", + "The connection is being deleted." + ], + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1855,11 +2624,104 @@ "$ref": "InternalRange" }, "type": "array" - }, + }, + "nextPageToken": { + "description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListServiceClassesResponse": { + "description": "Response for ListServiceClasses.", + "id": "ListServiceClassesResponse", + "properties": { + "nextPageToken": { + "description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", + "type": "string" + }, + "serviceClasses": { + "description": "ServiceClasses to be returned.", + "items": { + "$ref": "ServiceClass" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListServiceConnectionMapsResponse": { + "description": "Response for ListServiceConnectionMaps.", + "id": "ListServiceConnectionMapsResponse", + "properties": { + "nextPageToken": { + "description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", + "type": "string" + }, + "serviceConnectionMaps": { + "description": "ServiceConnectionMaps to be returned.", + "items": { + "$ref": "ServiceConnectionMap" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListServiceConnectionPoliciesResponse": { + "description": "Response for ListServiceConnectionPolicies.", + "id": "ListServiceConnectionPoliciesResponse", + "properties": { "nextPageToken": { "description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", "type": "string" }, + "serviceConnectionPolicies": { + "description": "ServiceConnectionPolicies to be returned.", + "items": { + "$ref": "ServiceConnectionPolicy" + }, + "type": "array" + }, "unreachable": { "description": "Locations that could not be reached.", "items": { @@ -1870,20 +2732,27 @@ }, "type": "object" }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "id": "ListLocationsResponse", + "ListServiceConnectionTokensResponse": { + "description": "Response for ListServiceConnectionTokens.", + "id": "ListServiceConnectionTokensResponse", "properties": { - "locations": { - "description": "A list of locations that matches the specified filter in the request.", + "nextPageToken": { + "description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", + "type": "string" + }, + "serviceConnectionTokens": { + "description": "ServiceConnectionTokens to be returned.", "items": { - "$ref": "Location" + "$ref": "ServiceConnectionToken" }, "type": "array" }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -1914,7 +2783,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { @@ -2046,6 +2915,101 @@ }, "type": "object" }, + "ProducerPscConfig": { + "description": "The PSC configurations on producer side.", + "id": "ProducerPscConfig", + "properties": { + "serviceAttachmentUri": { + "description": "The resource path of a service attachment. Example: projects/{projectNumOrId}/regions/{region}/serviceAttachments/{resourceId}.", + "type": "string" + } + }, + "type": "object" + }, + "PscConfig": { + "description": "Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.", + "id": "PscConfig", + "properties": { + "limit": { + "description": "Max number of PSC connections for this policy.", + "format": "int64", + "type": "string" + }, + "subnetworks": { + "description": "The resource paths of subnetworks to use for IP address management. Example: projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PscConnection": { + "description": "Information about a specific Private Service Connect connection.", + "id": "PscConnection", + "properties": { + "consumerAddress": { + "description": "The resource reference of the consumer address.", + "type": "string" + }, + "consumerForwardingRule": { + "description": "The resource reference of the PSC Forwarding Rule within the consumer VPC.", + "type": "string" + }, + "consumerTargetProject": { + "description": "The project where the PSC connection is created.", + "type": "string" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The most recent error during operating this connection." + }, + "errorType": { + "description": "The error type indicates whether the error is consumer facing, producer facing or system internal.", + "enum": [ + "CONNECTION_ERROR_TYPE_UNSPECIFIED", + "ERROR_INTERNAL", + "ERROR_CONSUMER_SIDE", + "ERROR_PRODUCER_SIDE" + ], + "enumDescriptions": [ + "An invalid error type as the default case.", + "The error is due to Service Automation system internal.", + "The error is due to the setup on consumer side.", + "The error is due to the setup on producer side." + ], + "type": "string" + }, + "gceOperation": { + "description": "The last Compute Engine operation to setup PSC connection.", + "type": "string" + }, + "pscConnectionId": { + "description": "The PSC connection id of the PSC forwarding rule.", + "type": "string" + }, + "state": { + "description": "State of the PSC Connection", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "FAILED", + "CREATING", + "DELETING" + ], + "enumDescriptions": [ + "An invalid state as the default case.", + "The connection is fully established and ready to use.", + "The connection is not functional since some resources on the connection fail to be created.", + "The connection is being created.", + "The connection is being deleted." + ], + "type": "string" + } + }, + "type": "object" + }, "RouterApplianceInstance": { "description": "A router appliance instance is a Compute Engine virtual machine (VM) instance that acts as a BGP speaker. A router appliance instance is specified by the URI of the VM and the internal IP address of one of the VM's network interfaces.", "id": "RouterApplianceInstance", @@ -2077,6 +3041,251 @@ }, "type": "object" }, + "ServiceClass": { + "description": "The ServiceClass resource. Next id: 8", + "id": "ServiceClass", + "properties": { + "createTime": { + "description": "Output only. Time when the ServiceClass was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of this resource.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels.", + "type": "object" + }, + "name": { + "description": "Immutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names", + "type": "string" + }, + "serviceClass": { + "description": "Output only. The generated service class name. Use this name to refer to the Service class in Service Connection Maps and Service Connection Policies.", + "readOnly": true, + "type": "string" + }, + "serviceConnectionMaps": { + "description": "Output only. URIs of all Service Connection Maps using this service class.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. Time when the ServiceClass was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceConnectionMap": { + "description": "The ServiceConnectionMap resource. Next id: 14", + "id": "ServiceConnectionMap", + "properties": { + "consumerPscConfigs": { + "description": "The PSC configurations on consumer side.", + "items": { + "$ref": "ConsumerPscConfig" + }, + "type": "array" + }, + "consumerPscConnections": { + "description": "Output only. PSC connection details on consumer side.", + "items": { + "$ref": "ConsumerPscConnection" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Time when the ServiceConnectionMap was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of this resource.", + "type": "string" + }, + "infrastructure": { + "description": "Output only. The infrastructure used for connections between consumers/producers.", + "enum": [ + "INFRASTRUCTURE_UNSPECIFIED", + "PSC" + ], + "enumDescriptions": [ + "An invalid infrastructure as the default case.", + "Private Service Connect is used for connections." + ], + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels.", + "type": "object" + }, + "name": { + "description": "Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: https://google.aip.dev/122#fields-representing-resource-names", + "type": "string" + }, + "producerPscConfigs": { + "description": "The PSC configurations on producer side.", + "items": { + "$ref": "ProducerPscConfig" + }, + "type": "array" + }, + "serviceClass": { + "description": "The service class identifier this ServiceConnectionMap is for. The user of ServiceConnectionMap create API needs to have networkconnecitivty.serviceclasses.use iam permission for the service class.", + "type": "string" + }, + "serviceClassUri": { + "description": "Output only. The service class uri this ServiceConnectionMap is for.", + "readOnly": true, + "type": "string" + }, + "token": { + "description": "The token provided by the consumer. This token authenticates that the consumer can create a connecton within the specified project and network.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when the ServiceConnectionMap was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceConnectionPolicy": { + "description": "The ServiceConnectionPolicy resource. Next id: 11", + "id": "ServiceConnectionPolicy", + "properties": { + "createTime": { + "description": "Output only. Time when the ServiceConnectionMap was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of this resource.", + "type": "string" + }, + "infrastructure": { + "description": "Output only. The type of underlying resources used to create the connection.", + "enum": [ + "INFRASTRUCTURE_UNSPECIFIED", + "PSC" + ], + "enumDescriptions": [ + "An invalid infrastructure as the default case.", + "Private Service Connect is used for connections." + ], + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels.", + "type": "object" + }, + "name": { + "description": "Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names", + "type": "string" + }, + "network": { + "description": "The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.", + "type": "string" + }, + "pscConfig": { + "$ref": "PscConfig", + "description": "Configuration used for Private Service Connect connections. Used when Infrastructure is PSC." + }, + "pscConnections": { + "description": "Output only. [Output only] Information about each Private Service Connect connection.", + "items": { + "$ref": "PscConnection" + }, + "readOnly": true, + "type": "array" + }, + "serviceClass": { + "description": "The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when the ServiceConnectionMap was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ServiceConnectionToken": { + "description": "The ServiceConnectionToken resource. Next id: 9", + "id": "ServiceConnectionToken", + "properties": { + "createTime": { + "description": "Output only. Time when the ServiceConnectionToken was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "A description of this resource.", + "type": "string" + }, + "expireTime": { + "description": "Output only. The time to which this token is valid.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels.", + "type": "object" + }, + "name": { + "description": "Immutable. The name of a ServiceConnectionToken. Format: projects/{project}/locations/{location}/ServiceConnectionTokens/{service_connection_token} See: https://google.aip.dev/122#fields-representing-resource-names", + "type": "string" + }, + "network": { + "description": "The resource path of the network associated with this token. Example: projects/{projectNumOrId}/global/networks/{resourceId}.", + "type": "string" + }, + "token": { + "description": "Output only. The token generated by Automation.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when the ServiceConnectionToken was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 6ba4f4fa177..05cf7ef7ff4 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -158,6 +158,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.ServiceClasses = NewProjectsLocationsServiceClassesService(s) rs.ServiceConnectionMaps = NewProjectsLocationsServiceConnectionMapsService(s) rs.ServiceConnectionPolicies = NewProjectsLocationsServiceConnectionPoliciesService(s) + rs.ServiceConnectionTokens = NewProjectsLocationsServiceConnectionTokensService(s) rs.Spokes = NewProjectsLocationsSpokesService(s) return rs } @@ -177,6 +178,8 @@ type ProjectsLocationsService struct { ServiceConnectionPolicies *ProjectsLocationsServiceConnectionPoliciesService + ServiceConnectionTokens *ProjectsLocationsServiceConnectionTokensService + Spokes *ProjectsLocationsSpokesService } @@ -258,6 +261,15 @@ type ProjectsLocationsServiceConnectionPoliciesService struct { s *Service } +func NewProjectsLocationsServiceConnectionTokensService(s *Service) *ProjectsLocationsServiceConnectionTokensService { + rs := &ProjectsLocationsServiceConnectionTokensService{s: s} + return rs +} + +type ProjectsLocationsServiceConnectionTokensService struct { + s *Service +} + func NewProjectsLocationsSpokesService(s *Service) *ProjectsLocationsSpokesService { rs := &ProjectsLocationsSpokesService{s: s} return rs @@ -442,6 +454,131 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ConsumerPscConfig: Allow the producer to specify which consumers can +// connect to it. +type ConsumerPscConfig struct { + // DisableGlobalAccess: This is used in PSC consumer ForwardingRule to + // control whether the PSC endpoint can be accessed from another region. + DisableGlobalAccess bool `json:"disableGlobalAccess,omitempty"` + + // Network: The resource path of the consumer network where PSC + // connections are allowed to be created in. Note, this network does not + // need be in the ConsumerPscConfig.project in the case of SharedVPC. + // Example: projects/{projectNumOrId}/global/networks/{networkId}. + Network string `json:"network,omitempty"` + + // Project: The consumer project where PSC connections are allowed to be + // created in. + Project string `json:"project,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableGlobalAccess") + // 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. "DisableGlobalAccess") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ConsumerPscConfig) MarshalJSON() ([]byte, error) { + type NoMethod ConsumerPscConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ConsumerPscConnection: PSC connection details on consumer side. +type ConsumerPscConnection struct { + // Error: The most recent error during operating this connection. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // ErrorType: The error type indicates whether the error is consumer + // facing, producer facing or system internal. + // + // Possible values: + // "CONNECTION_ERROR_TYPE_UNSPECIFIED" - An invalid error type as the + // default case. + // "ERROR_INTERNAL" - The error is due to Service Automation system + // internal. + // "ERROR_CONSUMER_SIDE" - The error is due to the setup on consumer + // side. + // "ERROR_PRODUCER_SIDE" - The error is due to the setup on producer + // side. + ErrorType string `json:"errorType,omitempty"` + + // ForwardingRule: The URI of the consumer forwarding rule created. + // Example: + // projects/{projectNumOrId}/regions/us-east1/networks/{resourceId}. + ForwardingRule string `json:"forwardingRule,omitempty"` + + // GceOperation: The last Compute Engine operation to setup PSC + // connection. + GceOperation string `json:"gceOperation,omitempty"` + + // Ip: The IP literal allocated on the consumer network for the PSC + // forwarding rule that is created to connect to the producer service + // attachment in this service connection map. + Ip string `json:"ip,omitempty"` + + // Network: The consumer network whose PSC forwarding rule is connected + // to the service attachments in this service connection map. Note that + // the network could be on a different project (shared VPC). + Network string `json:"network,omitempty"` + + // Project: The consumer project whose PSC forwarding rule is connected + // to the service attachments in this service connection map. + Project string `json:"project,omitempty"` + + // PscConnectionId: The PSC connection id of the PSC forwarding rule + // connected to the service attachments in this service connection map. + PscConnectionId string `json:"pscConnectionId,omitempty"` + + // ServiceAttachmentUri: The URI of a service attachment which is the + // target of the PSC connection. + ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"` + + // State: The state of the PSC connection. + // + // Possible values: + // "STATE_UNSPECIFIED" - An invalid state as the default case. + // "ACTIVE" - The connection is fully established and ready to use. + // "FAILED" - The connection is not functional since some resources on + // the connection fail to be created. + // "CREATING" - The connection is being created. + // "DELETING" - The connection is being deleted. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ConsumerPscConnection) MarshalJSON() ([]byte, error) { + type NoMethod ConsumerPscConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1119,6 +1256,169 @@ func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListServiceClassesResponse: Response for ListServiceClasses. +type ListServiceClassesResponse struct { + // NextPageToken: The next pagination token in the List response. It + // should be used as page_token for the following request. An empty + // value means no more result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServiceClasses: ServiceClasses to be returned. + ServiceClasses []*ServiceClass `json:"serviceClasses,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListServiceClassesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceClassesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListServiceConnectionMapsResponse: Response for +// ListServiceConnectionMaps. +type ListServiceConnectionMapsResponse struct { + // NextPageToken: The next pagination token in the List response. It + // should be used as page_token for the following request. An empty + // value means no more result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServiceConnectionMaps: ServiceConnectionMaps to be returned. + ServiceConnectionMaps []*ServiceConnectionMap `json:"serviceConnectionMaps,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListServiceConnectionMapsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceConnectionMapsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListServiceConnectionPoliciesResponse: Response for +// ListServiceConnectionPolicies. +type ListServiceConnectionPoliciesResponse struct { + // NextPageToken: The next pagination token in the List response. It + // should be used as page_token for the following request. An empty + // value means no more result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServiceConnectionPolicies: ServiceConnectionPolicies to be returned. + ServiceConnectionPolicies []*ServiceConnectionPolicy `json:"serviceConnectionPolicies,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListServiceConnectionPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceConnectionPoliciesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListServiceConnectionTokensResponse: Response for +// ListServiceConnectionTokens. +type ListServiceConnectionTokensResponse struct { + // NextPageToken: The next pagination token in the List response. It + // should be used as page_token for the following request. An empty + // value means no more result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServiceConnectionTokens: ServiceConnectionTokens to be returned. + ServiceConnectionTokens []*ServiceConnectionToken `json:"serviceConnectionTokens,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListServiceConnectionTokensResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListServiceConnectionTokensResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListSpokesResponse: The response for HubService.ListSpokes. type ListSpokesResponse struct { // NextPageToken: The token for the next page of the response. To see @@ -1159,7 +1459,7 @@ func (s *ListSpokesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". @@ -1408,18 +1708,51 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RouterApplianceInstance: A router appliance instance is a Compute -// Engine virtual machine (VM) instance that acts as a BGP speaker. A -// router appliance instance is specified by the URI of the VM and the -// internal IP address of one of the VM's network interfaces. -type RouterApplianceInstance struct { - // IpAddress: The IP address on the VM to use for peering. - IpAddress string `json:"ipAddress,omitempty"` +// ProducerPscConfig: The PSC configurations on producer side. +type ProducerPscConfig struct { + // ServiceAttachmentUri: The resource path of a service attachment. + // Example: + // projects/{projectNumOrId}/regions/{region}/serviceAttachments/{resourc + // eId}. + ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"` - // VirtualMachine: The URI of the VM. - VirtualMachine string `json:"virtualMachine,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ServiceAttachmentUri") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to + // NullFields is a list of field names (e.g. "ServiceAttachmentUri") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ProducerPscConfig) MarshalJSON() ([]byte, error) { + type NoMethod ProducerPscConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PscConfig: Configuration used for Private Service Connect +// connections. Used when Infrastructure is PSC. +type PscConfig struct { + // Limit: Max number of PSC connections for this policy. + Limit int64 `json:"limit,omitempty,string"` + + // Subnetworks: The resource paths of subnetworks to use for IP address + // management. Example: + // projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}. + Subnetworks []string `json:"subnetworks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Limit") 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 @@ -1427,8 +1760,8 @@ type RouterApplianceInstance struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Limit") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1436,36 +1769,143 @@ type RouterApplianceInstance struct { NullFields []string `json:"-"` } -func (s *RouterApplianceInstance) MarshalJSON() ([]byte, error) { - type NoMethod RouterApplianceInstance +func (s *PscConfig) MarshalJSON() ([]byte, error) { + type NoMethod PscConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RoutingVPC: RoutingVPC contains information about the VPC networks -// associated with the spokes of a Network Connectivity Center hub. -type RoutingVPC struct { - // RequiredForNewSiteToSiteDataTransferSpokes: Output only. If true, - // indicates that this VPC network is currently associated with spokes - // that use the data transfer feature (spokes where the - // site_to_site_data_transfer field is set to true). If you create new - // spokes that use data transfer, they must be associated with this VPC - // network. At most, one VPC network will have this field set to true. - RequiredForNewSiteToSiteDataTransferSpokes bool `json:"requiredForNewSiteToSiteDataTransferSpokes,omitempty"` +// PscConnection: Information about a specific Private Service Connect +// connection. +type PscConnection struct { + // ConsumerAddress: The resource reference of the consumer address. + ConsumerAddress string `json:"consumerAddress,omitempty"` - // Uri: The URI of the VPC network. - Uri string `json:"uri,omitempty"` + // ConsumerForwardingRule: The resource reference of the PSC Forwarding + // Rule within the consumer VPC. + ConsumerForwardingRule string `json:"consumerForwardingRule,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RequiredForNewSiteToSiteDataTransferSpokes") 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:"-"` + // ConsumerTargetProject: The project where the PSC connection is + // created. + ConsumerTargetProject string `json:"consumerTargetProject,omitempty"` - // NullFields is a list of field names (e.g. + // Error: The most recent error during operating this connection. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // ErrorType: The error type indicates whether the error is consumer + // facing, producer facing or system internal. + // + // Possible values: + // "CONNECTION_ERROR_TYPE_UNSPECIFIED" - An invalid error type as the + // default case. + // "ERROR_INTERNAL" - The error is due to Service Automation system + // internal. + // "ERROR_CONSUMER_SIDE" - The error is due to the setup on consumer + // side. + // "ERROR_PRODUCER_SIDE" - The error is due to the setup on producer + // side. + ErrorType string `json:"errorType,omitempty"` + + // GceOperation: The last Compute Engine operation to setup PSC + // connection. + GceOperation string `json:"gceOperation,omitempty"` + + // PscConnectionId: The PSC connection id of the PSC forwarding rule. + PscConnectionId string `json:"pscConnectionId,omitempty"` + + // State: State of the PSC Connection + // + // Possible values: + // "STATE_UNSPECIFIED" - An invalid state as the default case. + // "ACTIVE" - The connection is fully established and ready to use. + // "FAILED" - The connection is not functional since some resources on + // the connection fail to be created. + // "CREATING" - The connection is being created. + // "DELETING" - The connection is being deleted. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConsumerAddress") 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. "ConsumerAddress") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PscConnection) MarshalJSON() ([]byte, error) { + type NoMethod PscConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RouterApplianceInstance: A router appliance instance is a Compute +// Engine virtual machine (VM) instance that acts as a BGP speaker. A +// router appliance instance is specified by the URI of the VM and the +// internal IP address of one of the VM's network interfaces. +type RouterApplianceInstance struct { + // IpAddress: The IP address on the VM to use for peering. + IpAddress string `json:"ipAddress,omitempty"` + + // VirtualMachine: The URI of the VM. + VirtualMachine string `json:"virtualMachine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpAddress") 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. "IpAddress") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RouterApplianceInstance) MarshalJSON() ([]byte, error) { + type NoMethod RouterApplianceInstance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RoutingVPC: RoutingVPC contains information about the VPC networks +// associated with the spokes of a Network Connectivity Center hub. +type RoutingVPC struct { + // RequiredForNewSiteToSiteDataTransferSpokes: Output only. If true, + // indicates that this VPC network is currently associated with spokes + // that use the data transfer feature (spokes where the + // site_to_site_data_transfer field is set to true). If you create new + // spokes that use data transfer, they must be associated with this VPC + // network. At most, one VPC network will have this field set to true. + RequiredForNewSiteToSiteDataTransferSpokes bool `json:"requiredForNewSiteToSiteDataTransferSpokes,omitempty"` + + // Uri: The URI of the VPC network. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "RequiredForNewSiteToSiteDataTransferSpokes") 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. // "RequiredForNewSiteToSiteDataTransferSpokes") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an @@ -1481,6 +1921,284 @@ func (s *RoutingVPC) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceClass: The ServiceClass resource. Next id: 8 +type ServiceClass struct { + // CreateTime: Output only. Time when the ServiceClass was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: A description of this resource. + Description string `json:"description,omitempty"` + + // Labels: User-defined labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. The name of a ServiceClass resource. Format: + // projects/{project}/locations/{location}/serviceClasses/{service_class} + // See: https://google.aip.dev/122#fields-representing-resource-names + Name string `json:"name,omitempty"` + + // ServiceClass: Output only. The generated service class name. Use this + // name to refer to the Service class in Service Connection Maps and + // Service Connection Policies. + ServiceClass string `json:"serviceClass,omitempty"` + + // ServiceConnectionMaps: Output only. URIs of all Service Connection + // Maps using this service class. + ServiceConnectionMaps []string `json:"serviceConnectionMaps,omitempty"` + + // UpdateTime: Output only. Time when the ServiceClass was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceClass) MarshalJSON() ([]byte, error) { + type NoMethod ServiceClass + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceConnectionMap: The ServiceConnectionMap resource. Next id: 14 +type ServiceConnectionMap struct { + // ConsumerPscConfigs: The PSC configurations on consumer side. + ConsumerPscConfigs []*ConsumerPscConfig `json:"consumerPscConfigs,omitempty"` + + // ConsumerPscConnections: Output only. PSC connection details on + // consumer side. + ConsumerPscConnections []*ConsumerPscConnection `json:"consumerPscConnections,omitempty"` + + // CreateTime: Output only. Time when the ServiceConnectionMap was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Description: A description of this resource. + Description string `json:"description,omitempty"` + + // Infrastructure: Output only. The infrastructure used for connections + // between consumers/producers. + // + // Possible values: + // "INFRASTRUCTURE_UNSPECIFIED" - An invalid infrastructure as the + // default case. + // "PSC" - Private Service Connect is used for connections. + Infrastructure string `json:"infrastructure,omitempty"` + + // Labels: User-defined labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. The name of a ServiceConnectionMap. Format: + // projects/{project}/locations/{location}/serviceConnectionMaps/{service + // _connection_map} See: + // https://google.aip.dev/122#fields-representing-resource-names + Name string `json:"name,omitempty"` + + // ProducerPscConfigs: The PSC configurations on producer side. + ProducerPscConfigs []*ProducerPscConfig `json:"producerPscConfigs,omitempty"` + + // ServiceClass: The service class identifier this ServiceConnectionMap + // is for. The user of ServiceConnectionMap create API needs to have + // networkconnecitivty.serviceclasses.use iam permission for the service + // class. + ServiceClass string `json:"serviceClass,omitempty"` + + // ServiceClassUri: Output only. The service class uri this + // ServiceConnectionMap is for. + ServiceClassUri string `json:"serviceClassUri,omitempty"` + + // Token: The token provided by the consumer. This token authenticates + // that the consumer can create a connecton within the specified project + // and network. + Token string `json:"token,omitempty"` + + // UpdateTime: Output only. Time when the ServiceConnectionMap was + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ConsumerPscConfigs") + // 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. "ConsumerPscConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceConnectionMap) MarshalJSON() ([]byte, error) { + type NoMethod ServiceConnectionMap + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceConnectionPolicy: The ServiceConnectionPolicy resource. Next +// id: 11 +type ServiceConnectionPolicy struct { + // CreateTime: Output only. Time when the ServiceConnectionMap was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Description: A description of this resource. + Description string `json:"description,omitempty"` + + // Infrastructure: Output only. The type of underlying resources used to + // create the connection. + // + // Possible values: + // "INFRASTRUCTURE_UNSPECIFIED" - An invalid infrastructure as the + // default case. + // "PSC" - Private Service Connect is used for connections. + Infrastructure string `json:"infrastructure,omitempty"` + + // Labels: User-defined labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. The name of a ServiceConnectionPolicy. Format: + // projects/{project}/locations/{location}/serviceConnectionPolicies/{ser + // vice_connection_policy} See: + // https://google.aip.dev/122#fields-representing-resource-names + Name string `json:"name,omitempty"` + + // Network: The resource path of the consumer network. Example: - + // projects/{projectNumOrId}/global/networks/{resourceId}. + Network string `json:"network,omitempty"` + + // PscConfig: Configuration used for Private Service Connect + // connections. Used when Infrastructure is PSC. + PscConfig *PscConfig `json:"pscConfig,omitempty"` + + // PscConnections: Output only. [Output only] Information about each + // Private Service Connect connection. + PscConnections []*PscConnection `json:"pscConnections,omitempty"` + + // ServiceClass: The service class identifier for which this + // ServiceConnectionPolicy is for. The service class identifier is a + // unique, symbolic representation of a ServiceClass. It is provided by + // the Service Producer. Google services have a prefix of gcp. For + // example, gcp-cloud-sql. 3rd party services do not. For example, + // test-service-a3dfcx. + ServiceClass string `json:"serviceClass,omitempty"` + + // UpdateTime: Output only. Time when the ServiceConnectionMap was + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceConnectionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ServiceConnectionPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceConnectionToken: The ServiceConnectionToken resource. Next id: +// 9 +type ServiceConnectionToken struct { + // CreateTime: Output only. Time when the ServiceConnectionToken was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Description: A description of this resource. + Description string `json:"description,omitempty"` + + // ExpireTime: Output only. The time to which this token is valid. + ExpireTime string `json:"expireTime,omitempty"` + + // Labels: User-defined labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. The name of a ServiceConnectionToken. Format: + // projects/{project}/locations/{location}/ServiceConnectionTokens/{servi + // ce_connection_token} See: + // https://google.aip.dev/122#fields-representing-resource-names + Name string `json:"name,omitempty"` + + // Network: The resource path of the network associated with this token. + // Example: projects/{projectNumOrId}/global/networks/{resourceId}. + Network string `json:"network,omitempty"` + + // Token: Output only. The token generated by Automation. + Token string `json:"token,omitempty"` + + // UpdateTime: Output only. Time when the ServiceConnectionToken was + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceConnectionToken) MarshalJSON() ([]byte, error) { + type NoMethod ServiceConnectionToken + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the @@ -5366,118 +6084,115 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -// method id "networkconnectivity.projects.locations.serviceClasses.getIamPolicy": +// method id "networkconnectivity.projects.locations.serviceClasses.create": -type ProjectsLocationsServiceClassesGetIamPolicyCall struct { +type ProjectsLocationsServiceClassesCreateCall struct { s *Service - resource string + parent string + serviceclass *ServiceClass urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Create: Creates a new ServiceClass in a given project and location. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServiceClassesService) GetIamPolicy(resource string) *ProjectsLocationsServiceClassesGetIamPolicyCall { - c := &ProjectsLocationsServiceClassesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The parent resource's name of the ServiceClass. +func (r *ProjectsLocationsServiceClassesService) Create(parent string, serviceclass *ServiceClass) *ProjectsLocationsServiceClassesCreateCall { + c := &ProjectsLocationsServiceClassesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.serviceclass = serviceclass return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceClassesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceClassesCreateCall) RequestId(requestId string) *ProjectsLocationsServiceClassesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceClassId sets the optional parameter "serviceClassId": Resource +// ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceClasses/foo') +// See https://google.aip.dev/122#resource-id-segments Unique per +// location. If one is not provided, one will be generated. +func (c *ProjectsLocationsServiceClassesCreateCall) ServiceClassId(serviceClassId string) *ProjectsLocationsServiceClassesCreateCall { + c.urlParams_.Set("serviceClassId", serviceClassId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesCreateCall) doRequest(alt string) (*http.Response, 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.serviceclass) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceClasses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceClasses.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkconnectivity.projects.locations.serviceClasses.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 *ProjectsLocationsServiceClassesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5496,7 +6211,7 @@ func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5508,31 +6223,38 @@ func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.serviceClasses.getIamPolicy", + // "description": "Creates a new ServiceClass in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceClasses.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "parent": { + // "description": "Required. The parent resource's name of the ServiceClass.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "serviceClassId": { + // "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceClasses/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/serviceClasses", + // "request": { + // "$ref": "ServiceClass" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5541,36 +6263,47 @@ func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Do(opts ...googleapi.C } -// method id "networkconnectivity.projects.locations.serviceClasses.setIamPolicy": +// method id "networkconnectivity.projects.locations.serviceClasses.delete": -type ProjectsLocationsServiceClassesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceClassesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Delete: Deletes a single ServiceClass. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServiceClassesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceClassesSetIamPolicyCall { - c := &ProjectsLocationsServiceClassesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the ServiceClass to delete. +func (r *ProjectsLocationsServiceClassesService) Delete(name string) *ProjectsLocationsServiceClassesDeleteCall { + c := &ProjectsLocationsServiceClassesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceClassesDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceClassesDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesSetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5578,21 +6311,21 @@ func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) 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 *ProjectsLocationsServiceClassesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesSetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5600,34 +6333,29 @@ func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceClasses.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkconnectivity.projects.locations.serviceClasses.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 *ProjectsLocationsServiceClassesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5646,7 +6374,7 @@ func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5658,28 +6386,30 @@ func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", + // "description": "Deletes a single ServiceClass.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.serviceClasses.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The name of the ServiceClass to delete.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5688,96 +6418,95 @@ func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Do(opts ...googleapi.C } -// method id "networkconnectivity.projects.locations.serviceClasses.testIamPermissions": +// method id "networkconnectivity.projects.locations.serviceClasses.get": -type ProjectsLocationsServiceClassesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceClassesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Get: Gets details of a single ServiceClass. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServiceClassesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceClassesTestIamPermissionsCall { - c := &ProjectsLocationsServiceClassesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: Name of the ServiceClass to get. +func (r *ProjectsLocationsServiceClassesService) Get(name string) *ProjectsLocationsServiceClassesGetCall { + c := &ProjectsLocationsServiceClassesGetCall{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 *ProjectsLocationsServiceClassesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceClassesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceClassesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceClassesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesGetCall) doRequest(alt string) (*http.Response, 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.testiampermissionsrequest) - 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/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceClasses.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "networkconnectivity.projects.locations.serviceClasses.get" call. +// Exactly one of *ServiceClass or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ServiceClass.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceClassesGetCall) Do(opts ...googleapi.CallOption) (*ServiceClass, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5796,7 +6525,7 @@ func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &ServiceClass{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5808,28 +6537,25 @@ func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googl } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", + // "description": "Gets details of a single ServiceClass.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceClasses.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. Name of the ServiceClass to get.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "ServiceClass" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5838,9 +6564,9 @@ func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googl } -// method id "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy": +// method id "networkconnectivity.projects.locations.serviceClasses.getIamPolicy": -type ProjectsLocationsServiceConnectionMapsGetIamPolicyCall struct { +type ProjectsLocationsServiceClassesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -5857,8 +6583,8 @@ type ProjectsLocationsServiceConnectionMapsGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceConnectionMapsService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { - c := &ProjectsLocationsServiceConnectionMapsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceClassesService) GetIamPolicy(resource string) *ProjectsLocationsServiceClassesGetIamPolicyCall { + c := &ProjectsLocationsServiceClassesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -5876,7 +6602,7 @@ func (r *ProjectsLocationsServiceConnectionMapsService) GetIamPolicy(resource st // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceClassesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -5884,7 +6610,7 @@ func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) OptionsRequeste // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5894,7 +6620,7 @@ func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Fields(s ...goo // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -5902,21 +6628,21 @@ func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) IfNoneMatch(ent // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5942,14 +6668,14 @@ func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.serviceClasses.getIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5981,9 +6707,9 @@ func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Do(opts ...goog return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy", + // "id": "networkconnectivity.projects.locations.serviceClasses.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -5997,7 +6723,7 @@ func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Do(opts ...goog // "resource": { // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" // } @@ -6013,93 +6739,122 @@ func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Do(opts ...goog } -// method id "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy": +// method id "networkconnectivity.projects.locations.serviceClasses.list": -type ProjectsLocationsServiceConnectionMapsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceClassesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// List: Lists ServiceClasses in a given project and location. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServiceConnectionMapsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { - c := &ProjectsLocationsServiceConnectionMapsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - parent: The parent resource's name. +func (r *ProjectsLocationsServiceClassesService) List(parent string) *ProjectsLocationsServiceClassesListCall { + c := &ProjectsLocationsServiceClassesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters the results listed in the response. +func (c *ProjectsLocationsServiceClassesListCall) Filter(filter string) *ProjectsLocationsServiceClassesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsServiceClassesListCall) OrderBy(orderBy string) *ProjectsLocationsServiceClassesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results per page that should be returned. +func (c *ProjectsLocationsServiceClassesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceClassesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsServiceClassesListCall) PageToken(pageToken string) *ProjectsLocationsServiceClassesListCall { + 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 *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceClassesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesListCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesListCall) doRequest(alt string) (*http.Response, 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.setiampolicyrequest) - 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/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceClasses") 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{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkconnectivity.projects.locations.serviceClasses.list" call. +// Exactly one of *ListServiceClassesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListServiceClassesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceClassesListCall) Do(opts ...googleapi.CallOption) (*ListServiceClassesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6118,7 +6873,7 @@ func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ListServiceClassesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6130,28 +6885,46 @@ func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Do(opts ...goog } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", + // "description": "Lists ServiceClasses in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceClasses.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "filter": { + // "description": "A filter expression that filters the results listed in the response.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results per page that should be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+parent}/serviceClasses", // "response": { - // "$ref": "Policy" + // "$ref": "ListServiceClassesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6160,61 +6933,106 @@ func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Do(opts ...goog } -// method id "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions": +// 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 *ProjectsLocationsServiceClassesListCall) Pages(ctx context.Context, f func(*ListServiceClassesResponse) 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 ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "networkconnectivity.projects.locations.serviceClasses.patch": + +type ProjectsLocationsServiceClassesPatchCall struct { + s *Service + name string + serviceclass *ServiceClass + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Patch: Updates the parameters of a single ServiceClass. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServiceConnectionMapsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { - c := &ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: Immutable. The name of a ServiceClass resource. Format: +// projects/{project}/locations/{location}/serviceClasses/{service_clas +// s} See: +// https://google.aip.dev/122#fields-representing-resource-names. +func (r *ProjectsLocationsServiceClassesService) Patch(name string, serviceclass *ServiceClass) *ProjectsLocationsServiceClassesPatchCall { + c := &ProjectsLocationsServiceClassesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.serviceclass = serviceclass return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceClassesPatchCall) RequestId(requestId string) *ProjectsLocationsServiceClassesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the ServiceClass +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsServiceClassesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceClassesPatchCall { + 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 *ProjectsLocationsServiceClassesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesPatchCall { + 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 *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { +func (c *ProjectsLocationsServiceClassesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6222,34 +7040,34 @@ func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceclass) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Do executes the "networkconnectivity.projects.locations.serviceClasses.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 -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsServiceClassesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6268,7 +7086,7 @@ func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6280,28 +7098,39 @@ func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts . } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", + // "description": "Updates the parameters of a single ServiceClass.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", + // "httpMethod": "PATCH", + // "id": "networkconnectivity.projects.locations.serviceClasses.patch", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Immutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceClass resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+name}", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "ServiceClass" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6310,100 +7139,75 @@ func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts . } -// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy": +// method id "networkconnectivity.projects.locations.serviceClasses.setIamPolicy": -type ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceClassesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // // - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names +// specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceConnectionPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { - c := &ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceClassesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceClassesSetIamPolicyCall { + c := &ProjectsLocationsServiceClassesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.setiampolicyrequest = setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -6414,14 +7218,14 @@ func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.serviceClasses.setIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6452,29 +7256,26 @@ func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Do(opts ... } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", // "parameterOrder": [ // "resource" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { // "$ref": "Policy" // }, @@ -6485,36 +7286,39 @@ func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Do(opts ... } -// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy": +// method id "networkconnectivity.projects.locations.serviceClasses.testIamPermissions": -type ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceClassesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsServiceConnectionPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { - c := &ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsServiceClassesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceClassesTestIamPermissionsCall { + c := &ProjectsLocationsServiceClassesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.setiampolicyrequest = setiampolicyrequest + c.testiampermissionsrequest = testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6522,21 +7326,21 @@ func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6544,14 +7348,14 @@ func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6564,14 +7368,14 @@ func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "networkconnectivity.projects.locations.serviceClasses.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6590,7 +7394,7 @@ func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6602,28 +7406,28 @@ func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Do(opts ... } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", + // "id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", // "parameterOrder": [ // "resource" // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", + // "path": "v1/{+resource}:testIamPermissions", // "request": { - // "$ref": "SetIamPolicyRequest" + // "$ref": "TestIamPermissionsRequest" // }, // "response": { - // "$ref": "Policy" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6632,39 +7436,60 @@ func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Do(opts ... } -// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions": +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.create": -type ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServiceConnectionMapsCreateCall struct { + s *Service + parent string + serviceconnectionmap *ServiceConnectionMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Create: Creates a new ServiceConnectionMap in a given project and +// location. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServiceConnectionPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { - c := &ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - parent: The parent resource's name of the ServiceConnectionMap. +func (r *ProjectsLocationsServiceConnectionMapsService) Create(parent string, serviceconnectionmap *ServiceConnectionMap) *ProjectsLocationsServiceConnectionMapsCreateCall { + c := &ProjectsLocationsServiceConnectionMapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.serviceconnectionmap = serviceconnectionmap + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionMapsCreateCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionMapsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceConnectionMapId sets the optional parameter +// "serviceConnectionMapId": Resource ID (i.e. 'foo' in +// '[...]/projects/p/locations/l/serviceConnectionMaps/foo') See +// https://google.aip.dev/122#resource-id-segments Unique per location. +// If one is not provided, one will be generated. +func (c *ProjectsLocationsServiceConnectionMapsCreateCall) ServiceConnectionMapId(serviceConnectionMapId string) *ProjectsLocationsServiceConnectionMapsCreateCall { + c.urlParams_.Set("serviceConnectionMapId", serviceConnectionMapId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6672,21 +7497,21 @@ func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) 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 *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServiceConnectionMapsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6694,14 +7519,14 @@ func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceconnectionmap) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceConnectionMaps") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6709,19 +7534,19 @@ func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) doReq } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.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 -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6740,7 +7565,7 @@ func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6752,28 +7577,193 @@ func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(op } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", + // "description": "Creates a new ServiceConnectionMap in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "parent": { + // "description": "Required. The parent resource's name of the ServiceConnectionMap.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "serviceConnectionMapId": { + // "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionMaps/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+parent}/serviceConnectionMaps", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "ServiceConnectionMap" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.delete": + +type ProjectsLocationsServiceConnectionMapsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ServiceConnectionMap. +// +// - name: The name of the ServiceConnectionMap to delete. +func (r *ProjectsLocationsServiceConnectionMapsService) Delete(name string) *ProjectsLocationsServiceConnectionMapsDeleteCall { + c := &ProjectsLocationsServiceConnectionMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionMapsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsDeleteCall { + 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 *ProjectsLocationsServiceConnectionMapsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) doRequest(alt string) (*http.Response, 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 "networkconnectivity.projects.locations.serviceConnectionMaps.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 *ProjectsLocationsServiceConnectionMapsDeleteCall) 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(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 a single ServiceConnectionMap.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the ServiceConnectionMap to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6782,6 +7772,3078 @@ func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(op } +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.get": + +type ProjectsLocationsServiceConnectionMapsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ServiceConnectionMap. +// +// - name: Name of the ServiceConnectionMap to get. +func (r *ProjectsLocationsServiceConnectionMapsService) Get(name string) *ProjectsLocationsServiceConnectionMapsGetCall { + c := &ProjectsLocationsServiceConnectionMapsGetCall{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 *ProjectsLocationsServiceConnectionMapsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionMapsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionMapsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionMapsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsGetCall) doRequest(alt string) (*http.Response, 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 "networkconnectivity.projects.locations.serviceConnectionMaps.get" call. +// Exactly one of *ServiceConnectionMap or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ServiceConnectionMap.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionMapsGetCall) Do(opts ...googleapi.CallOption) (*ServiceConnectionMap, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ServiceConnectionMap{ + ServerResponse: googleapi.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 details of a single ServiceConnectionMap.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ServiceConnectionMap to get.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ServiceConnectionMap" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy": + +type ProjectsLocationsServiceConnectionMapsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionMapsService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionMapsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.list": + +type ProjectsLocationsServiceConnectionMapsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ServiceConnectionMaps in a given project and location. +// +// - parent: The parent resource's name. +func (r *ProjectsLocationsServiceConnectionMapsService) List(parent string) *ProjectsLocationsServiceConnectionMapsListCall { + c := &ProjectsLocationsServiceConnectionMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters the results listed in the response. +func (c *ProjectsLocationsServiceConnectionMapsListCall) Filter(filter string) *ProjectsLocationsServiceConnectionMapsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsServiceConnectionMapsListCall) OrderBy(orderBy string) *ProjectsLocationsServiceConnectionMapsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results per page that should be returned. +func (c *ProjectsLocationsServiceConnectionMapsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceConnectionMapsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsServiceConnectionMapsListCall) PageToken(pageToken string) *ProjectsLocationsServiceConnectionMapsListCall { + 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 *ProjectsLocationsServiceConnectionMapsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionMapsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionMapsListCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionMapsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsListCall) doRequest(alt string) (*http.Response, 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}/serviceConnectionMaps") + 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 "networkconnectivity.projects.locations.serviceConnectionMaps.list" call. +// Exactly one of *ListServiceConnectionMapsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListServiceConnectionMapsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsServiceConnectionMapsListCall) Do(opts ...googleapi.CallOption) (*ListServiceConnectionMapsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServiceConnectionMapsResponse{ + ServerResponse: googleapi.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 ServiceConnectionMaps in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters the results listed in the response.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results per page that should be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceConnectionMaps", + // "response": { + // "$ref": "ListServiceConnectionMapsResponse" + // }, + // "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 *ProjectsLocationsServiceConnectionMapsListCall) Pages(ctx context.Context, f func(*ListServiceConnectionMapsResponse) 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 "networkconnectivity.projects.locations.serviceConnectionMaps.patch": + +type ProjectsLocationsServiceConnectionMapsPatchCall struct { + s *Service + name string + serviceconnectionmap *ServiceConnectionMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single ServiceConnectionMap. +// +// - name: Immutable. The name of a ServiceConnectionMap. Format: +// projects/{project}/locations/{location}/serviceConnectionMaps/{servi +// ce_connection_map} See: +// https://google.aip.dev/122#fields-representing-resource-names. +func (r *ProjectsLocationsServiceConnectionMapsService) Patch(name string, serviceconnectionmap *ServiceConnectionMap) *ProjectsLocationsServiceConnectionMapsPatchCall { + c := &ProjectsLocationsServiceConnectionMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.serviceconnectionmap = serviceconnectionmap + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionMapsPatchCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionMapsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the +// ServiceConnectionMap resource by the update. The fields specified in +// the update_mask are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsServiceConnectionMapsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceConnectionMapsPatchCall { + 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 *ProjectsLocationsServiceConnectionMapsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsPatchCall { + 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 *ProjectsLocationsServiceConnectionMapsPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionMapsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsPatchCall) doRequest(alt string) (*http.Response, 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.serviceconnectionmap) + 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 "networkconnectivity.projects.locations.serviceConnectionMaps.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 *ProjectsLocationsServiceConnectionMapsPatchCall) 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(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 the parameters of a single ServiceConnectionMap.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", + // "httpMethod": "PATCH", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: https://google.aip.dev/122#fields-representing-resource-names", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionMap resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ServiceConnectionMap" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy": + +type ProjectsLocationsServiceConnectionMapsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionMapsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionMapsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions": + +type ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionMapsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { + c := &ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { + 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 *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.create": + +type ProjectsLocationsServiceConnectionPoliciesCreateCall struct { + s *Service + parent string + serviceconnectionpolicy *ServiceConnectionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ServiceConnectionPolicy in a given project and +// location. +// +// - parent: The parent resource's name of the ServiceConnectionPolicy. +func (r *ProjectsLocationsServiceConnectionPoliciesService) Create(parent string, serviceconnectionpolicy *ServiceConnectionPolicy) *ProjectsLocationsServiceConnectionPoliciesCreateCall { + c := &ProjectsLocationsServiceConnectionPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.serviceconnectionpolicy = serviceconnectionpolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionPoliciesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceConnectionPolicyId sets the optional parameter +// "serviceConnectionPolicyId": Resource ID (i.e. 'foo' in +// '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See +// https://google.aip.dev/122#resource-id-segments Unique per location. +func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) ServiceConnectionPolicyId(serviceConnectionPolicyId string) *ProjectsLocationsServiceConnectionPoliciesCreateCall { + c.urlParams_.Set("serviceConnectionPolicyId", serviceConnectionPolicyId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesCreateCall { + 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 *ProjectsLocationsServiceConnectionPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) doRequest(alt string) (*http.Response, 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.serviceconnectionpolicy) + 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}/serviceConnectionPolicies") + 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 "networkconnectivity.projects.locations.serviceConnectionPolicies.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 *ProjectsLocationsServiceConnectionPoliciesCreateCall) 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(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 a new ServiceConnectionPolicy in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource's name of the ServiceConnectionPolicy.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "serviceConnectionPolicyId": { + // "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceConnectionPolicies", + // "request": { + // "$ref": "ServiceConnectionPolicy" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.delete": + +type ProjectsLocationsServiceConnectionPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ServiceConnectionPolicy. +// +// - name: The name of the ServiceConnectionPolicy to delete. +func (r *ProjectsLocationsServiceConnectionPoliciesService) Delete(name string) *ProjectsLocationsServiceConnectionPoliciesDeleteCall { + c := &ProjectsLocationsServiceConnectionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesDeleteCall { + 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 *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) doRequest(alt string) (*http.Response, 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 "networkconnectivity.projects.locations.serviceConnectionPolicies.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 *ProjectsLocationsServiceConnectionPoliciesDeleteCall) 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(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 a single ServiceConnectionPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the ServiceConnectionPolicy to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.get": + +type ProjectsLocationsServiceConnectionPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ServiceConnectionPolicy. +// +// - name: Name of the ServiceConnectionPolicy to get. +func (r *ProjectsLocationsServiceConnectionPoliciesService) Get(name string) *ProjectsLocationsServiceConnectionPoliciesGetCall { + c := &ProjectsLocationsServiceConnectionPoliciesGetCall{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 *ProjectsLocationsServiceConnectionPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) doRequest(alt string) (*http.Response, 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 "networkconnectivity.projects.locations.serviceConnectionPolicies.get" call. +// Exactly one of *ServiceConnectionPolicy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ServiceConnectionPolicy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceConnectionPolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ServiceConnectionPolicy{ + ServerResponse: googleapi.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 details of a single ServiceConnectionPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ServiceConnectionPolicy to get.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ServiceConnectionPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy": + +type ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.list": + +type ProjectsLocationsServiceConnectionPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ServiceConnectionPolicies in a given project and +// location. +// +// - parent: The parent resource's name. +func (r *ProjectsLocationsServiceConnectionPoliciesService) List(parent string) *ProjectsLocationsServiceConnectionPoliciesListCall { + c := &ProjectsLocationsServiceConnectionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters the results listed in the response. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Filter(filter string) *ProjectsLocationsServiceConnectionPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) OrderBy(orderBy string) *ProjectsLocationsServiceConnectionPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results per page that should be returned. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceConnectionPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceConnectionPoliciesListCall { + 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 *ProjectsLocationsServiceConnectionPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) doRequest(alt string) (*http.Response, 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}/serviceConnectionPolicies") + 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 "networkconnectivity.projects.locations.serviceConnectionPolicies.list" call. +// Exactly one of *ListServiceConnectionPoliciesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListServiceConnectionPoliciesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceConnectionPoliciesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServiceConnectionPoliciesResponse{ + ServerResponse: googleapi.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 ServiceConnectionPolicies in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters the results listed in the response.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results per page that should be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceConnectionPolicies", + // "response": { + // "$ref": "ListServiceConnectionPoliciesResponse" + // }, + // "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 *ProjectsLocationsServiceConnectionPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceConnectionPoliciesResponse) 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 "networkconnectivity.projects.locations.serviceConnectionPolicies.patch": + +type ProjectsLocationsServiceConnectionPoliciesPatchCall struct { + s *Service + name string + serviceconnectionpolicy *ServiceConnectionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single ServiceConnectionPolicy. +// +// - name: Immutable. The name of a ServiceConnectionPolicy. Format: +// projects/{project}/locations/{location}/serviceConnectionPolicies/{s +// ervice_connection_policy} See: +// https://google.aip.dev/122#fields-representing-resource-names. +func (r *ProjectsLocationsServiceConnectionPoliciesService) Patch(name string, serviceconnectionpolicy *ServiceConnectionPolicy) *ProjectsLocationsServiceConnectionPoliciesPatchCall { + c := &ProjectsLocationsServiceConnectionPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.serviceconnectionpolicy = serviceconnectionpolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionPoliciesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the +// ServiceConnectionPolicy resource by the update. The fields specified +// in the update_mask are relative to the resource, not the full +// request. A field will be overwritten if it is in the mask. If the +// user does not provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceConnectionPoliciesPatchCall { + 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 *ProjectsLocationsServiceConnectionPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesPatchCall { + 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 *ProjectsLocationsServiceConnectionPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) doRequest(alt string) (*http.Response, 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.serviceconnectionpolicy) + 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 "networkconnectivity.projects.locations.serviceConnectionPolicies.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 *ProjectsLocationsServiceConnectionPoliciesPatchCall) 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(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 the parameters of a single ServiceConnectionPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", + // "httpMethod": "PATCH", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ServiceConnectionPolicy" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy": + +type ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, 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.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions": + +type ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { + c := &ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { + 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 *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, 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.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionTokens.create": + +type ProjectsLocationsServiceConnectionTokensCreateCall struct { + s *Service + parent string + serviceconnectiontoken *ServiceConnectionToken + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ServiceConnectionToken in a given project and +// location. +// +// - parent: The parent resource's name of the ServiceConnectionToken. +func (r *ProjectsLocationsServiceConnectionTokensService) Create(parent string, serviceconnectiontoken *ServiceConnectionToken) *ProjectsLocationsServiceConnectionTokensCreateCall { + c := &ProjectsLocationsServiceConnectionTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.serviceconnectiontoken = serviceconnectiontoken + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionTokensCreateCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionTokensCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceConnectionTokenId sets the optional parameter +// "serviceConnectionTokenId": Resource ID (i.e. 'foo' in +// '[...]/projects/p/locations/l/ServiceConnectionTokens/foo') See +// https://google.aip.dev/122#resource-id-segments Unique per location. +// If one is not provided, one will be generated. +func (c *ProjectsLocationsServiceConnectionTokensCreateCall) ServiceConnectionTokenId(serviceConnectionTokenId string) *ProjectsLocationsServiceConnectionTokensCreateCall { + c.urlParams_.Set("serviceConnectionTokenId", serviceConnectionTokenId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionTokensCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensCreateCall { + 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 *ProjectsLocationsServiceConnectionTokensCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionTokensCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionTokensCreateCall) doRequest(alt string) (*http.Response, 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.serviceconnectiontoken) + 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}/serviceConnectionTokens") + 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 "networkconnectivity.projects.locations.serviceConnectionTokens.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 *ProjectsLocationsServiceConnectionTokensCreateCall) 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(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 a new ServiceConnectionToken in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionTokens.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource's name of the ServiceConnectionToken.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "serviceConnectionTokenId": { + // "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ServiceConnectionTokens/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceConnectionTokens", + // "request": { + // "$ref": "ServiceConnectionToken" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionTokens.delete": + +type ProjectsLocationsServiceConnectionTokensDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ServiceConnectionToken. +// +// - name: The name of the ServiceConnectionToken to delete. +func (r *ProjectsLocationsServiceConnectionTokensService) Delete(name string) *ProjectsLocationsServiceConnectionTokensDeleteCall { + c := &ProjectsLocationsServiceConnectionTokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionTokensDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensDeleteCall { + 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 *ProjectsLocationsServiceConnectionTokensDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) doRequest(alt string) (*http.Response, 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 "networkconnectivity.projects.locations.serviceConnectionTokens.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 *ProjectsLocationsServiceConnectionTokensDeleteCall) 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, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(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 a single ServiceConnectionToken.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens/{serviceConnectionTokensId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.serviceConnectionTokens.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the ServiceConnectionToken to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionTokens/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionTokens.get": + +type ProjectsLocationsServiceConnectionTokensGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ServiceConnectionToken. +// +// - name: Name of the ServiceConnectionToken to get. +func (r *ProjectsLocationsServiceConnectionTokensService) Get(name string) *ProjectsLocationsServiceConnectionTokensGetCall { + c := &ProjectsLocationsServiceConnectionTokensGetCall{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 *ProjectsLocationsServiceConnectionTokensGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionTokensGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionTokensGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionTokensGetCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionTokensGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionTokensGetCall) doRequest(alt string) (*http.Response, 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 "networkconnectivity.projects.locations.serviceConnectionTokens.get" call. +// Exactly one of *ServiceConnectionToken or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ServiceConnectionToken.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionTokensGetCall) Do(opts ...googleapi.CallOption) (*ServiceConnectionToken, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ServiceConnectionToken{ + ServerResponse: googleapi.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 details of a single ServiceConnectionToken.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens/{serviceConnectionTokensId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionTokens.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ServiceConnectionToken to get.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionTokens/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ServiceConnectionToken" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionTokens.list": + +type ProjectsLocationsServiceConnectionTokensListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ServiceConnectionTokens in a given project and location. +// +// - parent: The parent resource's name. +func (r *ProjectsLocationsServiceConnectionTokensService) List(parent string) *ProjectsLocationsServiceConnectionTokensListCall { + c := &ProjectsLocationsServiceConnectionTokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters the results listed in the response. +func (c *ProjectsLocationsServiceConnectionTokensListCall) Filter(filter string) *ProjectsLocationsServiceConnectionTokensListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsServiceConnectionTokensListCall) OrderBy(orderBy string) *ProjectsLocationsServiceConnectionTokensListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results per page that should be returned. +func (c *ProjectsLocationsServiceConnectionTokensListCall) PageSize(pageSize int64) *ProjectsLocationsServiceConnectionTokensListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsServiceConnectionTokensListCall) PageToken(pageToken string) *ProjectsLocationsServiceConnectionTokensListCall { + 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 *ProjectsLocationsServiceConnectionTokensListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServiceConnectionTokensListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionTokensListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServiceConnectionTokensListCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServiceConnectionTokensListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionTokensListCall) doRequest(alt string) (*http.Response, 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}/serviceConnectionTokens") + 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 "networkconnectivity.projects.locations.serviceConnectionTokens.list" call. +// Exactly one of *ListServiceConnectionTokensResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListServiceConnectionTokensResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsServiceConnectionTokensListCall) Do(opts ...googleapi.CallOption) (*ListServiceConnectionTokensResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServiceConnectionTokensResponse{ + ServerResponse: googleapi.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 ServiceConnectionTokens in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionTokens.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters the results listed in the response.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results per page that should be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serviceConnectionTokens", + // "response": { + // "$ref": "ListServiceConnectionTokensResponse" + // }, + // "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 *ProjectsLocationsServiceConnectionTokensListCall) Pages(ctx context.Context, f func(*ListServiceConnectionTokensResponse) 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 "networkconnectivity.projects.locations.spokes.create": type ProjectsLocationsSpokesCreateCall struct { diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index 7b5742a0402..28a0b721548 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -1116,7 +1116,7 @@ } } }, - "revision": "20230308", + "revision": "20230502", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1567,7 +1567,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 27cdf16a486..c66487738ef 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -974,7 +974,7 @@ func (s *ListSpokesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json index d6e87ef7c74..88ffff025cc 100644 --- a/playintegrity/v1/playintegrity-api.json +++ b/playintegrity/v1/playintegrity-api.json @@ -138,7 +138,7 @@ } } }, - "revision": "20230105", + "revision": "20230515", "rootUrl": "https://playintegrity.googleapis.com/", "schemas": { "AccountActivity": { @@ -284,6 +284,36 @@ }, "type": "object" }, + "GuidanceDetails": { + "description": "Contains guidance details about the Integrity API response, providing additional context to the integrity verdicts.", + "id": "GuidanceDetails", + "properties": { + "userRemediation": { + "description": "This shows when there is an issue with at least one of the integrity verdicts, and provides user remediation guidance.", + "items": { + "enum": [ + "UNKNOWN_USER_REMEDIATION", + "RESTORE_FACTORY_ROM", + "LOCK_BOOTLOADER", + "GET_UNMODIFIED_APP", + "SIGN_INTO_GOOGLE_ACCOUNT", + "INSTALL_APP_FROM_PLAY" + ], + "enumDescriptions": [ + "Catch-all for unrecognized enum values. See go/protodosdonts.", + "The user has installed a custom ROM, and should restore the device to a clean factory ROM.", + "The device bootloader has been unlocked, the user should lock the bootloader.", + "The app is unrecognized. The user should get an unmodified version of the app.", + "The user has not signed into their Google account.", + "The user has no license. They should install or purchase the app on the Google Play Store to add it to their library." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RequestDetails": { "description": "Contains the integrity request information.", "id": "RequestDetails", @@ -335,6 +365,10 @@ "$ref": "DeviceIntegrity", "description": "Required. Details about the device integrity." }, + "guidanceDetails": { + "$ref": "GuidanceDetails", + "description": "Additional guidance related to the integrity API response." + }, "requestDetails": { "$ref": "RequestDetails", "description": "Required. Details about the integrity request." diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go index b77a7ce0794..d8d0b14d84e 100644 --- a/playintegrity/v1/playintegrity-gen.go +++ b/playintegrity/v1/playintegrity-gen.go @@ -408,6 +408,52 @@ func (s *DeviceIntegrity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GuidanceDetails: Contains guidance details about the Integrity API +// response, providing additional context to the integrity verdicts. +type GuidanceDetails struct { + // UserRemediation: This shows when there is an issue with at least one + // of the integrity verdicts, and provides user remediation guidance. + // + // Possible values: + // "UNKNOWN_USER_REMEDIATION" - Catch-all for unrecognized enum + // values. See go/protodosdonts. + // "RESTORE_FACTORY_ROM" - The user has installed a custom ROM, and + // should restore the device to a clean factory ROM. + // "LOCK_BOOTLOADER" - The device bootloader has been unlocked, the + // user should lock the bootloader. + // "GET_UNMODIFIED_APP" - The app is unrecognized. The user should get + // an unmodified version of the app. + // "SIGN_INTO_GOOGLE_ACCOUNT" - The user has not signed into their + // Google account. + // "INSTALL_APP_FROM_PLAY" - The user has no license. They should + // install or purchase the app on the Google Play Store to add it to + // their library. + UserRemediation []string `json:"userRemediation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserRemediation") 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. "UserRemediation") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GuidanceDetails) MarshalJSON() ([]byte, error) { + type NoMethod GuidanceDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RequestDetails: Contains the integrity request information. type RequestDetails struct { // Nonce: Nonce that was provided in the request (which is base64 @@ -494,6 +540,10 @@ type TokenPayloadExternal struct { // DeviceIntegrity: Required. Details about the device integrity. DeviceIntegrity *DeviceIntegrity `json:"deviceIntegrity,omitempty"` + // GuidanceDetails: Additional guidance related to the integrity API + // response. + GuidanceDetails *GuidanceDetails `json:"guidanceDetails,omitempty"` + // RequestDetails: Required. Details about the integrity request. RequestDetails *RequestDetails `json:"requestDetails,omitempty"` diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index 1e7caa73e3d..1ca047da666 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -1605,7 +1605,7 @@ } } }, - "revision": "20230426", + "revision": "20230503", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -3010,6 +3010,20 @@ "description": "Options relating to the publication of each CertificateAuthority's CA certificate and CRLs and their inclusion as extensions in issued Certificates. The options set here apply to certificates issued by any CertificateAuthority in the CaPool.", "id": "PublishingOptions", "properties": { + "encodingFormat": { + "description": "Optional. Specifies the encoding format of each CertificateAuthority's CA certificate and CRLs. If this is omitted, CA certificates and CRLs will be published in PEM.", + "enum": [ + "ENCODING_FORMAT_UNSPECIFIED", + "PEM", + "DER" + ], + "enumDescriptions": [ + "Not specified. By default, PEM format will be used.", + "The CertificateAuthority's CA certificate and CRLs will be published in PEM format.", + "The CertificateAuthority's CA certificate and CRLs will be published in DER format." + ], + "type": "string" + }, "publishCaCert": { "description": "Optional. When true, publishes each CertificateAuthority's CA certificate and includes its URL in the \"Authority Information Access\" X.509 extension in all issued Certificates. If this is false, the CA certificate will not be published and the corresponding X.509 extension will not be written in issued certificates.", "type": "boolean" diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index 428effd93e8..898d48da83e 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -2673,6 +2673,19 @@ func (s *PublicKey) MarshalJSON() ([]byte, error) { // extensions in issued Certificates. The options set here apply to // certificates issued by any CertificateAuthority in the CaPool. type PublishingOptions struct { + // EncodingFormat: Optional. Specifies the encoding format of each + // CertificateAuthority's CA certificate and CRLs. If this is omitted, + // CA certificates and CRLs will be published in PEM. + // + // Possible values: + // "ENCODING_FORMAT_UNSPECIFIED" - Not specified. By default, PEM + // format will be used. + // "PEM" - The CertificateAuthority's CA certificate and CRLs will be + // published in PEM format. + // "DER" - The CertificateAuthority's CA certificate and CRLs will be + // published in DER format. + EncodingFormat string `json:"encodingFormat,omitempty"` + // PublishCaCert: Optional. When true, publishes each // CertificateAuthority's CA certificate and includes its URL in the // "Authority Information Access" X.509 extension in all issued @@ -2690,7 +2703,7 @@ type PublishingOptions struct { // CRLs are also rebuilt shortly after a certificate is revoked. PublishCrl bool `json:"publishCrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublishCaCert") to + // ForceSendFields is a list of field names (e.g. "EncodingFormat") 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 @@ -2698,12 +2711,13 @@ type PublishingOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublishCaCert") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "EncodingFormat") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if 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/script/v1/script-api.json b/script/v1/script-api.json index 87a5d34ea92..40398e8593a 100644 --- a/script/v1/script-api.json +++ b/script/v1/script-api.json @@ -887,7 +887,7 @@ } } }, - "revision": "20220323", + "revision": "20230429", "rootUrl": "https://script.googleapis.com/", "schemas": { "Content": { @@ -1314,6 +1314,20 @@ "description": "Name of the script being executed.", "type": "string" }, + "runtimeVersion": { + "description": "Which version of maestro to use to execute the script.", + "enum": [ + "RUNTIME_VERSION_UNSPECIFIED", + "DEPRECATED_ES5", + "V8" + ], + "enumDescriptions": [ + "Runtime version unset / unknown.", + "Legacy rhino version of the Apps script runtime", + "Current default V8 version of the apps script runtime." + ], + "type": "string" + }, "startTime": { "description": "Time the execution started.", "format": "google-datetime", diff --git a/script/v1/script-gen.go b/script/v1/script-gen.go index 187b0925666..5e2d962f320 100644 --- a/script/v1/script-gen.go +++ b/script/v1/script-gen.go @@ -936,6 +936,15 @@ type GoogleAppsScriptTypeProcess struct { // ProjectName: Name of the script being executed. ProjectName string `json:"projectName,omitempty"` + // RuntimeVersion: Which version of maestro to use to execute the + // script. + // + // Possible values: + // "RUNTIME_VERSION_UNSPECIFIED" - Runtime version unset / unknown. + // "DEPRECATED_ES5" - Legacy rhino version of the Apps script runtime + // "V8" - Current default V8 version of the apps script runtime. + RuntimeVersion string `json:"runtimeVersion,omitempty"` + // StartTime: Time the execution started. StartTime string `json:"startTime,omitempty"` diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 150a3788ac5..794dbf2451a 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -4143,7 +4143,7 @@ } } }, - "revision": "20230504", + "revision": "20230512", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -4402,6 +4402,20 @@ "dataProfile": { "description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", "type": "string" + }, + "parentType": { + "description": "The resource hierarchy level at which the data profile was generated.", + "enum": [ + "PARENT_TYPE_UNSPECIFIED", + "ORGANIZATION", + "PROJECT" + ], + "enumDescriptions": [ + "Unspecified parent type.", + "Organization-level configurations.", + "Project-level configurations." + ], + "type": "string" } }, "type": "object" diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index b980894a8a0..8bce0710d0f 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -1062,6 +1062,15 @@ type CloudDlpDataProfile struct { // `projects/123/locations/europe/tableProfiles/8383929`. DataProfile string `json:"dataProfile,omitempty"` + // ParentType: The resource hierarchy level at which the data profile + // was generated. + // + // Possible values: + // "PARENT_TYPE_UNSPECIFIED" - Unspecified parent type. + // "ORGANIZATION" - Organization-level configurations. + // "PROJECT" - Project-level configurations. + ParentType string `json:"parentType,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataProfile") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 8f7f6e6dba8..8a6fa1d8d71 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20230420", + "revision": "20230512", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1131,6 +1131,20 @@ "dataProfile": { "description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", "type": "string" + }, + "parentType": { + "description": "The resource hierarchy level at which the data profile was generated.", + "enum": [ + "PARENT_TYPE_UNSPECIFIED", + "ORGANIZATION", + "PROJECT" + ], + "enumDescriptions": [ + "Unspecified parent type.", + "Organization-level configurations.", + "Project-level configurations." + ], + "type": "string" } }, "type": "object" diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index e952fe74ac2..45679ba3f74 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -621,6 +621,15 @@ type CloudDlpDataProfile struct { // `projects/123/locations/europe/tableProfiles/8383929`. DataProfile string `json:"dataProfile,omitempty"` + // ParentType: The resource hierarchy level at which the data profile + // was generated. + // + // Possible values: + // "PARENT_TYPE_UNSPECIFIED" - Unspecified parent type. + // "ORGANIZATION" - Organization-level configurations. + // "PROJECT" - Project-level configurations. + ParentType string `json:"parentType,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataProfile") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index e78c8329dac..9ab531d07cb 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1981,7 +1981,7 @@ } } }, - "revision": "20230420", + "revision": "20230512", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2076,6 +2076,20 @@ "dataProfile": { "description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", "type": "string" + }, + "parentType": { + "description": "The resource hierarchy level at which the data profile was generated.", + "enum": [ + "PARENT_TYPE_UNSPECIFIED", + "ORGANIZATION", + "PROJECT" + ], + "enumDescriptions": [ + "Unspecified parent type.", + "Organization-level configurations.", + "Project-level configurations." + ], + "type": "string" } }, "type": "object" diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 5a51490bc3d..352c0470986 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -571,6 +571,15 @@ type CloudDlpDataProfile struct { // `projects/123/locations/europe/tableProfiles/8383929`. DataProfile string `json:"dataProfile,omitempty"` + // ParentType: The resource hierarchy level at which the data profile + // was generated. + // + // Possible values: + // "PARENT_TYPE_UNSPECIFIED" - Unspecified parent type. + // "ORGANIZATION" - Organization-level configurations. + // "PROJECT" - Project-level configurations. + ParentType string `json:"parentType,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataProfile") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index ac149eed2e8..04e00a28b84 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20230429", + "revision": "20230508", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -3771,7 +3771,7 @@ "type": "array" }, "state": { - "description": "Output only. The current instance config state.", + "description": "Output only. The current instance config state. Applicable only for USER_MANAGED configs.", "enum": [ "STATE_UNSPECIFIED", "CREATING", diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index da2ea4b4b37..bff2542de67 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -2504,7 +2504,8 @@ type InstanceConfig struct { // configuration and their replication properties. Replicas []*ReplicaInfo `json:"replicas,omitempty"` - // State: Output only. The current instance config state. + // State: Output only. The current instance config state. Applicable + // only for USER_MANAGED configs. // // Possible values: // "STATE_UNSPECIFIED" - Not specified. diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index b3ad8a20681..5ef0fc8215d 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2023,7 +2023,7 @@ } } }, - "revision": "20230422", + "revision": "20230510", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -3012,6 +3012,28 @@ "bakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { + "bakType": { + "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", + "enum": [ + "BAK_TYPE_UNSPECIFIED", + "FULL", + "DIFF" + ], + "enumDescriptions": [ + "default type to meet enum requirement, will be set to FULL if not set", + "Full backup.", + "Differential backup." + ], + "type": "string" + }, + "copyOnly": { + "description": "Whether or not the export will be exeucted with COPY_ONLY, SQL Server only deprecated as the behavior should default to copy_only = true use differential_base instead", + "type": "boolean" + }, + "differentialBase": { + "description": "Whether or not the backup can be use as differential base only non copy only backup can be served as differential base", + "type": "boolean" + }, "stripeCount": { "description": "Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.", "format": "int32", @@ -3342,6 +3364,20 @@ "bakImportOptions": { "description": "Import parameters specific to SQL Server .BAK files", "properties": { + "bakType": { + "description": "Type of the bak content, FULL or DIFF", + "enum": [ + "BAK_TYPE_UNSPECIFIED", + "FULL", + "DIFF" + ], + "enumDescriptions": [ + "default type to meet enum requirement, will be set to FULL if not set", + "Full backup.", + "Differential backup." + ], + "type": "string" + }, "encryptionOptions": { "properties": { "certPath": { @@ -3359,6 +3395,14 @@ }, "type": "object" }, + "noRecovery": { + "description": "Whether or not the backup importing will restore database with NORECOVERY option Applies only to Cloud SQL for SQL Server.", + "type": "boolean" + }, + "recoveryOnly": { + "description": "Whether or not the backup importing request will just bring database online without downloading Bak content only one of \"no_recovery\" and \"recovery_only\" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.", + "type": "boolean" + }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" @@ -4543,7 +4587,8 @@ "BINLOG_RETENTION_SETTING", "UNSUPPORTED_STORAGE_ENGINE", "LIMITED_SUPPORT_TABLES", - "EXISTING_DATA_IN_REPLICA" + "EXISTING_DATA_IN_REPLICA", + "MISSING_OPTIONAL_PRIVILEGES" ], "enumDescriptions": [ "", @@ -4551,7 +4596,7 @@ "", "", "", - "", + "The replication user is missing privileges that are required.", "Unsupported migration type.", "No pglogical extension installed on databases, applicable for postgres.", "pglogical node already exists on databases, applicable for postgres.", @@ -4560,7 +4605,7 @@ "The value of parameter max_replication_slots is not sufficient.", "The value of parameter max_wal_senders is not sufficient.", "The value of parameter max_worker_processes is not sufficient.", - "Extensions installed are either not supported or having unsupported versions", + "Extensions installed are either not supported or having unsupported versions.", "The value of parameter rds.logical_replication is not set to 1.", "The primary instance logging setup doesn't allow EM sync.", "The primary instance database parameter setup doesn't allow EM sync.", @@ -4568,13 +4613,14 @@ "SQL Server Agent is not running.", "The table definition is not support due to missing primary key or replica identity, applicable for postgres.", "The customer has a definer that will break EM setup.", - "SQL Server @@SERVERNAME does not match actual host name", + "SQL Server @@SERVERNAME does not match actual host name.", "The primary instance has been setup and will fail the setup.", "The primary instance has unsupported binary log format.", "The primary instance's binary log retention setting.", "The primary instance has tables with unsupported storage engine.", - "Source has tables with limited support eg: PostgreSQL tables without primary keys", - "The replica instance contains existing data." + "Source has tables with limited support eg: PostgreSQL tables without primary keys.", + "The replica instance contains existing data.", + "The replication user is missing privileges that are optional." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 76c67454476..400fa20888a 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -1668,6 +1668,26 @@ func (s *ExportContext) MarshalJSON() ([]byte, error) { // ExportContextBakExportOptions: Options for exporting BAK files (SQL // Server-only) type ExportContextBakExportOptions struct { + // BakType: Type of this bak file will be export, FULL or DIFF, SQL + // Server only + // + // Possible values: + // "BAK_TYPE_UNSPECIFIED" - default type to meet enum requirement, + // will be set to FULL if not set + // "FULL" - Full backup. + // "DIFF" - Differential backup. + BakType string `json:"bakType,omitempty"` + + // CopyOnly: Whether or not the export will be exeucted with COPY_ONLY, + // SQL Server only deprecated as the behavior should default to + // copy_only = true use differential_base instead + CopyOnly bool `json:"copyOnly,omitempty"` + + // DifferentialBase: Whether or not the backup can be use as + // differential base only non copy only backup can be served as + // differential base + DifferentialBase bool `json:"differentialBase,omitempty"` + // StripeCount: Option for specifying how many stripes to use for the // export. If blank, and the value of the striped field is true, the // number of stripes is automatically chosen. @@ -1676,7 +1696,7 @@ type ExportContextBakExportOptions struct { // Striped: Whether or not the export should be striped. Striped bool `json:"striped,omitempty"` - // ForceSendFields is a list of field names (e.g. "StripeCount") to + // ForceSendFields is a list of field names (e.g. "BakType") 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 @@ -1684,10 +1704,10 @@ type ExportContextBakExportOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StripeCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "BakType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -2162,27 +2182,45 @@ func (s *ImportContext) MarshalJSON() ([]byte, error) { // ImportContextBakImportOptions: Import parameters specific to SQL // Server .BAK files type ImportContextBakImportOptions struct { + // BakType: Type of the bak content, FULL or DIFF + // + // Possible values: + // "BAK_TYPE_UNSPECIFIED" - default type to meet enum requirement, + // will be set to FULL if not set + // "FULL" - Full backup. + // "DIFF" - Differential backup. + BakType string `json:"bakType,omitempty"` + EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"` + // NoRecovery: Whether or not the backup importing will restore database + // with NORECOVERY option Applies only to Cloud SQL for SQL Server. + NoRecovery bool `json:"noRecovery,omitempty"` + + // RecoveryOnly: Whether or not the backup importing request will just + // bring database online without downloading Bak content only one of + // "no_recovery" and "recovery_only" can be true otherwise error will + // return. Applies only to Cloud SQL for SQL Server. + RecoveryOnly bool `json:"recoveryOnly,omitempty"` + // Striped: Whether or not the backup set being restored is striped. // Applies only to Cloud SQL for SQL Server. Striped bool `json:"striped,omitempty"` - // ForceSendFields is a list of field names (e.g. "EncryptionOptions") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "BakType") 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. "EncryptionOptions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "BakType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -3889,7 +3927,8 @@ type SqlExternalSyncSettingError struct { // "BINLOG_NOT_ENABLED" // "INCOMPATIBLE_DATABASE_VERSION" // "REPLICA_ALREADY_SETUP" - // "INSUFFICIENT_PRIVILEGE" + // "INSUFFICIENT_PRIVILEGE" - The replication user is missing + // privileges that are required. // "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type. // "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on // databases, applicable for postgres. @@ -3906,7 +3945,7 @@ type SqlExternalSyncSettingError struct { // "INSUFFICIENT_MAX_WORKER_PROCESSES" - The value of parameter // max_worker_processes is not sufficient. // "UNSUPPORTED_EXTENSIONS" - Extensions installed are either not - // supported or having unsupported versions + // supported or having unsupported versions. // "INVALID_RDS_LOGICAL_REPLICATION" - The value of parameter // rds.logical_replication is not set to 1. // "INVALID_LOGGING_SETUP" - The primary instance logging setup @@ -3922,7 +3961,7 @@ type SqlExternalSyncSettingError struct { // "UNSUPPORTED_DEFINER" - The customer has a definer that will break // EM setup. // "SQLSERVER_SERVERNAME_MISMATCH" - SQL Server @@SERVERNAME does not - // match actual host name + // match actual host name. // "PRIMARY_ALREADY_SETUP" - The primary instance has been setup and // will fail the setup. // "UNSUPPORTED_BINLOG_FORMAT" - The primary instance has unsupported @@ -3932,9 +3971,11 @@ type SqlExternalSyncSettingError struct { // "UNSUPPORTED_STORAGE_ENGINE" - The primary instance has tables with // unsupported storage engine. // "LIMITED_SUPPORT_TABLES" - Source has tables with limited support - // eg: PostgreSQL tables without primary keys + // eg: PostgreSQL tables without primary keys. // "EXISTING_DATA_IN_REPLICA" - The replica instance contains existing // data. + // "MISSING_OPTIONAL_PRIVILEGES" - The replication user is missing + // privileges that are optional. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 11be0934b0c..1faede3c386 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2023,7 +2023,7 @@ } } }, - "revision": "20230422", + "revision": "20230510", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -3012,6 +3012,28 @@ "bakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { + "bakType": { + "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", + "enum": [ + "BAK_TYPE_UNSPECIFIED", + "FULL", + "DIFF" + ], + "enumDescriptions": [ + "default type to meet enum requirement, will be set to FULL if not set", + "Full backup.", + "Differential backup." + ], + "type": "string" + }, + "copyOnly": { + "description": "Whether or not the export will be exeucted with COPY_ONLY, SQL Server only deprecated as the behavior should default to copy_only = true use differential_base instead", + "type": "boolean" + }, + "differentialBase": { + "description": "Whether or not the backup can be use as differential base only non copy only backup can be served as differential base", + "type": "boolean" + }, "stripeCount": { "description": "Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.", "format": "int32", @@ -3342,6 +3364,20 @@ "bakImportOptions": { "description": "Import parameters specific to SQL Server .BAK files", "properties": { + "bakType": { + "description": "Type of the bak content, FULL or DIFF.", + "enum": [ + "BAK_TYPE_UNSPECIFIED", + "FULL", + "DIFF" + ], + "enumDescriptions": [ + "default type to meet enum requirement, will be set to FULL if not set", + "Full backup.", + "Differential backup." + ], + "type": "string" + }, "encryptionOptions": { "properties": { "certPath": { @@ -3359,6 +3395,14 @@ }, "type": "object" }, + "noRecovery": { + "description": "Whether or not the backup importing will restore database with NORECOVERY option Applies only to Cloud SQL for SQL Server.", + "type": "boolean" + }, + "recoveryOnly": { + "description": "Whether or not the backup importing request will just bring database online without downloading Bak content only one of \"no_recovery\" and \"recovery_only\" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.", + "type": "boolean" + }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" @@ -4543,7 +4587,8 @@ "BINLOG_RETENTION_SETTING", "UNSUPPORTED_STORAGE_ENGINE", "LIMITED_SUPPORT_TABLES", - "EXISTING_DATA_IN_REPLICA" + "EXISTING_DATA_IN_REPLICA", + "MISSING_OPTIONAL_PRIVILEGES" ], "enumDescriptions": [ "", @@ -4551,7 +4596,7 @@ "", "", "", - "", + "The replication user is missing privileges that are required.", "Unsupported migration type.", "No pglogical extension installed on databases, applicable for postgres.", "pglogical node already exists on databases, applicable for postgres.", @@ -4568,13 +4613,14 @@ "SQL Server Agent is not running.", "The table definition is not support due to missing primary key or replica identity, applicable for postgres.", "The customer has a definer that will break EM setup.", - "SQL Server @@SERVERNAME does not match actual host name", + "SQL Server @@SERVERNAME does not match actual host name.", "The primary instance has been setup and will fail the setup.", "The primary instance has unsupported binary log format.", "The primary instance's binary log retention setting.", "The primary instance has tables with unsupported storage engine.", "Source has tables with limited support eg: PostgreSQL tables without primary keys.", - "The replica instance contains existing data." + "The replica instance contains existing data.", + "The replication user is missing privileges that are optional." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 79b80f4ecca..2be599eda1b 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -1667,6 +1667,26 @@ func (s *ExportContext) MarshalJSON() ([]byte, error) { // ExportContextBakExportOptions: Options for exporting BAK files (SQL // Server-only) type ExportContextBakExportOptions struct { + // BakType: Type of this bak file will be export, FULL or DIFF, SQL + // Server only + // + // Possible values: + // "BAK_TYPE_UNSPECIFIED" - default type to meet enum requirement, + // will be set to FULL if not set + // "FULL" - Full backup. + // "DIFF" - Differential backup. + BakType string `json:"bakType,omitempty"` + + // CopyOnly: Whether or not the export will be exeucted with COPY_ONLY, + // SQL Server only deprecated as the behavior should default to + // copy_only = true use differential_base instead + CopyOnly bool `json:"copyOnly,omitempty"` + + // DifferentialBase: Whether or not the backup can be use as + // differential base only non copy only backup can be served as + // differential base + DifferentialBase bool `json:"differentialBase,omitempty"` + // StripeCount: Option for specifying how many stripes to use for the // export. If blank, and the value of the striped field is true, the // number of stripes is automatically chosen. @@ -1675,7 +1695,7 @@ type ExportContextBakExportOptions struct { // Striped: Whether or not the export should be striped. Striped bool `json:"striped,omitempty"` - // ForceSendFields is a list of field names (e.g. "StripeCount") to + // ForceSendFields is a list of field names (e.g. "BakType") 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 @@ -1683,10 +1703,10 @@ type ExportContextBakExportOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StripeCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "BakType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -2162,27 +2182,45 @@ func (s *ImportContext) MarshalJSON() ([]byte, error) { // ImportContextBakImportOptions: Import parameters specific to SQL // Server .BAK files type ImportContextBakImportOptions struct { + // BakType: Type of the bak content, FULL or DIFF. + // + // Possible values: + // "BAK_TYPE_UNSPECIFIED" - default type to meet enum requirement, + // will be set to FULL if not set + // "FULL" - Full backup. + // "DIFF" - Differential backup. + BakType string `json:"bakType,omitempty"` + EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"` + // NoRecovery: Whether or not the backup importing will restore database + // with NORECOVERY option Applies only to Cloud SQL for SQL Server. + NoRecovery bool `json:"noRecovery,omitempty"` + + // RecoveryOnly: Whether or not the backup importing request will just + // bring database online without downloading Bak content only one of + // "no_recovery" and "recovery_only" can be true otherwise error will + // return. Applies only to Cloud SQL for SQL Server. + RecoveryOnly bool `json:"recoveryOnly,omitempty"` + // Striped: Whether or not the backup set being restored is striped. // Applies only to Cloud SQL for SQL Server. Striped bool `json:"striped,omitempty"` - // ForceSendFields is a list of field names (e.g. "EncryptionOptions") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "BakType") 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. "EncryptionOptions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an 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. "BakType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -3888,7 +3926,8 @@ type SqlExternalSyncSettingError struct { // "BINLOG_NOT_ENABLED" // "INCOMPATIBLE_DATABASE_VERSION" // "REPLICA_ALREADY_SETUP" - // "INSUFFICIENT_PRIVILEGE" + // "INSUFFICIENT_PRIVILEGE" - The replication user is missing + // privileges that are required. // "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type. // "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on // databases, applicable for postgres. @@ -3921,7 +3960,7 @@ type SqlExternalSyncSettingError struct { // "UNSUPPORTED_DEFINER" - The customer has a definer that will break // EM setup. // "SQLSERVER_SERVERNAME_MISMATCH" - SQL Server @@SERVERNAME does not - // match actual host name + // match actual host name. // "PRIMARY_ALREADY_SETUP" - The primary instance has been setup and // will fail the setup. // "UNSUPPORTED_BINLOG_FORMAT" - The primary instance has unsupported @@ -3934,6 +3973,8 @@ type SqlExternalSyncSettingError struct { // eg: PostgreSQL tables without primary keys. // "EXISTING_DATA_IN_REPLICA" - The replica instance contains existing // data. + // "MISSING_OPTIONAL_PRIVILEGES" - The replication user is missing + // privileges that are optional. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index e5768b7aa7d..a1152aefd80 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -282,7 +282,7 @@ } } }, - "revision": "20230503", + "revision": "20230512", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -778,6 +778,13 @@ "description": "Full Java-style package name for this application, e.g. \"com.example.foo\".", "type": "string" }, + "services": { + "description": "Services contained in the tag.", + "items": { + "$ref": "Service" + }, + "type": "array" + }, "targetSdkVersion": { "description": "Specifies the API Level on which the application is designed to run.", "format": "int32", @@ -1692,6 +1699,24 @@ }, "type": "object" }, + "Service": { + "description": "The section of an tag. https://developer.android.com/guide/topics/manifest/service-element", + "id": "Service", + "properties": { + "intentFilter": { + "description": "Intent filters in the service", + "items": { + "$ref": "IntentFilter" + }, + "type": "array" + }, + "name": { + "description": "The android:name value", + "type": "string" + } + }, + "type": "object" + }, "Shard": { "description": "Output only. Details about the shard.", "id": "Shard", diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index f39f999e859..bbf77e482b9 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -94,8 +94,8 @@ const ( CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" ) -// NewService creates a new Service. -func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { +// NewService creates a new APIService. +func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only", @@ -118,23 +118,23 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err return s, nil } -// New creates a new Service. It uses the provided http.Client for requests. +// New creates a new APIService. It uses the provided http.Client for requests. // // Deprecated: please use NewService instead. // To provide a custom HTTP client, use option.WithHTTPClient. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. -func New(client *http.Client) (*Service, error) { +func New(client *http.Client) (*APIService, error) { if client == nil { return nil, errors.New("client is nil") } - s := &Service{client: client, BasePath: basePath} + s := &APIService{client: client, BasePath: basePath} s.ApplicationDetailService = NewApplicationDetailServiceService(s) s.Projects = NewProjectsService(s) s.TestEnvironmentCatalog = NewTestEnvironmentCatalogService(s) return s, nil } -type Service struct { +type APIService struct { client *http.Client BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment @@ -146,50 +146,50 @@ type Service struct { TestEnvironmentCatalog *TestEnvironmentCatalogService } -func (s *Service) userAgent() string { +func (s *APIService) userAgent() string { if s.UserAgent == "" { return googleapi.UserAgent } return googleapi.UserAgent + " " + s.UserAgent } -func NewApplicationDetailServiceService(s *Service) *ApplicationDetailServiceService { +func NewApplicationDetailServiceService(s *APIService) *ApplicationDetailServiceService { rs := &ApplicationDetailServiceService{s: s} return rs } type ApplicationDetailServiceService struct { - s *Service + s *APIService } -func NewProjectsService(s *Service) *ProjectsService { +func NewProjectsService(s *APIService) *ProjectsService { rs := &ProjectsService{s: s} rs.TestMatrices = NewProjectsTestMatricesService(s) return rs } type ProjectsService struct { - s *Service + s *APIService TestMatrices *ProjectsTestMatricesService } -func NewProjectsTestMatricesService(s *Service) *ProjectsTestMatricesService { +func NewProjectsTestMatricesService(s *APIService) *ProjectsTestMatricesService { rs := &ProjectsTestMatricesService{s: s} return rs } type ProjectsTestMatricesService struct { - s *Service + s *APIService } -func NewTestEnvironmentCatalogService(s *Service) *TestEnvironmentCatalogService { +func NewTestEnvironmentCatalogService(s *APIService) *TestEnvironmentCatalogService { rs := &TestEnvironmentCatalogService{s: s} return rs } type TestEnvironmentCatalogService struct { - s *Service + s *APIService } // Account: Identifies an account and how to log into it. @@ -860,6 +860,9 @@ type ApkManifest struct { // "com.example.foo". PackageName string `json:"packageName,omitempty"` + // Services: Services contained in the tag. + Services []*Service `json:"services,omitempty"` + // TargetSdkVersion: Specifies the API Level on which the application is // designed to run. TargetSdkVersion int64 `json:"targetSdkVersion,omitempty"` @@ -2515,6 +2518,38 @@ func (s *RoboStartingIntent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Service: The section of an tag. +// https://developer.android.com/guide/topics/manifest/service-element +type Service struct { + // IntentFilter: Intent filters in the service + IntentFilter []*IntentFilter `json:"intentFilter,omitempty"` + + // Name: The android:name value + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IntentFilter") 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. "IntentFilter") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Service) MarshalJSON() ([]byte, error) { + type NoMethod Service + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Shard: Output only. Details about the shard. type Shard struct { // NumShards: Output only. The total number of shards. @@ -3533,7 +3568,7 @@ func (s *XcodeVersion) MarshalJSON() ([]byte, error) { // method id "testing.applicationDetailService.getApkDetails": type ApplicationDetailServiceGetApkDetailsCall struct { - s *Service + s *APIService filereference *FileReference urlParams_ gensupport.URLParams ctx_ context.Context @@ -3658,7 +3693,7 @@ func (c *ApplicationDetailServiceGetApkDetailsCall) Do(opts ...googleapi.CallOpt // method id "testing.projects.testMatrices.cancel": type ProjectsTestMatricesCancelCall struct { - s *Service + s *APIService projectId string testMatrixId string urlParams_ gensupport.URLParams @@ -3806,7 +3841,7 @@ func (c *ProjectsTestMatricesCancelCall) Do(opts ...googleapi.CallOption) (*Canc // method id "testing.projects.testMatrices.create": type ProjectsTestMatricesCreateCall struct { - s *Service + s *APIService projectId string testmatrix *TestMatrix urlParams_ gensupport.URLParams @@ -3970,7 +4005,7 @@ func (c *ProjectsTestMatricesCreateCall) Do(opts ...googleapi.CallOption) (*Test // method id "testing.projects.testMatrices.get": type ProjectsTestMatricesGetCall struct { - s *Service + s *APIService projectId string testMatrixId string urlParams_ gensupport.URLParams @@ -4135,7 +4170,7 @@ func (c *ProjectsTestMatricesGetCall) Do(opts ...googleapi.CallOption) (*TestMat // method id "testing.testEnvironmentCatalog.get": type TestEnvironmentCatalogGetCall struct { - s *Service + s *APIService environmentType string urlParams_ gensupport.URLParams ifNoneMatch_ string diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index 7988a95cd17..426240c1ff1 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -728,6 +728,11 @@ "name" ], "parameters": { + "force": { + "description": "If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name.", "location": "path", @@ -892,7 +897,7 @@ } } }, - "revision": "20230420", + "revision": "20230508", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1464,6 +1469,11 @@ "description": "Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script", "type": "object" }, + "multisliceNode": { + "description": "Output only. Whether the Node belongs to a Multislice group.", + "readOnly": true, + "type": "boolean" + }, "name": { "description": "Output only. Immutable. The name of the TPU.", "readOnly": true, diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index 5224890519b..954c5aa27fa 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -1115,6 +1115,10 @@ type Node struct { // startup-script and shutdown-script Metadata map[string]string `json:"metadata,omitempty"` + // MultisliceNode: Output only. Whether the Node belongs to a Multislice + // group. + MultisliceNode bool `json:"multisliceNode,omitempty"` + // Name: Output only. Immutable. The name of the TPU. Name string `json:"name,omitempty"` @@ -4909,6 +4913,17 @@ func (r *ProjectsLocationsQueuedResourcesService) Delete(name string) *ProjectsL return c } +// Force sets the optional parameter "force": If set to true, all +// running nodes belonging to this queued resource will be deleted first +// and then the queued resource will be deleted. Otherwise (i.e. +// force=false), the queued resource will only be deleted if its nodes +// have already been deleted or the queued resource is in the ACCEPTED, +// FAILED, or SUSPENDED state. +func (c *ProjectsLocationsQueuedResourcesDeleteCall) Force(force bool) *ProjectsLocationsQueuedResourcesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // RequestId sets the optional parameter "requestId": Idempotent request // UUID. func (c *ProjectsLocationsQueuedResourcesDeleteCall) RequestId(requestId string) *ProjectsLocationsQueuedResourcesDeleteCall { @@ -5010,6 +5025,11 @@ func (c *ProjectsLocationsQueuedResourcesDeleteCall) Do(opts ...googleapi.CallOp // "name" // ], // "parameters": { + // "force": { + // "description": "If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.", + // "location": "query", + // "type": "boolean" + // }, // "name": { // "description": "Required. The resource name.", // "location": "path", diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index e66717077b3..4dd773e3f6d 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -1972,7 +1972,7 @@ } } }, - "revision": "20230420", + "revision": "20230504", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -4317,6 +4317,10 @@ "description": "Input only. The credentials password. This is write only and can not be read in a GET operation.", "type": "string" }, + "resolvedVcenterHost": { + "description": "The hostname of the vcenter.", + "type": "string" + }, "thumbprint": { "description": "The thumbprint representing the certificate for the vcenter.", "type": "string" diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 178b5c5e58c..88595a2e26c 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -3256,6 +3256,9 @@ type VmwareSourceDetails struct { // and can not be read in a GET operation. Password string `json:"password,omitempty"` + // ResolvedVcenterHost: The hostname of the vcenter. + ResolvedVcenterHost string `json:"resolvedVcenterHost,omitempty"` + // Thumbprint: The thumbprint representing the certificate for the // vcenter. Thumbprint string `json:"thumbprint,omitempty"` diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index 7b59c0d92e1..9559770e069 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -1972,7 +1972,7 @@ } } }, - "revision": "20230420", + "revision": "20230504", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -4548,6 +4548,10 @@ "description": "Input only. The credentials password. This is write only and can not be read in a GET operation.", "type": "string" }, + "resolvedVcenterHost": { + "description": "The hostname of the vcenter.", + "type": "string" + }, "thumbprint": { "description": "The thumbprint representing the certificate for the vcenter.", "type": "string" diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 3c3a39544af..ba4209c3387 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -3439,6 +3439,9 @@ type VmwareSourceDetails struct { // and can not be read in a GET operation. Password string `json:"password,omitempty"` + // ResolvedVcenterHost: The hostname of the vcenter. + ResolvedVcenterHost string `json:"resolvedVcenterHost,omitempty"` + // Thumbprint: The thumbprint representing the certificate for the // vcenter. Thumbprint string `json:"thumbprint,omitempty"` diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index 031dcd83edc..0676b512345 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -702,7 +702,7 @@ } } }, - "revision": "20230406", + "revision": "20230503", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -913,6 +913,10 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "sqlserverValidation": { + "$ref": "SqlserverValidation", + "description": "The insights data for the sqlserver workload validation." } }, "type": "object" @@ -1058,7 +1062,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { @@ -1414,26 +1418,6 @@ "description": "ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.", "type": "string" }, - "resourceState": { - "description": "Indicates whether this is a new, updated, or missing resource.", - "enum": [ - "RESOURCE_STATE_UNSPECIFIED", - "ADDED", - "UPDATED", - "REMOVED", - "REPLACED", - "MISSING" - ], - "enumDescriptions": [ - "Undefined resource state", - "Resource was added this cycle", - "Resource already discovered, just updated this cycle", - "Resource already discovered, but has been explicitly removed this cycle", - "Resource already discovered, but has been replaced by a new resource this cycle", - "Resource already discovered, but is missing or unresponsive this cycle" - ], - "type": "string" - }, "resourceType": { "description": "The type of this resource.", "enum": [ @@ -1521,6 +1505,56 @@ }, "type": "object" }, + "SqlserverValidation": { + "description": "A presentation of SQLServer workload insight. The schema of SqlServer workloads validation related data.", + "id": "SqlserverValidation", + "properties": { + "agentVersion": { + "description": "The agent version collected this data point", + "type": "string" + }, + "validationDetails": { + "description": "A list of SqlServer validation metrics data.", + "items": { + "$ref": "SqlserverValidationValidationDetail" + }, + "type": "array" + } + }, + "type": "object" + }, + "SqlserverValidationValidationDetail": { + "description": "Message describing the Sqlserver validation metrics.", + "id": "SqlserverValidationValidationDetail", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "The pairs of metrics data: field name \u0026 field value.", + "type": "object" + }, + "instanceId": { + "description": "The instance id where the ValidationDetail is generated from", + "type": "string" + }, + "type": { + "description": "The Sqlserver system that the validation data is from.", + "enum": [ + "SQLSERVER_VALIDATION_TYPE_UNSPECIFIED", + "OS", + "DB" + ], + "enumDescriptions": [ + "Unspecified type.", + "The Sqlserver system named OS", + "The Sqlserver system named DB" + ], + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index 88f4968c236..2b64a9537a5 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -477,6 +477,10 @@ type Insight struct { // SentTime: Output only. [Output only] Create time stamp SentTime string `json:"sentTime,omitempty"` + // SqlserverValidation: The insights data for the sqlserver workload + // validation. + SqlserverValidation *SqlserverValidation `json:"sqlserverValidation,omitempty"` + // ForceSendFields is a list of field names (e.g. "SapDiscovery") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -765,7 +769,7 @@ func (s *ListScannedResourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents Google Cloud Platform location. +// Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby // city name. For example, "Tokyo". @@ -1276,21 +1280,6 @@ type SapDiscoveryResource struct { // etc. ResourceKind string `json:"resourceKind,omitempty"` - // ResourceState: Indicates whether this is a new, updated, or missing - // resource. - // - // Possible values: - // "RESOURCE_STATE_UNSPECIFIED" - Undefined resource state - // "ADDED" - Resource was added this cycle - // "UPDATED" - Resource already discovered, just updated this cycle - // "REMOVED" - Resource already discovered, but has been explicitly - // removed this cycle - // "REPLACED" - Resource already discovered, but has been replaced by - // a new resource this cycle - // "MISSING" - Resource already discovered, but is missing or - // unresponsive this cycle - ResourceState string `json:"resourceState,omitempty"` - // ResourceType: The type of this resource. // // Possible values: @@ -1430,6 +1419,79 @@ func (s *ScannedResource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SqlserverValidation: A presentation of SQLServer workload insight. +// The schema of SqlServer workloads validation related data. +type SqlserverValidation struct { + // AgentVersion: The agent version collected this data point + AgentVersion string `json:"agentVersion,omitempty"` + + // ValidationDetails: A list of SqlServer validation metrics data. + ValidationDetails []*SqlserverValidationValidationDetail `json:"validationDetails,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AgentVersion") 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. "AgentVersion") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlserverValidation) MarshalJSON() ([]byte, error) { + type NoMethod SqlserverValidation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SqlserverValidationValidationDetail: Message describing the Sqlserver +// validation metrics. +type SqlserverValidationValidationDetail struct { + // Details: The pairs of metrics data: field name & field value. + Details map[string]string `json:"details,omitempty"` + + // InstanceId: The instance id where the ValidationDetail is generated + // from + InstanceId string `json:"instanceId,omitempty"` + + // Type: The Sqlserver system that the validation data is from. + // + // Possible values: + // "SQLSERVER_VALIDATION_TYPE_UNSPECIFIED" - Unspecified type. + // "OS" - The Sqlserver system named OS + // "DB" - The Sqlserver system named DB + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Details") 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. "Details") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SqlserverValidationValidationDetail) MarshalJSON() ([]byte, error) { + type NoMethod SqlserverValidationValidationDetail + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each