diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 1a291c43f20..763c3555b31 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -39597,7 +39597,7 @@ } } }, - "revision": "20220714", + "revision": "20220720", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -71166,7 +71166,7 @@ "type": "object" }, "Scheduling": { - "description": "Sets the scheduling options for an Instance. NextID: 21", + "description": "Sets the scheduling options for an Instance.", "id": "Scheduling", "properties": { "automaticRestart": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 5d152001b6e..d4ec5f8537e 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -50890,7 +50890,7 @@ func (s *ScalingScheduleStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Scheduling: Sets the scheduling options for an Instance. NextID: 21 +// 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 diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index c54e3b58b2b..4f6aa6b8001 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -31172,7 +31172,7 @@ } } }, - "revision": "20220714", + "revision": "20220720", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -57146,7 +57146,7 @@ "type": "object" }, "Scheduling": { - "description": "Sets the scheduling options for an Instance. NextID: 21", + "description": "Sets the scheduling options for an Instance.", "id": "Scheduling", "properties": { "automaticRestart": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index df6208f57c4..042a333ec42 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -41950,7 +41950,7 @@ func (s *ScalingScheduleStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Scheduling: Sets the scheduling options for an Instance. NextID: 21 +// 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 diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index fc03a0d3fa5..e00e0b8cd2f 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1055,7 +1055,7 @@ } } }, - "revision": "20220714", + "revision": "20220718", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -1295,6 +1295,20 @@ "$ref": "RoleGrant", "description": "Role grant configuration for the config variable." }, + "state": { + "description": "State of the config variable.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DEPRECATED" + ], + "enumDescriptions": [ + "Status is unspecified.", + "Config variable is active", + "Config variable is deprecated." + ], + "type": "string" + }, "validationRegex": { "description": "Regular expression in RE2 syntax used for validating the `value` of a `ConfigVariable`.", "type": "string" diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index fec6d6e7a51..6942033bb00 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -638,6 +638,14 @@ type ConfigVariableTemplate struct { // RoleGrant: Role grant configuration for the config variable. RoleGrant *RoleGrant `json:"roleGrant,omitempty"` + // State: State of the config variable. + // + // Possible values: + // "STATE_UNSPECIFIED" - Status is unspecified. + // "ACTIVE" - Config variable is active + // "DEPRECATED" - Config variable is deprecated. + State string `json:"state,omitempty"` + // ValidationRegex: Regular expression in RE2 syntax used for validating // the `value` of a `ConfigVariable`. ValidationRegex string `json:"validationRegex,omitempty"` diff --git a/gameservices/v1/gameservices-api.json b/gameservices/v1/gameservices-api.json index 4c888562dfe..d306566879d 100644 --- a/gameservices/v1/gameservices-api.json +++ b/gameservices/v1/gameservices-api.json @@ -184,117 +184,6 @@ "resources": { "gameServerDeployments": { "methods": { - "create": { - "description": "Creates a new game server deployment in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - "httpMethod": "POST", - "id": "gameservices.projects.locations.gameServerDeployments.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "deploymentId": { - "description": "Required. The ID of the game server deployment resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/gameServerDeployments", - "request": { - "$ref": "GameServerDeployment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single game server deployment.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.gameServerDeployments.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "fetchDeploymentState": { - "description": "Retrieves information about the current state of the game server deployment. Gathers all the Agones fleets and Agones autoscalers, including fleets running an older version of the game server deployment.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:fetchDeploymentState", - "httpMethod": "POST", - "id": "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:fetchDeploymentState", - "request": { - "$ref": "FetchDeploymentStateRequest" - }, - "response": { - "$ref": "FetchDeploymentStateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single game server deployment.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GameServerDeployment" - }, - "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}/gameServerDeployments/{gameServerDeploymentsId}:getIamPolicy", @@ -326,151 +215,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getRollout": { - "description": "Gets details of a single game server deployment rollout.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.getRollout", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment rollout to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}/rollout", - "response": { - "$ref": "GameServerDeploymentRollout" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists game server deployments in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more GameServerDeployments left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/gameServerDeployments", - "response": { - "$ref": "ListGameServerDeploymentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Patches a game server deployment.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.gameServerDeployments.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "GameServerDeployment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewRollout": { - "description": "Previews the game server deployment rollout. This API does not mutate the rollout resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout:preview", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.gameServerDeployments.previewRollout", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview. Defaults to the immediately after the proposed rollout completes.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Optional. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}/rollout:preview", - "request": { - "$ref": "GameServerDeploymentRollout" - }, - "response": { - "$ref": "PreviewGameServerDeploymentRolloutResponse" - }, - "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}/gameServerDeployments/{gameServerDeploymentsId}:setIamPolicy", @@ -526,175 +270,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "updateRollout": { - "description": "Patches a single game server deployment rollout. The method will not return an error if the update does not affect any existing realms. For example, the following cases will not return an error: * The default_game_server_config is changed but all existing realms use the override. * A non-existing realm is explicitly called out in the game_server_config_overrides field.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.gameServerDeployments.updateRollout", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}/rollout", - "request": { - "$ref": "GameServerDeploymentRollout" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "configs": { - "methods": { - "create": { - "description": "Creates a new game server config in a given project, location, and game server deployment. Game server configs are immutable, and are not applied until referenced in the game server deployment rollout resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - "httpMethod": "POST", - "id": "gameservices.projects.locations.gameServerDeployments.configs.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "configId": { - "description": "Required. The ID of the game server config resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/configs", - "request": { - "$ref": "GameServerConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single game server config. The deletion fails if the game server config is referenced in a game server deployment rollout.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.gameServerDeployments.configs.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server config to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single game server config.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.configs.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server config to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GameServerConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists game server configs in a given project, location, and game server deployment.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.configs.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerConfigs left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/configs", - "response": { - "$ref": "ListGameServerConfigsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } }, @@ -820,544 +395,13 @@ ] } } - }, - "realms": { - "methods": { - "create": { - "description": "Creates a new realm in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms", - "httpMethod": "POST", - "id": "gameservices.projects.locations.realms.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "realmId": { - "description": "Required. The ID of the realm resource to create.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/realms", - "request": { - "$ref": "Realm" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single realm.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.realms.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the realm to delete, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single realm.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the realm to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Realm" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists realms in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more realms left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/realms", - "response": { - "$ref": "ListRealmsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Patches a single realm.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "Realm" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewUpdate": { - "description": "Previews patches to a single realm.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}:previewUpdate", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.previewUpdate", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}:previewUpdate", - "request": { - "$ref": "Realm" - }, - "response": { - "$ref": "PreviewRealmUpdateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "gameServerClusters": { - "methods": { - "create": { - "description": "Creates a new game server cluster in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - "httpMethod": "POST", - "id": "gameservices.projects.locations.realms.gameServerClusters.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "gameServerClusterId": { - "description": "Required. The ID of the game server cluster resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/gameServerClusters", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single game server cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.realms.gameServerClusters.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single game server cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.gameServerClusters.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server cluster to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "view": { - "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - "enum": [ - "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - "Include basic information of a GameServerCluster resource as well as `cluster_state`." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GameServerCluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists game server clusters in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.gameServerClusters.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerClusters left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "view": { - "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - "enum": [ - "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - "Include basic information of a GameServerCluster resource as well as `cluster_state`." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/gameServerClusters", - "response": { - "$ref": "ListGameServerClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Patches a single game server cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.gameServerClusters.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewCreate": { - "description": "Previews creation of a new game server cluster in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters:previewCreate", - "httpMethod": "POST", - "id": "gameservices.projects.locations.realms.gameServerClusters.previewCreate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "gameServerClusterId": { - "description": "Required. The ID of the game server cluster resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "view": { - "description": "Optional. This field is deprecated. Preview will always return KubernetesClusterState.", - "enum": [ - "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - "Include basic information of a GameServerCluster resource as well as `cluster_state`." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/gameServerClusters:previewCreate", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "PreviewCreateGameServerClusterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewDelete": { - "description": "Previews deletion of a single game server cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewDelete", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.realms.gameServerClusters.previewDelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}:previewDelete", - "response": { - "$ref": "PreviewDeleteGameServerClusterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewUpdate": { - "description": "Previews updating a GameServerCluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewUpdate", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.gameServerClusters.previewUpdate", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Required. Mask of fields to update. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}:previewUpdate", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "PreviewUpdateGameServerClusterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } } } } } } }, - "revision": "20220602", + "revision": "20220719", "rootUrl": "https://gameservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -1619,541 +663,39 @@ "LOG_FAIL_CLOSED" ], "enumDescriptions": [ - "Client is not required to write a partial Gin log immediately after the authorization check. If client chooses to write one and it fails, client may either fail open (allow the operation to continue) or fail closed (handle as a DENY outcome).", - "The application's operation in the context of which this authorization check is being made may only be performed if it is successfully logged to Gin. For instance, the authorization library may satisfy this obligation by emitting a partial log entry at authorization check time and only returning ALLOW to the application if it succeeds. If a matching Rule has this directive, but the client has not indicated that it will honor such requirements, then the IAM check will result in authorization failure by setting CheckPolicyResponse.success=false." - ], - "type": "string" - } - }, - "type": "object" - }, - "DeployedClusterState": { - "description": "The game server cluster changes made by the game server deployment.", - "id": "DeployedClusterState", - "properties": { - "cluster": { - "description": "The name of the cluster.", - "type": "string" - }, - "fleetDetails": { - "description": "The details about the Agones fleets and autoscalers created in the game server cluster.", - "items": { - "$ref": "DeployedFleetDetails" - }, - "type": "array" - } - }, - "type": "object" - }, - "DeployedFleet": { - "description": "Agones fleet specification and details.", - "id": "DeployedFleet", - "properties": { - "fleet": { - "description": "The name of the Agones fleet.", - "type": "string" - }, - "fleetSpec": { - "description": "The fleet spec retrieved from the Agones fleet.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "The source spec that is used to create the Agones fleet. The GameServerConfig resource may no longer exist in the system." - }, - "status": { - "$ref": "DeployedFleetStatus", - "description": "The current status of the Agones fleet. Includes count of game servers in various states." - } - }, - "type": "object" - }, - "DeployedFleetAutoscaler": { - "description": "Details about the Agones autoscaler.", - "id": "DeployedFleetAutoscaler", - "properties": { - "autoscaler": { - "description": "The name of the Agones autoscaler.", - "type": "string" - }, - "fleetAutoscalerSpec": { - "description": "The autoscaler spec retrieved from Agones.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "The source spec that is used to create the autoscaler. The GameServerConfig resource may no longer exist in the system." - } - }, - "type": "object" - }, - "DeployedFleetDetails": { - "description": "Details of the deployed Agones fleet.", - "id": "DeployedFleetDetails", - "properties": { - "deployedAutoscaler": { - "$ref": "DeployedFleetAutoscaler", - "description": "Information about the Agones autoscaler for that fleet." - }, - "deployedFleet": { - "$ref": "DeployedFleet", - "description": "Information about the Agones fleet." - } - }, - "type": "object" - }, - "DeployedFleetStatus": { - "description": "DeployedFleetStatus has details about the Agones fleets, such as how many are running, how many are allocated, and so on.", - "id": "DeployedFleetStatus", - "properties": { - "allocatedReplicas": { - "description": "The number of GameServer replicas in the ALLOCATED state in this fleet.", - "format": "int64", - "type": "string" - }, - "readyReplicas": { - "description": "The number of GameServer replicas in the READY state in this fleet.", - "format": "int64", - "type": "string" - }, - "replicas": { - "description": "The total number of current GameServer replicas in this fleet.", - "format": "int64", - "type": "string" - }, - "reservedReplicas": { - "description": "The number of GameServer replicas in the RESERVED state in this fleet. Reserved instances won't be deleted on scale down, but won't cause an autoscaler to scale up.", - "format": "int64", - "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", - "properties": {}, - "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", - "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", - "type": "string" - }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", - "type": "string" - } - }, - "type": "object" - }, - "FetchDeploymentStateRequest": { - "description": "Request message for GameServerDeploymentsService.FetchDeploymentState.", - "id": "FetchDeploymentStateRequest", - "properties": {}, - "type": "object" - }, - "FetchDeploymentStateResponse": { - "description": "Response message for GameServerDeploymentsService.FetchDeploymentState.", - "id": "FetchDeploymentStateResponse", - "properties": { - "clusterState": { - "description": "The state of the game server deployment in each game server cluster.", - "items": { - "$ref": "DeployedClusterState" - }, - "type": "array" - }, - "unavailable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FleetConfig": { - "description": "Fleet configs for Agones.", - "id": "FleetConfig", - "properties": { - "fleetSpec": { - "description": "Agones fleet spec (see [example spec](https://agones.dev/site/docs/reference/fleet/)).", - "type": "string" - }, - "name": { - "description": "The name of the FleetConfig.", - "type": "string" - } - }, - "type": "object" - }, - "GameServerCluster": { - "description": "A game server cluster resource.", - "id": "GameServerCluster", - "properties": { - "clusterState": { - "$ref": "KubernetesClusterState", - "description": "Output only. The state of the Kubernetes cluster in preview. This will be available if view is set to FULL in the relevant list/get/preview request.", - "readOnly": true - }, - "connectionInfo": { - "$ref": "GameServerClusterConnectionInfo", - "description": "The game server cluster connection information. This information is used to manage game server clusters." - }, - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Human readable description of the cluster.", - "type": "string" - }, - "etag": { - "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this game server cluster. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GameServerClusterConnectionInfo": { - "description": "The game server cluster connection information.", - "id": "GameServerClusterConnectionInfo", - "properties": { - "gkeClusterReference": { - "$ref": "GkeClusterReference", - "description": "Reference to the GKE cluster where the game servers are installed." - }, - "namespace": { - "description": "Namespace designated on the game server cluster where the Agones game server instances will be created. Existence of the namespace will be validated during creation.", - "type": "string" - } - }, - "type": "object" - }, - "GameServerConfig": { - "description": "A game server config resource.", - "id": "GameServerConfig", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "The description of the game server config.", - "type": "string" - }, - "fleetConfigs": { - "description": "FleetConfig contains a list of Agones fleet specs. Only one FleetConfig is allowed.", - "items": { - "$ref": "FleetConfig" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this game server config. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "The resource name of the game server config, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.", - "type": "string" - }, - "scalingConfigs": { - "description": "The autoscaling settings.", - "items": { - "$ref": "ScalingConfig" - }, - "type": "array" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GameServerConfigOverride": { - "description": "A game server config override.", - "id": "GameServerConfigOverride", - "properties": { - "configVersion": { - "description": "The game server config for this override.", - "type": "string" - }, - "realmsSelector": { - "$ref": "RealmSelector", - "description": "Selector for choosing applicable realms." - } - }, - "type": "object" - }, - "GameServerDeployment": { - "description": "A game server deployment resource.", - "id": "GameServerDeployment", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Human readable description of the game server deployment.", - "type": "string" - }, - "etag": { - "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this game server deployment. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "The resource name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GameServerDeploymentRollout": { - "description": "The game server deployment rollout which represents the desired rollout state.", - "id": "GameServerDeploymentRollout", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "defaultGameServerConfig": { - "description": "The default game server config is applied to all realms unless overridden in the rollout. For example, `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.", - "type": "string" - }, - "etag": { - "description": "ETag of the resource.", - "type": "string" - }, - "gameServerConfigOverrides": { - "description": "Contains the game server config rollout overrides. Overrides are processed in the order they are listed. Once a match is found for a realm, the rest of the list is not processed.", - "items": { - "$ref": "GameServerConfigOverride" - }, - "type": "array" - }, - "name": { - "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GkeClusterReference": { - "description": "A reference to a GKE cluster.", - "id": "GkeClusterReference", - "properties": { - "cluster": { - "description": "The full or partial name of a GKE cluster, using one of the following forms: * `projects/{project}/locations/{locationId}/clusters/{cluster}` * `locations/{locationId}/clusters/{cluster}` * `{cluster}` If project and location are not specified, the project and location of the GameServerCluster resource are used to generate the full name of the GKE cluster.", - "type": "string" - } - }, - "type": "object" - }, - "KubernetesClusterState": { - "description": "The state of the Kubernetes cluster.", - "id": "KubernetesClusterState", - "properties": { - "agonesVersionInstalled": { - "description": "Output only. The version of Agones currently installed in the registered Kubernetes cluster.", - "readOnly": true, - "type": "string" - }, - "agonesVersionTargeted": { - "description": "Output only. The version of Agones that is targeted to be installed in the cluster.", - "readOnly": true, - "type": "string" - }, - "installationState": { - "description": "Output only. The state for the installed versions of Agones/Kubernetes.", - "enum": [ - "INSTALLATION_STATE_UNSPECIFIED", - "AGONES_KUBERNETES_VERSION_SUPPORTED", - "AGONES_VERSION_UNSUPPORTED", - "AGONES_KUBERNETES_VERSION_UNSUPPORTED", - "AGONES_VERSION_UNRECOGNIZED", - "KUBERNETES_VERSION_UNRECOGNIZED", - "VERSION_VERIFICATION_FAILED", - "AGONES_NOT_INSTALLED" - ], - "enumDescriptions": [ - "The default installation state. This value is used if the state is omitted.", - "Both the Agones and Kubernetes versions are supported by Google Cloud Game Servers and Agones and Kubernetes versions are compatible.", - "The installed version of Agones is not supported by Google Cloud Game Servers.", - "The installed version of Agones is supported by Google Cloud Game Servers, but the installed version of Kubernetes is not recommended or supported by the version of Agones.", - "The installed version of Agones is not recognized because the Agones controller's image name does not have a version string reported as {major}.{minor}(.{patch}).", - "The server version of Kubernetes cluster is not recognized because the API server didn't return parsable version info on path/version.", - "Failed to read or verify the version of Agones or Kubernetes. See `version_installed_error_message` for details.", - "Agones is not installed." - ], - "readOnly": true, - "type": "string" - }, - "kubernetesVersionInstalled": { - "description": "Output only. The version of Kubernetes that is currently used in the registered Kubernetes cluster (as detected by the Cloud Game Servers service).", - "readOnly": true, - "type": "string" - }, - "provider": { - "description": "Output only. The cloud provider type reported by the first node's `providerID` in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the provider type will be empty.", - "readOnly": true, - "type": "string" - }, - "versionInstalledErrorMessage": { - "description": "Output only. The detailed error message for the installed versions of Agones/Kubernetes.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "LabelSelector": { - "description": "The label selector, used to group labels on the resources.", - "id": "LabelSelector", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource labels for this selector.", - "type": "object" - } - }, - "type": "object" - }, - "ListGameServerClustersResponse": { - "description": "Response message for GameServerClustersService.ListGameServerClusters.", - "id": "ListGameServerClustersResponse", - "properties": { - "gameServerClusters": { - "description": "The list of game server clusters.", - "items": { - "$ref": "GameServerCluster" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", - "type": "string" - }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGameServerConfigsResponse": { - "description": "Response message for GameServerConfigsService.ListGameServerConfigs.", - "id": "ListGameServerConfigsResponse", - "properties": { - "gameServerConfigs": { - "description": "The list of game server configs.", - "items": { - "$ref": "GameServerConfig" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "Client is not required to write a partial Gin log immediately after the authorization check. If client chooses to write one and it fails, client may either fail open (allow the operation to continue) or fail closed (handle as a DENY outcome).", + "The application's operation in the context of which this authorization check is being made may only be performed if it is successfully logged to Gin. For instance, the authorization library may satisfy this obligation by emitting a partial log entry at authorization check time and only returning ALLOW to the application if it succeeds. If a matching Rule has this directive, but the client has not indicated that it will honor such requirements, then the IAM check will result in authorization failure by setting CheckPolicyResponse.success=false." + ], "type": "string" - }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "ListGameServerDeploymentsResponse": { - "description": "Response message for GameServerDeploymentsService.ListGameServerDeployments.", - "id": "ListGameServerDeploymentsResponse", + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "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", "properties": { - "gameServerDeployments": { - "description": "The list of game server deployments.", - "items": { - "$ref": "GameServerDeployment" - }, - "type": "array" + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" }, - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", "type": "string" }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" } }, "type": "object" @@ -2194,31 +736,6 @@ }, "type": "object" }, - "ListRealmsResponse": { - "description": "Response message for RealmsService.ListRealms.", - "id": "ListRealmsResponse", - "properties": { - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", - "type": "string" - }, - "realms": { - "description": "The list of realms.", - "items": { - "$ref": "Realm" - }, - "type": "array" - }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -2307,97 +824,6 @@ }, "type": "object" }, - "OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "OperationMetadata", - "properties": { - "apiVersion": { - "description": "Output only. API version used to start the operation.", - "readOnly": true, - "type": "string" - }, - "createTime": { - "description": "Output only. The time the operation was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "endTime": { - "description": "Output only. The time the operation finished running.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "operationStatus": { - "additionalProperties": { - "$ref": "OperationStatus" - }, - "description": "Output only. Operation status for Game Services API operations. Operation status is in the form of key-value pairs where keys are resource IDs and the values show the status of the operation. In case of failures, the value includes an error code and error message.", - "readOnly": true, - "type": "object" - }, - "requestedCancellation": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "readOnly": true, - "type": "boolean" - }, - "statusMessage": { - "description": "Output only. Human-readable status of the operation, if any.", - "readOnly": true, - "type": "string" - }, - "target": { - "description": "Output only. Server-defined resource path for the target of the operation.", - "readOnly": true, - "type": "string" - }, - "unreachable": { - "description": "Output only. List of Locations that could not be reached.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "verb": { - "description": "Output only. Name of the verb executed by the operation.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "OperationStatus": { - "id": "OperationStatus", - "properties": { - "done": { - "description": "Output only. Whether the operation is done or still in progress.", - "readOnly": true, - "type": "boolean" - }, - "errorCode": { - "description": "The error code in case of failures.", - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "INTERNAL_ERROR", - "PERMISSION_DENIED", - "CLUSTER_CONNECTION" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "errorMessage": { - "description": "The human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -2436,149 +862,6 @@ }, "type": "object" }, - "PreviewCreateGameServerClusterResponse": { - "description": "Response message for GameServerClustersService.PreviewCreateGameServerCluster.", - "id": "PreviewCreateGameServerClusterResponse", - "properties": { - "clusterState": { - "$ref": "KubernetesClusterState", - "description": "Output only. The state of the Kubernetes cluster in preview. This will be available if view is set to FULL in the relevant list/get/preview request.", - "readOnly": true - }, - "etag": { - "description": "The ETag of the game server cluster.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "PreviewDeleteGameServerClusterResponse": { - "description": "Response message for GameServerClustersService.PreviewDeleteGameServerCluster.", - "id": "PreviewDeleteGameServerClusterResponse", - "properties": { - "etag": { - "description": "The ETag of the game server cluster.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "PreviewGameServerDeploymentRolloutResponse": { - "description": "Response message for PreviewGameServerDeploymentRollout. This has details about the Agones fleet and autoscaler to be actuated.", - "id": "PreviewGameServerDeploymentRolloutResponse", - "properties": { - "etag": { - "description": "ETag of the game server deployment.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - }, - "unavailable": { - "description": "Locations that could not be reached on this request.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "PreviewRealmUpdateResponse": { - "description": "Response message for RealmsService.PreviewRealmUpdate.", - "id": "PreviewRealmUpdateResponse", - "properties": { - "etag": { - "description": "ETag of the realm.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "PreviewUpdateGameServerClusterResponse": { - "description": "Response message for GameServerClustersService.PreviewUpdateGameServerCluster", - "id": "PreviewUpdateGameServerClusterResponse", - "properties": { - "etag": { - "description": "The ETag of the game server cluster.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "Realm": { - "description": "A realm resource.", - "id": "Realm", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Human readable description of the realm.", - "type": "string" - }, - "etag": { - "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this realm. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - "type": "string" - }, - "timeZone": { - "description": "Required. Time zone where all policies targeting this realm are evaluated. The value of this field must be from the [IANA time zone database](https://www.iana.org/time-zones).", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "RealmSelector": { - "description": "The realm selector, used to match realm resources.", - "id": "RealmSelector", - "properties": { - "realms": { - "description": "List of realms to match.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Rule": { "description": "A rule to be applied in a Policy.", "id": "Rule", @@ -2645,61 +928,6 @@ }, "type": "object" }, - "ScalingConfig": { - "description": "Autoscaling config for an Agones fleet.", - "id": "ScalingConfig", - "properties": { - "fleetAutoscalerSpec": { - "description": "Required. Agones fleet autoscaler spec (see [example spec](https://agones.dev/site/docs/reference/fleetautoscaler/)).", - "type": "string" - }, - "name": { - "description": "Required. The name of the scaling config.", - "type": "string" - }, - "schedules": { - "description": "The schedules to which this scaling config applies.", - "items": { - "$ref": "Schedule" - }, - "type": "array" - }, - "selectors": { - "description": "Labels used to identify the game server clusters to which this Agones scaling config applies. A game server cluster is subject to this Agones scaling config if its labels match any of the selector entries.", - "items": { - "$ref": "LabelSelector" - }, - "type": "array" - } - }, - "type": "object" - }, - "Schedule": { - "description": "The schedule of a recurring or one time event. The event's time span is specified by start_time and end_time. If the scheduled event's timespan is larger than cron_spec added with cron_job_duration, the event is recurring. If only cron_spec and cron_job_duration are specified, the event starts at the local time specified by cron_spec, and is recurring. ``` start_time|-------[cron job]-------[cron job]-------[cron job]---|end_time cron job: cron spec start time + duration ```", - "id": "Schedule", - "properties": { - "cronJobDuration": { - "description": "The duration for the cron job event. The duration of the event is effective after the cron job's start time.", - "format": "google-duration", - "type": "string" - }, - "cronSpec": { - "description": "The cron definition of the scheduled event. See https://en.wikipedia.org/wiki/Cron. The cron spec specifies the local time as defined by the realm.", - "type": "string" - }, - "endTime": { - "description": "The end time of the event.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "The start time of the event.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -2716,21 +944,6 @@ }, "type": "object" }, - "SpecSource": { - "description": "Encapsulates Agones fleet spec and Agones autoscaler spec sources.", - "id": "SpecSource", - "properties": { - "gameServerConfigName": { - "description": "The game server config resource. Uses the form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - "type": "string" - }, - "name": { - "description": "The name of the Agones fleet config or Agones scaling config used to derive the Agones fleet or Agones autoscaler spec.", - "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", @@ -2758,87 +971,6 @@ }, "type": "object" }, - "TargetDetails": { - "description": "Details about the Agones resources.", - "id": "TargetDetails", - "properties": { - "fleetDetails": { - "description": "Agones fleet details for game server clusters and game server deployments.", - "items": { - "$ref": "TargetFleetDetails" - }, - "type": "array" - }, - "gameServerClusterName": { - "description": "The game server cluster name. Uses the form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`.", - "type": "string" - }, - "gameServerDeploymentName": { - "description": "The game server deployment name. Uses the form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "type": "string" - } - }, - "type": "object" - }, - "TargetFleet": { - "description": "Target Agones fleet specification.", - "id": "TargetFleet", - "properties": { - "name": { - "description": "The name of the Agones fleet.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "Encapsulates the source of the Agones fleet spec. The Agones fleet spec source." - } - }, - "type": "object" - }, - "TargetFleetAutoscaler": { - "description": "Target Agones autoscaler policy reference.", - "id": "TargetFleetAutoscaler", - "properties": { - "name": { - "description": "The name of the Agones autoscaler.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "Encapsulates the source of the Agones fleet spec. Details about the Agones autoscaler spec." - } - }, - "type": "object" - }, - "TargetFleetDetails": { - "description": "Details of the target Agones fleet.", - "id": "TargetFleetDetails", - "properties": { - "autoscaler": { - "$ref": "TargetFleetAutoscaler", - "description": "Reference to target Agones fleet autoscaling policy." - }, - "fleet": { - "$ref": "TargetFleet", - "description": "Reference to target Agones fleet." - } - }, - "type": "object" - }, - "TargetState": { - "description": "Encapsulates the Target state.", - "id": "TargetState", - "properties": { - "details": { - "description": "Details about Agones fleets.", - "items": { - "$ref": "TargetDetails" - }, - "type": "array" - } - }, - "type": "object" - }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", diff --git a/gameservices/v1/gameservices-gen.go b/gameservices/v1/gameservices-gen.go index 5228652a80f..2d1f544025b 100644 --- a/gameservices/v1/gameservices-gen.go +++ b/gameservices/v1/gameservices-gen.go @@ -153,7 +153,6 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.GameServerDeployments = NewProjectsLocationsGameServerDeploymentsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) - rs.Realms = NewProjectsLocationsRealmsService(s) return rs } @@ -163,29 +162,15 @@ type ProjectsLocationsService struct { GameServerDeployments *ProjectsLocationsGameServerDeploymentsService Operations *ProjectsLocationsOperationsService - - Realms *ProjectsLocationsRealmsService } func NewProjectsLocationsGameServerDeploymentsService(s *Service) *ProjectsLocationsGameServerDeploymentsService { rs := &ProjectsLocationsGameServerDeploymentsService{s: s} - rs.Configs = NewProjectsLocationsGameServerDeploymentsConfigsService(s) return rs } type ProjectsLocationsGameServerDeploymentsService struct { s *Service - - Configs *ProjectsLocationsGameServerDeploymentsConfigsService -} - -func NewProjectsLocationsGameServerDeploymentsConfigsService(s *Service) *ProjectsLocationsGameServerDeploymentsConfigsService { - rs := &ProjectsLocationsGameServerDeploymentsConfigsService{s: s} - return rs -} - -type ProjectsLocationsGameServerDeploymentsConfigsService struct { - s *Service } func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { @@ -197,27 +182,6 @@ type ProjectsLocationsOperationsService struct { s *Service } -func NewProjectsLocationsRealmsService(s *Service) *ProjectsLocationsRealmsService { - rs := &ProjectsLocationsRealmsService{s: s} - rs.GameServerClusters = NewProjectsLocationsRealmsGameServerClustersService(s) - return rs -} - -type ProjectsLocationsRealmsService struct { - s *Service - - GameServerClusters *ProjectsLocationsRealmsGameServerClustersService -} - -func NewProjectsLocationsRealmsGameServerClustersService(s *Service) *ProjectsLocationsRealmsGameServerClustersService { - rs := &ProjectsLocationsRealmsGameServerClustersService{s: s} - return rs -} - -type ProjectsLocationsRealmsGameServerClustersService struct { - s *Service -} - // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -704,191 +668,6 @@ func (s *DataAccessOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DeployedClusterState: The game server cluster changes made by the -// game server deployment. -type DeployedClusterState struct { - // Cluster: The name of the cluster. - Cluster string `json:"cluster,omitempty"` - - // FleetDetails: The details about the Agones fleets and autoscalers - // created in the game server cluster. - FleetDetails []*DeployedFleetDetails `json:"fleetDetails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Cluster") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Cluster") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeployedClusterState) MarshalJSON() ([]byte, error) { - type NoMethod DeployedClusterState - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleet: Agones fleet specification and details. -type DeployedFleet struct { - // Fleet: The name of the Agones fleet. - Fleet string `json:"fleet,omitempty"` - - // FleetSpec: The fleet spec retrieved from the Agones fleet. - FleetSpec string `json:"fleetSpec,omitempty"` - - // SpecSource: The source spec that is used to create the Agones fleet. - // The GameServerConfig resource may no longer exist in the system. - SpecSource *SpecSource `json:"specSource,omitempty"` - - // Status: The current status of the Agones fleet. Includes count of - // game servers in various states. - Status *DeployedFleetStatus `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fleet") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fleet") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleet) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleetAutoscaler: Details about the Agones autoscaler. -type DeployedFleetAutoscaler struct { - // Autoscaler: The name of the Agones autoscaler. - Autoscaler string `json:"autoscaler,omitempty"` - - // FleetAutoscalerSpec: The autoscaler spec retrieved from Agones. - FleetAutoscalerSpec string `json:"fleetAutoscalerSpec,omitempty"` - - // SpecSource: The source spec that is used to create the autoscaler. - // The GameServerConfig resource may no longer exist in the system. - SpecSource *SpecSource `json:"specSource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscaler") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscaler") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleetAutoscaler) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleetAutoscaler - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleetDetails: Details of the deployed Agones fleet. -type DeployedFleetDetails struct { - // DeployedAutoscaler: Information about the Agones autoscaler for that - // fleet. - DeployedAutoscaler *DeployedFleetAutoscaler `json:"deployedAutoscaler,omitempty"` - - // DeployedFleet: Information about the Agones fleet. - DeployedFleet *DeployedFleet `json:"deployedFleet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeployedAutoscaler") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeployedAutoscaler") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleetDetails) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleetDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleetStatus: DeployedFleetStatus has details about the Agones -// fleets, such as how many are running, how many are allocated, and so -// on. -type DeployedFleetStatus struct { - // AllocatedReplicas: The number of GameServer replicas in the ALLOCATED - // state in this fleet. - AllocatedReplicas int64 `json:"allocatedReplicas,omitempty,string"` - - // ReadyReplicas: The number of GameServer replicas in the READY state - // in this fleet. - ReadyReplicas int64 `json:"readyReplicas,omitempty,string"` - - // Replicas: The total number of current GameServer replicas in this - // fleet. - Replicas int64 `json:"replicas,omitempty,string"` - - // ReservedReplicas: The number of GameServer replicas in the RESERVED - // state in this fleet. Reserved instances won't be deleted on scale - // down, but won't cause an autoscaler to scale up. - ReservedReplicas int64 `json:"reservedReplicas,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "AllocatedReplicas") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AllocatedReplicas") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleetStatus) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleetStatus - 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 @@ -960,26 +739,21 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FetchDeploymentStateRequest: Request message for -// GameServerDeploymentsService.FetchDeploymentState. -type FetchDeploymentStateRequest struct { -} - -// FetchDeploymentStateResponse: Response message for -// GameServerDeploymentsService.FetchDeploymentState. -type FetchDeploymentStateResponse struct { - // ClusterState: The state of the game server deployment in each game - // server cluster. - ClusterState []*DeployedClusterState `json:"clusterState,omitempty"` +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` - // Unavailable: List of locations that could not be reached. - Unavailable []string `json:"unavailable,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClusterState") 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 @@ -987,31 +761,36 @@ type FetchDeploymentStateResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterState") to include - // in API requests with the JSON null value. By default, fields with - // 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. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *FetchDeploymentStateResponse) MarshalJSON() ([]byte, error) { - type NoMethod FetchDeploymentStateResponse +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FleetConfig: Fleet configs for Agones. -type FleetConfig struct { - // FleetSpec: Agones fleet spec (see example spec - // (https://agones.dev/site/docs/reference/fleet/)). - FleetSpec string `json:"fleetSpec,omitempty"` +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` - // Name: The name of the FleetConfig. - Name string `json:"name,omitempty"` + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` - // ForceSendFields is a list of field names (e.g. "FleetSpec") to + // 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 @@ -1019,62 +798,49 @@ type FleetConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FleetSpec") to include in - // API requests with the JSON null value. By default, fields with 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. "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 *FleetConfig) MarshalJSON() ([]byte, error) { - type NoMethod FleetConfig +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerCluster: A game server cluster resource. -type GameServerCluster struct { - // ClusterState: Output only. The state of the Kubernetes cluster in - // preview. This will be available if view is set to FULL in the - // relevant list/get/preview request. - ClusterState *KubernetesClusterState `json:"clusterState,omitempty"` - - // ConnectionInfo: The game server cluster connection information. This - // information is used to manage game server clusters. - ConnectionInfo *GameServerClusterConnectionInfo `json:"connectionInfo,omitempty"` - - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` - // Description: Human readable description of the cluster. - Description string `json:"description,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` - // Etag: Used to perform consistent read-modify-write updates. If not - // set, a blind "overwrite" update happens. - Etag string `json:"etag,omitempty"` + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` - // Labels: The labels associated with this game server cluster. Each - // label is a key-value pair. - Labels map[string]string `json:"labels,omitempty"` + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. The resource name of the game server cluster, in the - // following form: - // `projects/{project}/locations/{locationId}/realms/{realmId}/gameServer - // Clusters/{gameServerClusterId}`. For example, - // `projects/my-project/locations/global/realms/zanzibar/gameServerCluste - // rs/my-gke-cluster`. + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" Name string `json:"name,omitempty"` - // UpdateTime: Output only. The last-modified time. - 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. "ClusterState") to + // 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 @@ -1082,7 +848,7 @@ type GameServerCluster struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterState") to include + // 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 @@ -1091,83 +857,24 @@ type GameServerCluster struct { NullFields []string `json:"-"` } -func (s *GameServerCluster) MarshalJSON() ([]byte, error) { - type NoMethod GameServerCluster - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GameServerClusterConnectionInfo: The game server cluster connection -// information. -type GameServerClusterConnectionInfo struct { - // GkeClusterReference: Reference to the GKE cluster where the game - // servers are installed. - GkeClusterReference *GkeClusterReference `json:"gkeClusterReference,omitempty"` - - // Namespace: Namespace designated on the game server cluster where the - // Agones game server instances will be created. Existence of the - // namespace will be validated during creation. - Namespace string `json:"namespace,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GkeClusterReference") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GkeClusterReference") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GameServerClusterConnectionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GameServerClusterConnectionInfo +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerConfig: A game server config resource. -type GameServerConfig struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` - - // Description: The description of the game server config. - Description string `json:"description,omitempty"` - - // FleetConfigs: FleetConfig contains a list of Agones fleet specs. Only - // one FleetConfig is allowed. - FleetConfigs []*FleetConfig `json:"fleetConfigs,omitempty"` - - // Labels: The labels associated with this game server config. Each - // label is a key-value pair. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The resource name of the game server config, in the following - // form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}/configs/{configId}`. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-game/co - // nfigs/my-config`. - Name string `json:"name,omitempty"` - - // ScalingConfigs: The autoscaling settings. - ScalingConfigs []*ScalingConfig `json:"scalingConfigs,omitempty"` +// LogConfig: Specifies what kind of log the caller must write +type LogConfig struct { + // CloudAudit: Cloud audit options. + CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - // UpdateTime: Output only. The last-modified time. - UpdateTime string `json:"updateTime,omitempty"` + // Counter: Counter options. + Counter *CounterOptions `json:"counter,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // DataAccess: Data access options. + DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") 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 @@ -1175,7 +882,7 @@ type GameServerConfig struct { // 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 + // 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 @@ -1184,76 +891,172 @@ type GameServerConfig struct { NullFields []string `json:"-"` } -func (s *GameServerConfig) MarshalJSON() ([]byte, error) { - type NoMethod GameServerConfig +func (s *LogConfig) MarshalJSON() ([]byte, error) { + type NoMethod LogConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerConfigOverride: A game server config override. -type GameServerConfigOverride struct { - // ConfigVersion: The game server config for this override. - ConfigVersion string `json:"configVersion,omitempty"` +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` - // RealmsSelector: Selector for choosing applicable realms. - RealmsSelector *RealmSelector `json:"realmsSelector,omitempty"` + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfigVersion") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfigVersion") to include - // in API requests with the JSON null value. By default, fields with - // 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. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GameServerConfigOverride) MarshalJSON() ([]byte, error) { - type NoMethod GameServerConfigOverride +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerDeployment: A game server deployment resource. -type GameServerDeployment struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` +// 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"` - // Description: Human readable description of the game server - // deployment. - Description string `json:"description,omitempty"` + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Used to perform consistent read-modify-write updates. If not - // set, a blind "overwrite" update happens. + // 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"` - // Labels: The labels associated with this game server deployment. Each - // label is a key-value pair. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The resource name of the game server deployment, in the - // following form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}`. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-deploym - // ent`. - Name string `json:"name,omitempty"` + // Rules: If more than one rule is specified, the rules are applied in + // the following manner: - All matching LOG rules are always applied. - + // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging + // will be applied if one or more matching rule requires logging. - + // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is + // granted. Logging will be applied if one or more matching rule + // requires logging. - Otherwise, if no rule applies, permission is + // denied. + Rules []*Rule `json:"rules,omitempty"` - // UpdateTime: Output only. The last-modified time. - UpdateTime string `json:"updateTime,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. "CreateTime") to + // 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 @@ -1261,57 +1064,63 @@ type GameServerDeployment struct { // 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 + // 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 *GameServerDeployment) MarshalJSON() ([]byte, error) { - type NoMethod GameServerDeployment +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerDeploymentRollout: The game server deployment rollout which -// represents the desired rollout state. -type GameServerDeploymentRollout struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` +// Rule: A rule to be applied in a Policy. +type Rule struct { + // Action: Required + // + // Possible values: + // "NO_ACTION" - Default no action. + // "ALLOW" - Matching 'Entries' grant access. + // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller + // promises to log the request per the returned log_configs. + // "DENY" - Matching 'Entries' deny access. + // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller + // promises to log the request per the returned log_configs. + // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. + Action string `json:"action,omitempty"` - // DefaultGameServerConfig: The default game server config is applied to - // all realms unless overridden in the rollout. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-game/co - // nfigs/my-config`. - DefaultGameServerConfig string `json:"defaultGameServerConfig,omitempty"` + // Conditions: Additional restrictions that must be met. All conditions + // must pass for the rule to match. + Conditions []*Condition `json:"conditions,omitempty"` - // Etag: ETag of the resource. - Etag string `json:"etag,omitempty"` + // Description: Human-readable description of the rule. + Description string `json:"description,omitempty"` - // GameServerConfigOverrides: Contains the game server config rollout - // overrides. Overrides are processed in the order they are listed. Once - // a match is found for a realm, the rest of the list is not processed. - GameServerConfigOverrides []*GameServerConfigOverride `json:"gameServerConfigOverrides,omitempty"` - - // Name: The resource name of the game server deployment rollout, in the - // following form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}/rollout`. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-deploym - // ent/rollout`. - Name string `json:"name,omitempty"` + // In: If one or more 'in' clauses are specified, the rule matches if + // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + In []string `json:"in,omitempty"` - // UpdateTime: Output only. The last-modified time. - UpdateTime string `json:"updateTime,omitempty"` + // LogConfig: The config returned to callers of CheckPolicy for any + // entries that match the LOG action. + LogConfig []*LogConfig `json:"logConfig,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // NotIn: If one or more 'not_in' clauses are specified, the rule + // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the + // entries. The format for in and not_in entries can be found at in the + // Local IAM documentation (see go/local-iam#features). + NotIn []string `json:"notIn,omitempty"` + + // Permissions: A permission is a string of form '..' (e.g., + // 'storage.buckets.list'). A value of '*' matches all permissions, and + // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. + Permissions []string `json:"permissions,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // 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 @@ -1319,8 +1128,8 @@ type GameServerDeploymentRollout struct { // 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 + // 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. @@ -1328,24 +1137,27 @@ type GameServerDeploymentRollout struct { NullFields []string `json:"-"` } -func (s *GameServerDeploymentRollout) MarshalJSON() ([]byte, error) { - type NoMethod GameServerDeploymentRollout +func (s *Rule) MarshalJSON() ([]byte, error) { + type NoMethod Rule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GkeClusterReference: A reference to a GKE cluster. -type GkeClusterReference struct { - // Cluster: The full or partial name of a GKE cluster, using one of the - // following forms: * - // `projects/{project}/locations/{locationId}/clusters/{cluster}` * - // `locations/{locationId}/clusters/{cluster}` * `{cluster}` If project - // and location are not specified, the project and location of the - // GameServerCluster resource are used to generate the full name of the - // GKE cluster. - Cluster string `json:"cluster,omitempty"` +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cluster") to + // 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 @@ -1353,8 +1165,8 @@ type GkeClusterReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cluster") 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. @@ -1362,96 +1174,34 @@ type GkeClusterReference struct { NullFields []string `json:"-"` } -func (s *GkeClusterReference) MarshalJSON() ([]byte, error) { - type NoMethod GkeClusterReference +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// KubernetesClusterState: The state of the Kubernetes cluster. -type KubernetesClusterState struct { - // AgonesVersionInstalled: Output only. The version of Agones currently - // installed in the registered Kubernetes cluster. - AgonesVersionInstalled string `json:"agonesVersionInstalled,omitempty"` - - // AgonesVersionTargeted: Output only. The version of Agones that is - // targeted to be installed in the cluster. - AgonesVersionTargeted string `json:"agonesVersionTargeted,omitempty"` - - // InstallationState: Output only. The state for the installed versions - // of Agones/Kubernetes. - // - // Possible values: - // "INSTALLATION_STATE_UNSPECIFIED" - The default installation state. - // This value is used if the state is omitted. - // "AGONES_KUBERNETES_VERSION_SUPPORTED" - Both the Agones and - // Kubernetes versions are supported by Google Cloud Game Servers and - // Agones and Kubernetes versions are compatible. - // "AGONES_VERSION_UNSUPPORTED" - The installed version of Agones is - // not supported by Google Cloud Game Servers. - // "AGONES_KUBERNETES_VERSION_UNSUPPORTED" - The installed version of - // Agones is supported by Google Cloud Game Servers, but the installed - // version of Kubernetes is not recommended or supported by the version - // of Agones. - // "AGONES_VERSION_UNRECOGNIZED" - The installed version of Agones is - // not recognized because the Agones controller's image name does not - // have a version string reported as {major}.{minor}(.{patch}). - // "KUBERNETES_VERSION_UNRECOGNIZED" - The server version of - // Kubernetes cluster is not recognized because the API server didn't - // return parsable version info on path/version. - // "VERSION_VERIFICATION_FAILED" - Failed to read or verify the - // version of Agones or Kubernetes. See - // `version_installed_error_message` for details. - // "AGONES_NOT_INSTALLED" - Agones is not installed. - InstallationState string `json:"installationState,omitempty"` - - // KubernetesVersionInstalled: Output only. The version of Kubernetes - // that is currently used in the registered Kubernetes cluster (as - // detected by the Cloud Game Servers service). - KubernetesVersionInstalled string `json:"kubernetesVersionInstalled,omitempty"` - - // Provider: Output only. The cloud provider type reported by the first - // node's `providerID` in the list of nodes on the Kubernetes endpoint. - // On Kubernetes platforms that support zero-node clusters (like - // GKE-on-GCP), the provider type will be empty. - Provider string `json:"provider,omitempty"` - - // VersionInstalledErrorMessage: Output only. The detailed error message - // for the installed versions of Agones/Kubernetes. - VersionInstalledErrorMessage string `json:"versionInstalledErrorMessage,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AgonesVersionInstalled") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AgonesVersionInstalled") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if 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: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` -func (s *KubernetesClusterState) MarshalJSON() ([]byte, error) { - type NoMethod KubernetesClusterState - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` -// LabelSelector: The label selector, used to group labels on the -// resources. -type LabelSelector struct { - // Labels: Resource labels for this selector. - Labels map[string]string `json:"labels,omitempty"` + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Labels") 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 @@ -1459,7 +1209,7 @@ type LabelSelector struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API + // 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 @@ -1468,5914 +1218,149 @@ type LabelSelector struct { NullFields []string `json:"-"` } -func (s *LabelSelector) MarshalJSON() ([]byte, error) { - type NoMethod LabelSelector +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListGameServerClustersResponse: Response message for -// GameServerClustersService.ListGameServerClusters. -type ListGameServerClustersResponse struct { - // GameServerClusters: The list of game server clusters. - GameServerClusters []*GameServerCluster `json:"gameServerClusters,omitempty"` - - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: List of locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "GameServerClusters") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerClusters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListGameServerClustersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGameServerClustersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListGameServerConfigsResponse: Response message for -// GameServerConfigsService.ListGameServerConfigs. -type ListGameServerConfigsResponse struct { - // GameServerConfigs: The list of game server configs. - GameServerConfigs []*GameServerConfig `json:"gameServerConfigs,omitempty"` - - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: List of 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. "GameServerConfigs") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListGameServerConfigsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGameServerConfigsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListGameServerDeploymentsResponse: Response message for -// GameServerDeploymentsService.ListGameServerDeployments. -type ListGameServerDeploymentsResponse struct { - // GameServerDeployments: The list of game server deployments. - GameServerDeployments []*GameServerDeployment `json:"gameServerDeployments,omitempty"` - - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: List of 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. - // "GameServerDeployments") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerDeployments") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListGameServerDeploymentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGameServerDeploymentsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` - - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Locations") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListRealmsResponse: Response message for RealmsService.ListRealms. -type ListRealmsResponse struct { - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Realms: The list of realms. - Realms []*Realm `json:"realms,omitempty"` - - // Unreachable: List of 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 *ListRealmsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListRealmsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Location: A resource that represents Google Cloud Platform location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: - // "us-east1". - LocationId string `json:"locationId,omitempty"` - - // Metadata: Service-specific metadata. For example the available - // capacity at the given location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: Resource name for the location, which may vary between - // implementations. For example: - // "projects/example-project/locations/us-east1" - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Location) MarshalJSON() ([]byte, error) { - type NoMethod Location - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfig: Specifies what kind of log the caller must write -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *CounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - - // 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 - // sent to the server regardless of whether the field is empty or not. - // 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 - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type NoMethod LogConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: This resource represents a long-running operation that is -// the result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *Status `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` - - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationMetadata: Represents the metadata of the long-running -// operation. -type OperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - - // OperationStatus: Output only. Operation status for Game Services API - // operations. Operation status is in the form of key-value pairs where - // keys are resource IDs and the values show the status of the - // operation. In case of failures, the value includes an error code and - // error message. - OperationStatus map[string]OperationStatus `json:"operationStatus,omitempty"` - - // RequestedCancellation: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have - // successfully been cancelled have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` - - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` - - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` - - // Unreachable: Output only. List of Locations that could not be - // reached. - Unreachable []string `json:"unreachable,omitempty"` - - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ApiVersion") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationStatus struct { - // Done: Output only. Whether the operation is done or still in - // progress. - Done bool `json:"done,omitempty"` - - // ErrorCode: The error code in case of failures. - // - // Possible values: - // "ERROR_CODE_UNSPECIFIED" - // "INTERNAL_ERROR" - // "PERMISSION_DENIED" - // "CLUSTER_CONNECTION" - ErrorCode string `json:"errorCode,omitempty"` - - // ErrorMessage: The human-readable error message. - ErrorMessage string `json:"errorMessage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod OperationStatus - 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: If more than one rule is specified, the rules are applied in - // the following manner: - All matching LOG rules are always applied. - - // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging - // will be applied if one or more matching rule requires logging. - - // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. Logging will be applied if one or more matching rule - // requires logging. - Otherwise, if no rule applies, permission is - // denied. - Rules []*Rule `json:"rules,omitempty"` - - // Version: 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) -} - -// PreviewCreateGameServerClusterResponse: Response message for -// GameServerClustersService.PreviewCreateGameServerCluster. -type PreviewCreateGameServerClusterResponse struct { - // ClusterState: Output only. The state of the Kubernetes cluster in - // preview. This will be available if view is set to FULL in the - // relevant list/get/preview request. - ClusterState *KubernetesClusterState `json:"clusterState,omitempty"` - - // Etag: The ETag of the game server cluster. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClusterState") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClusterState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PreviewCreateGameServerClusterResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewCreateGameServerClusterResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewDeleteGameServerClusterResponse: Response message for -// GameServerClustersService.PreviewDeleteGameServerCluster. -type PreviewDeleteGameServerClusterResponse struct { - // Etag: The ETag of the game server cluster. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,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 *PreviewDeleteGameServerClusterResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewDeleteGameServerClusterResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewGameServerDeploymentRolloutResponse: Response message for -// PreviewGameServerDeploymentRollout. This has details about the Agones -// fleet and autoscaler to be actuated. -type PreviewGameServerDeploymentRolloutResponse struct { - // Etag: ETag of the game server deployment. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,omitempty"` - - // Unavailable: Locations that could not be reached on this request. - Unavailable []string `json:"unavailable,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 *PreviewGameServerDeploymentRolloutResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewGameServerDeploymentRolloutResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewRealmUpdateResponse: Response message for -// RealmsService.PreviewRealmUpdate. -type PreviewRealmUpdateResponse struct { - // Etag: ETag of the realm. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,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 *PreviewRealmUpdateResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewRealmUpdateResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewUpdateGameServerClusterResponse: Response message for -// GameServerClustersService.PreviewUpdateGameServerCluster -type PreviewUpdateGameServerClusterResponse struct { - // Etag: The ETag of the game server cluster. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,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 *PreviewUpdateGameServerClusterResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewUpdateGameServerClusterResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Realm: A realm resource. -type Realm struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` - - // Description: Human readable description of the realm. - Description string `json:"description,omitempty"` - - // Etag: Used to perform consistent read-modify-write updates. If not - // set, a blind "overwrite" update happens. - Etag string `json:"etag,omitempty"` - - // Labels: The labels associated with this realm. Each label is a - // key-value pair. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The resource name of the realm, in the following form: - // `projects/{project}/locations/{locationId}/realms/{realmId}`. For - // example, `projects/my-project/locations/global/realms/my-realm`. - Name string `json:"name,omitempty"` - - // TimeZone: Required. Time zone where all policies targeting this realm - // are evaluated. The value of this field must be from the IANA time - // zone database (https://www.iana.org/time-zones). - TimeZone string `json:"timeZone,omitempty"` - - // UpdateTime: Output only. The last-modified time. - 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 *Realm) MarshalJSON() ([]byte, error) { - type NoMethod Realm - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RealmSelector: The realm selector, used to match realm resources. -type RealmSelector struct { - // Realms: List of realms to match. - Realms []string `json:"realms,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Realms") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Realms") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RealmSelector) MarshalJSON() ([]byte, error) { - type NoMethod RealmSelector - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met. All conditions - // must pass for the rule to match. - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of CheckPolicy for any - // entries that match the LOG action. - LogConfig []*LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the - // entries. The format for in and not_in entries can be found at in the - // Local IAM documentation (see go/local-iam#features). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' (e.g., - // 'storage.buckets.list'). A value of '*' matches all permissions, and - // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type NoMethod Rule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ScalingConfig: Autoscaling config for an Agones fleet. -type ScalingConfig struct { - // FleetAutoscalerSpec: Required. Agones fleet autoscaler spec (see - // example spec - // (https://agones.dev/site/docs/reference/fleetautoscaler/)). - FleetAutoscalerSpec string `json:"fleetAutoscalerSpec,omitempty"` - - // Name: Required. The name of the scaling config. - Name string `json:"name,omitempty"` - - // Schedules: The schedules to which this scaling config applies. - Schedules []*Schedule `json:"schedules,omitempty"` - - // Selectors: Labels used to identify the game server clusters to which - // this Agones scaling config applies. A game server cluster is subject - // to this Agones scaling config if its labels match any of the selector - // entries. - Selectors []*LabelSelector `json:"selectors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FleetAutoscalerSpec") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FleetAutoscalerSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ScalingConfig) MarshalJSON() ([]byte, error) { - type NoMethod ScalingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Schedule: The schedule of a recurring or one time event. The event's -// time span is specified by start_time and end_time. If the scheduled -// event's timespan is larger than cron_spec added with -// cron_job_duration, the event is recurring. If only cron_spec and -// cron_job_duration are specified, the event starts at the local time -// specified by cron_spec, and is recurring. ``` start_time|-------[cron -// job]-------[cron job]-------[cron job]---|end_time cron job: cron -// spec start time + duration ``` -type Schedule struct { - // CronJobDuration: The duration for the cron job event. The duration of - // the event is effective after the cron job's start time. - CronJobDuration string `json:"cronJobDuration,omitempty"` - - // CronSpec: The cron definition of the scheduled event. See - // https://en.wikipedia.org/wiki/Cron. The cron spec specifies the local - // time as defined by the realm. - CronSpec string `json:"cronSpec,omitempty"` - - // EndTime: The end time of the event. - EndTime string `json:"endTime,omitempty"` - - // StartTime: The start time of the event. - StartTime string `json:"startTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CronJobDuration") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CronJobDuration") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Schedule) MarshalJSON() ([]byte, error) { - type NoMethod Schedule - 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 - // `resource`. The size of the policy is limited to a few 10s of KB. An - // empty policy is a valid policy but certain Google Cloud services - // (such as Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only the fields in the mask will be modified. If no - // mask is provided, the following default mask is used: `paths: - // "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Policy") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SpecSource: Encapsulates Agones fleet spec and Agones autoscaler spec -// sources. -type SpecSource struct { - // GameServerConfigName: The game server config resource. Uses the form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}/configs/{configId}`. - GameServerConfigName string `json:"gameServerConfigName,omitempty"` - - // Name: The name of the Agones fleet config or Agones scaling config - // used to derive the Agones fleet or Agones autoscaler spec. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "GameServerConfigName") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerConfigName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SpecSource) MarshalJSON() ([]byte, error) { - type NoMethod SpecSource - 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 -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetDetails: Details about the Agones resources. -type TargetDetails struct { - // FleetDetails: Agones fleet details for game server clusters and game - // server deployments. - FleetDetails []*TargetFleetDetails `json:"fleetDetails,omitempty"` - - // GameServerClusterName: The game server cluster name. Uses the form: - // `projects/{project}/locations/{locationId}/realms/{realmId}/gameServer - // Clusters/{gameServerClusterId}`. - GameServerClusterName string `json:"gameServerClusterName,omitempty"` - - // GameServerDeploymentName: The game server deployment name. Uses the - // form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}`. - GameServerDeploymentName string `json:"gameServerDeploymentName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FleetDetails") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FleetDetails") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetDetails) MarshalJSON() ([]byte, error) { - type NoMethod TargetDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetFleet: Target Agones fleet specification. -type TargetFleet struct { - // Name: The name of the Agones fleet. - Name string `json:"name,omitempty"` - - // SpecSource: Encapsulates the source of the Agones fleet spec. The - // Agones fleet spec source. - SpecSource *SpecSource `json:"specSource,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 *TargetFleet) MarshalJSON() ([]byte, error) { - type NoMethod TargetFleet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetFleetAutoscaler: Target Agones autoscaler policy reference. -type TargetFleetAutoscaler struct { - // Name: The name of the Agones autoscaler. - Name string `json:"name,omitempty"` - - // SpecSource: Encapsulates the source of the Agones fleet spec. Details - // about the Agones autoscaler spec. - SpecSource *SpecSource `json:"specSource,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 *TargetFleetAutoscaler) MarshalJSON() ([]byte, error) { - type NoMethod TargetFleetAutoscaler - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetFleetDetails: Details of the target Agones fleet. -type TargetFleetDetails struct { - // Autoscaler: Reference to target Agones fleet autoscaling policy. - Autoscaler *TargetFleetAutoscaler `json:"autoscaler,omitempty"` - - // Fleet: Reference to target Agones fleet. - Fleet *TargetFleet `json:"fleet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscaler") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscaler") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetFleetDetails) MarshalJSON() ([]byte, error) { - type NoMethod TargetFleetDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetState: Encapsulates the Target state. -type TargetState struct { - // Details: Details about Agones fleets. - Details []*TargetDetails `json:"details,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 *TargetState) MarshalJSON() ([]byte, error) { - type NoMethod TargetState - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse 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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "gameservices.projects.locations.get": - -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets information about a location. -// -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.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) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Location{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name for the location.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Location" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.list": - -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists information about the supported locations for this -// service. -// -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeUnrevealedLocations sets the optional parameter -// "includeUnrevealedLocations": If true, the returned list will include -// locations which are not yet revealed. -func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { - c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.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) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListLocationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "gameservices.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" - // }, - // "includeUnrevealedLocations": { - // "description": "If true, the returned list will include locations which are not yet revealed.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}/locations", - // "response": { - // "$ref": "ListLocationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*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) - } -} - -// method id "gameservices.projects.locations.gameServerDeployments.create": - -type ProjectsLocationsGameServerDeploymentsCreateCall struct { - s *Service - parent string - gameserverdeployment *GameServerDeployment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new game server deployment in a given project and -// location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) Create(parent string, gameserverdeployment *GameServerDeployment) *ProjectsLocationsGameServerDeploymentsCreateCall { - c := &ProjectsLocationsGameServerDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameserverdeployment = gameserverdeployment - return c -} - -// DeploymentId sets the optional parameter "deploymentId": Required. -// The ID of the game server deployment resource to create. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) DeploymentId(deploymentId string) *ProjectsLocationsGameServerDeploymentsCreateCall { - c.urlParams_.Set("deploymentId", deploymentId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeployment) - if err != nil { - return 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}/gameServerDeployments") - 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 "gameservices.projects.locations.gameServerDeployments.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new game server deployment in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "deploymentId": { - // "description": "Required. The ID of the game server deployment resource to create.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/gameServerDeployments", - // "request": { - // "$ref": "GameServerDeployment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.delete": - -type ProjectsLocationsGameServerDeploymentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single game server deployment. -// -// - name: The name of the game server deployment to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) Delete(name string) *ProjectsLocationsGameServerDeploymentsDeleteCall { - c := &ProjectsLocationsGameServerDeploymentsDeleteCall{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 *ProjectsLocationsGameServerDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single game server deployment.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.gameServerDeployments.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState": - -type ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall struct { - s *Service - name string - fetchdeploymentstaterequest *FetchDeploymentStateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// FetchDeploymentState: Retrieves information about the current state -// of the game server deployment. Gathers all the Agones fleets and -// Agones autoscalers, including fleets running an older version of the -// game server deployment. -// -// - name: The name of the game server deployment, in the following -// form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) FetchDeploymentState(name string, fetchdeploymentstaterequest *FetchDeploymentStateRequest) *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall { - c := &ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.fetchdeploymentstaterequest = fetchdeploymentstaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.fetchdeploymentstaterequest) - if err != nil { - return 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}:fetchDeploymentState") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState" call. -// Exactly one of *FetchDeploymentStateResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *FetchDeploymentStateResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Do(opts ...googleapi.CallOption) (*FetchDeploymentStateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &FetchDeploymentStateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves information about the current state of the game server deployment. Gathers all the Agones fleets and Agones autoscalers, including fleets running an older version of the game server deployment.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:fetchDeploymentState", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:fetchDeploymentState", - // "request": { - // "$ref": "FetchDeploymentStateRequest" - // }, - // "response": { - // "$ref": "FetchDeploymentStateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.get": - -type ProjectsLocationsGameServerDeploymentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single game server deployment. -// -// - name: The name of the game server deployment to retrieve, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) Get(name string) *ProjectsLocationsGameServerDeploymentsGetCall { - c := &ProjectsLocationsGameServerDeploymentsGetCall{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 *ProjectsLocationsGameServerDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.gameServerDeployments.get" call. -// Exactly one of *GameServerDeployment or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GameServerDeployment.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*GameServerDeployment, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GameServerDeployment{ - ServerResponse: googleapi.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 game server deployment.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GameServerDeployment" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.getIamPolicy": - -type ProjectsLocationsGameServerDeploymentsGetIamPolicyCall 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 *ProjectsLocationsGameServerDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c := &ProjectsLocationsGameServerDeploymentsGetIamPolicyCall{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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - 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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.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/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.getRollout": - -type ProjectsLocationsGameServerDeploymentsGetRolloutCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRollout: Gets details of a single game server deployment rollout. -// -// - name: The name of the game server deployment rollout to retrieve, -// in the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/rollout`. -func (r *ProjectsLocationsGameServerDeploymentsService) GetRollout(name string) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c := &ProjectsLocationsGameServerDeploymentsGetRolloutCall{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 *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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}/rollout") - 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 "gameservices.projects.locations.gameServerDeployments.getRollout" call. -// Exactly one of *GameServerDeploymentRollout or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GameServerDeploymentRollout.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Do(opts ...googleapi.CallOption) (*GameServerDeploymentRollout, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GameServerDeploymentRollout{ - ServerResponse: googleapi.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 game server deployment rollout.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.getRollout", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment rollout to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}/rollout", - // "response": { - // "$ref": "GameServerDeploymentRollout" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.list": - -type ProjectsLocationsGameServerDeploymentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists game server deployments in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) List(parent string) *ProjectsLocationsGameServerDeploymentsListCall { - c := &ProjectsLocationsGameServerDeploymentsListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsGameServerDeploymentsListCall) Filter(filter string) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsGameServerDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on the response's next_page_token to determine if -// there are more GameServerDeployments left to be queried. -func (c *ProjectsLocationsGameServerDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsGameServerDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsGameServerDeploymentsListCall { - 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 *ProjectsLocationsGameServerDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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}/gameServerDeployments") - 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 "gameservices.projects.locations.gameServerDeployments.list" call. -// Exactly one of *ListGameServerDeploymentsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListGameServerDeploymentsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsGameServerDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListGameServerDeploymentsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListGameServerDeploymentsResponse{ - ServerResponse: googleapi.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 game server deployments in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more GameServerDeployments left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/gameServerDeployments", - // "response": { - // "$ref": "ListGameServerDeploymentsResponse" - // }, - // "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 *ProjectsLocationsGameServerDeploymentsListCall) Pages(ctx context.Context, f func(*ListGameServerDeploymentsResponse) 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 "gameservices.projects.locations.gameServerDeployments.patch": - -type ProjectsLocationsGameServerDeploymentsPatchCall struct { - s *Service - name string - gameserverdeployment *GameServerDeployment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches a game server deployment. -// -// - name: The resource name of the game server deployment, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. For example, -// `projects/my-project/locations/global/gameServerDeployments/my-deplo -// yment`. -func (r *ProjectsLocationsGameServerDeploymentsService) Patch(name string, gameserverdeployment *GameServerDeployment) *ProjectsLocationsGameServerDeploymentsPatchCall { - c := &ProjectsLocationsGameServerDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gameserverdeployment = gameserverdeployment - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. At least one path must be -// supplied in this field. For more information, see the `FieldMask` -// definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGameServerDeploymentsPatchCall { - 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 *ProjectsLocationsGameServerDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeployment) - if err != nil { - return 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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches a game server deployment.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.gameServerDeployments.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "GameServerDeployment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.previewRollout": - -type ProjectsLocationsGameServerDeploymentsPreviewRolloutCall struct { - s *Service - name string - gameserverdeploymentrollout *GameServerDeploymentRollout - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PreviewRollout: Previews the game server deployment rollout. This API -// does not mutate the rollout resource. -// -// - name: The resource name of the game server deployment rollout, in -// the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/rollout`. For example, -// `projects/my-project/locations/global/gameServerDeployments/my-deplo -// yment/rollout`. -func (r *ProjectsLocationsGameServerDeploymentsService) PreviewRollout(name string, gameserverdeploymentrollout *GameServerDeploymentRollout) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c := &ProjectsLocationsGameServerDeploymentsPreviewRolloutCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gameserverdeploymentrollout = gameserverdeploymentrollout - return c -} - -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. Defaults to the immediately after -// the proposed rollout completes. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) PreviewTime(previewTime string) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c.urlParams_.Set("previewTime", previewTime) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The update mask -// to apply to the resource. At least one path must be supplied in this -// field. For more information, see the `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) UpdateMask(updateMask string) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - 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 *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeploymentrollout) - if err != nil { - return 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}/rollout:preview") - 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 "gameservices.projects.locations.gameServerDeployments.previewRollout" call. -// Exactly one of *PreviewGameServerDeploymentRolloutResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *PreviewGameServerDeploymentRolloutResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Do(opts ...googleapi.CallOption) (*PreviewGameServerDeploymentRolloutResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &PreviewGameServerDeploymentRolloutResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Previews the game server deployment rollout. This API does not mutate the rollout resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout:preview", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.gameServerDeployments.previewRollout", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview. Defaults to the immediately after the proposed rollout completes.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Optional. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}/rollout:preview", - // "request": { - // "$ref": "GameServerDeploymentRollout" - // }, - // "response": { - // "$ref": "PreviewGameServerDeploymentRolloutResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.setIamPolicy": - -type ProjectsLocationsGameServerDeploymentsSetIamPolicyCall 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 *ProjectsLocationsGameServerDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { - c := &ProjectsLocationsGameServerDeploymentsSetIamPolicyCall{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 *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.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/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.testIamPermissions": - -type ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall 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 *ProjectsLocationsGameServerDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { - c := &ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall{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 *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) 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, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, 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}/gameServerDeployments/{gameServerDeploymentsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.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/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.updateRollout": - -type ProjectsLocationsGameServerDeploymentsUpdateRolloutCall struct { - s *Service - name string - gameserverdeploymentrollout *GameServerDeploymentRollout - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateRollout: Patches a single game server deployment rollout. The -// method will not return an error if the update does not affect any -// existing realms. For example, the following cases will not return an -// error: * The default_game_server_config is changed but all existing -// realms use the override. * A non-existing realm is explicitly called -// out in the game_server_config_overrides field. -// -// - name: The resource name of the game server deployment rollout, in -// the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/rollout`. For example, -// `projects/my-project/locations/global/gameServerDeployments/my-deplo -// yment/rollout`. -func (r *ProjectsLocationsGameServerDeploymentsService) UpdateRollout(name string, gameserverdeploymentrollout *GameServerDeploymentRollout) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - c := &ProjectsLocationsGameServerDeploymentsUpdateRolloutCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gameserverdeploymentrollout = gameserverdeploymentrollout - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. At least one path must be -// supplied in this field. For more information, see the `FieldMask` -// definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) UpdateMask(updateMask string) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - 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 *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeploymentrollout) - if err != nil { - return 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}/rollout") - 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 "gameservices.projects.locations.gameServerDeployments.updateRollout" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches a single game server deployment rollout. The method will not return an error if the update does not affect any existing realms. For example, the following cases will not return an error: * The default_game_server_config is changed but all existing realms use the override. * A non-existing realm is explicitly called out in the game_server_config_overrides field.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.gameServerDeployments.updateRollout", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}/rollout", - // "request": { - // "$ref": "GameServerDeploymentRollout" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.create": - -type ProjectsLocationsGameServerDeploymentsConfigsCreateCall struct { - s *Service - parent string - gameserverconfig *GameServerConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new game server config in a given project, -// location, and game server deployment. Game server configs are -// immutable, and are not applied until referenced in the game server -// deployment rollout resource. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) Create(parent string, gameserverconfig *GameServerConfig) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameserverconfig = gameserverconfig - return c -} - -// ConfigId sets the optional parameter "configId": Required. The ID of -// the game server config resource to create. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) ConfigId(configId string) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c.urlParams_.Set("configId", configId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverconfig) - if err != nil { - return 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}/configs") - 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 "gameservices.projects.locations.gameServerDeployments.configs.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new game server config in a given project, location, and game server deployment. Game server configs are immutable, and are not applied until referenced in the game server deployment rollout resource.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "configId": { - // "description": "Required. The ID of the game server config resource to create.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/configs", - // "request": { - // "$ref": "GameServerConfig" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.delete": - -type ProjectsLocationsGameServerDeploymentsConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single game server config. The deletion fails if -// the game server config is referenced in a game server deployment -// rollout. -// -// - name: The name of the game server config to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/configs/{configId}`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) Delete(name string) *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsDeleteCall{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 *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.gameServerDeployments.configs.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 *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single game server config. The deletion fails if the game server config is referenced in a game server deployment rollout.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server config to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.get": - -type ProjectsLocationsGameServerDeploymentsConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single game server config. -// -// - name: The name of the game server config to retrieve, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/configs/{configId}`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) Get(name string) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsGetCall{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 *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.gameServerDeployments.configs.get" call. -// Exactly one of *GameServerConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GameServerConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Do(opts ...googleapi.CallOption) (*GameServerConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GameServerConfig{ - ServerResponse: googleapi.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 game server config.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server config to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GameServerConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.list": - -type ProjectsLocationsGameServerDeploymentsConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists game server configs in a given project, location, and -// game server deployment. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/configs/*`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) List(parent string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Filter(filter string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on response's next_page_token to determine if there -// are more GameServerConfigs left to be queried. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) PageToken(pageToken string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - 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 *ProjectsLocationsGameServerDeploymentsConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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}/configs") - 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 "gameservices.projects.locations.gameServerDeployments.configs.list" call. -// Exactly one of *ListGameServerConfigsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListGameServerConfigsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGameServerConfigsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListGameServerConfigsResponse{ - ServerResponse: googleapi.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 game server configs in a given project, location, and game server deployment.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerConfigs left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/configs", - // "response": { - // "$ref": "ListGameServerConfigsResponse" - // }, - // "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 *ProjectsLocationsGameServerDeploymentsConfigsListCall) Pages(ctx context.Context, f func(*ListGameServerConfigsResponse) 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 "gameservices.projects.locations.operations.cancel": - -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.operations.delete": - -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. -// -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.operations.get": - -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.operations.list": - -type ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. -// -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}/operations", - // "response": { - // "$ref": "ListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "gameservices.projects.locations.realms.create": - -type ProjectsLocationsRealmsCreateCall struct { - s *Service - parent string - realm *Realm - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new realm in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsRealmsService) Create(parent string, realm *Realm) *ProjectsLocationsRealmsCreateCall { - c := &ProjectsLocationsRealmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.realm = realm - return c -} - -// RealmId sets the optional parameter "realmId": Required. The ID of -// the realm resource to create. -func (c *ProjectsLocationsRealmsCreateCall) RealmId(realmId string) *ProjectsLocationsRealmsCreateCall { - c.urlParams_.Set("realmId", realmId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRealmsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsCreateCall) Context(ctx context.Context) *ProjectsLocationsRealmsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.realm) - if err != nil { - return 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}/realms") - 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 "gameservices.projects.locations.realms.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new realm in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.realms.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "realmId": { - // "description": "Required. The ID of the realm resource to create.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/realms", - // "request": { - // "$ref": "Realm" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.realms.delete": - -type ProjectsLocationsRealmsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single realm. -// -// - name: The name of the realm to delete, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsService) Delete(name string) *ProjectsLocationsRealmsDeleteCall { - c := &ProjectsLocationsRealmsDeleteCall{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 *ProjectsLocationsRealmsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRealmsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.realms.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 *ProjectsLocationsRealmsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single realm.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.realms.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the realm to delete, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.realms.get": - -type ProjectsLocationsRealmsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single realm. -// -// - name: The name of the realm to retrieve, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsService) Get(name string) *ProjectsLocationsRealmsGetCall { - c := &ProjectsLocationsRealmsGetCall{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 *ProjectsLocationsRealmsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsGetCall) Context(ctx context.Context) *ProjectsLocationsRealmsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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 "gameservices.projects.locations.realms.get" call. -// Exactly one of *Realm or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Realm.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsRealmsGetCall) Do(opts ...googleapi.CallOption) (*Realm, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Realm{ - ServerResponse: googleapi.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 realm.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the realm to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "Realm" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.realms.list": - -type ProjectsLocationsRealmsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists realms in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsRealmsService) List(parent string) *ProjectsLocationsRealmsListCall { - c := &ProjectsLocationsRealmsListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsRealmsListCall) Filter(filter string) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsRealmsListCall) OrderBy(orderBy string) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on the response's next_page_token to determine if -// there are more realms left to be queried. -func (c *ProjectsLocationsRealmsListCall) PageSize(pageSize int64) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsRealmsListCall) PageToken(pageToken string) *ProjectsLocationsRealmsListCall { - 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 *ProjectsLocationsRealmsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsListCall) Context(ctx context.Context) *ProjectsLocationsRealmsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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}/realms") - 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 "gameservices.projects.locations.realms.list" call. -// Exactly one of *ListRealmsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListRealmsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsListCall) Do(opts ...googleapi.CallOption) (*ListRealmsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListRealmsResponse{ - ServerResponse: googleapi.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 realms in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more realms left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/realms", - // "response": { - // "$ref": "ListRealmsResponse" - // }, - // "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 *ProjectsLocationsRealmsListCall) Pages(ctx context.Context, f func(*ListRealmsResponse) 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 "gameservices.projects.locations.realms.patch": - -type ProjectsLocationsRealmsPatchCall struct { - s *Service - name string - realm *Realm - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} + // 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:"-"` -// Patch: Patches a single realm. -// -// - name: The resource name of the realm, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. For -// example, `projects/my-project/locations/global/realms/my-realm`. -func (r *ProjectsLocationsRealmsService) Patch(name string, realm *Realm) *ProjectsLocationsRealmsPatchCall { - c := &ProjectsLocationsRealmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.realm = realm - return c + // 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:"-"` } -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. For more information, see the -// `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRealmsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsPatchCall) Context(ctx context.Context) *ProjectsLocationsRealmsPatchCall { - c.ctx_ = ctx - return c -} + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} + // 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:"-"` -func (c *ProjectsLocationsRealmsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.realm) - if err != nil { - return 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) + // 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:"-"` } -// Do executes the "gameservices.projects.locations.realms.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 *ProjectsLocationsRealmsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches a single realm.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "Realm" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "gameservices.projects.locations.realms.previewUpdate": +// method id "gameservices.projects.locations.get": -type ProjectsLocationsRealmsPreviewUpdateCall struct { - s *Service - name string - realm *Realm - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PreviewUpdate: Previews patches to a single realm. +// Get: Gets information about a location. // -// - name: The resource name of the realm, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. For -// example, `projects/my-project/locations/global/realms/my-realm`. -func (r *ProjectsLocationsRealmsService) PreviewUpdate(name string, realm *Realm) *ProjectsLocationsRealmsPreviewUpdateCall { - c := &ProjectsLocationsRealmsPreviewUpdateCall{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 - c.realm = realm - return c -} - -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsPreviewUpdateCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsPreviewUpdateCall { - c.urlParams_.Set("previewTime", previewTime) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. For more information, see the -// `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsPreviewUpdateCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsPreviewUpdateCall { - 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 *ProjectsLocationsRealmsPreviewUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsPreviewUpdateCall { +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 *ProjectsLocationsRealmsPreviewUpdateCall) Context(ctx context.Context) *ProjectsLocationsRealmsPreviewUpdateCall { +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 *ProjectsLocationsRealmsPreviewUpdateCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsPreviewUpdateCall) 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()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.realm) - 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}:previewUpdate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -7386,14 +1371,14 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.previewUpdate" call. -// Exactly one of *PreviewRealmUpdateResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *PreviewRealmUpdateResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOption) (*PreviewRealmUpdateResponse, error) { +// Do executes the "gameservices.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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7412,7 +1397,7 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewRealmUpdateResponse{ + ret := &Location{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7424,40 +1409,25 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Previews patches to a single realm.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}:previewUpdate", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.previewUpdate", + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", + // "description": "Resource name for the location.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}:previewUpdate", - // "request": { - // "$ref": "Realm" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "PreviewRealmUpdateResponse" + // "$ref": "Location" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7466,98 +1436,129 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOpti } -// method id "gameservices.projects.locations.realms.gameServerClusters.create": +// method id "gameservices.projects.locations.list": -type ProjectsLocationsRealmsGameServerClustersCreateCall struct { - s *Service - parent string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new game server cluster in a given project and -// location. +// List: Lists information about the supported locations for this +// service. // -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Create(parent string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersCreateCall { - c := &ProjectsLocationsRealmsGameServerClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameservercluster = gameservercluster +// - 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 +} + +// IncludeUnrevealedLocations sets the optional parameter +// "includeUnrevealedLocations": If true, the returned list will include +// locations which are not yet revealed. +func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { + c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) return c } -// GameServerClusterId sets the optional parameter -// "gameServerClusterId": Required. The ID of the game server cluster -// resource to create. -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) GameServerClusterId(gameServerClusterId string) *ProjectsLocationsRealmsGameServerClustersCreateCall { - c.urlParams_.Set("gameServerClusterId", gameServerClusterId) +// 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 *ProjectsLocationsRealmsGameServerClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersCreateCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersCreateCall { +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 *ProjectsLocationsRealmsGameServerClustersCreateCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) 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_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) - 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}/gameServerClusters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") 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 "gameservices.projects.locations.realms.gameServerClusters.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "gameservices.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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7576,7 +1577,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7588,33 +1589,46 @@ func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Creates a new game server cluster in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.realms.gameServerClusters.create", + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "gameServerClusterId": { - // "description": "Required. The ID of the game server cluster resource to create.", + // "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" // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", + // "includeUnrevealedLocations": { + // "description": "If true, the returned list will include locations which are not yet revealed.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", + // "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/{+parent}/gameServerClusters", - // "request": { - // "$ref": "GameServerCluster" - // }, + // "path": "v1/{+name}/locations", // "response": { - // "$ref": "Operation" + // "$ref": "ListLocationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7623,84 +1637,139 @@ func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googlea } -// method id "gameservices.projects.locations.realms.gameServerClusters.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 *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) + } +} + +// method id "gameservices.projects.locations.gameServerDeployments.getIamPolicy": -type ProjectsLocationsRealmsGameServerClustersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGameServerDeploymentsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single game server cluster. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: The name of the game server cluster to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerClusters/{gameS -// erverClusterId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Delete(name string) *ProjectsLocationsRealmsGameServerClustersDeleteCall { - c := &ProjectsLocationsRealmsGameServerClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsGameServerDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { + c := &ProjectsLocationsGameServerDeploymentsGetIamPolicyCall{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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { + 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 *ProjectsLocationsRealmsGameServerClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersDeleteCall { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersDeleteCall { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-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/{+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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.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 *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7719,7 +1788,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7731,25 +1800,31 @@ func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googlea } return ret, nil // { - // "description": "Deletes a single game server cluster.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.realms.gameServerClusters.delete", + // "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}/gameServerDeployments/{gameServerDeploymentsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.gameServerDeployments.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", + // "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/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7758,120 +1833,93 @@ func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googlea } -// method id "gameservices.projects.locations.realms.gameServerClusters.get": - -type ProjectsLocationsRealmsGameServerClustersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} +// method id "gameservices.projects.locations.gameServerDeployments.setIamPolicy": -// Get: Gets details of a single game server cluster. -// -// - name: The name of the game server cluster to retrieve, in the -// following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}/gameServ -// erClusters/{gameServerClusterId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Get(name string) *ProjectsLocationsRealmsGameServerClustersGetCall { - c := &ProjectsLocationsRealmsGameServerClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsGameServerDeploymentsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": View for the returned -// GameServerCluster objects. When `FULL` is specified, the -// `cluster_state` field is also returned in the GameServerCluster -// object, which includes the state of the referenced Kubernetes cluster -// such as versions and provider info. The default/unset value is -// `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which -// does not return the `cluster_state` field. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// Possible values: -// "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, -// Google Cloud Game Servers defaults to the `BASIC` view. -// "BASIC" - Includes basic information of a GameServerCluster -// resource and omits `cluster_state`. This is the default value (for -// methods ListGameServerClusters, GetGameServerCluster, and -// PreviewCreateGameServerCluster). -// "FULL" - Include basic information of a GameServerCluster resource -// as well as `cluster_state`. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) View(view string) *ProjectsLocationsRealmsGameServerClustersGetCall { - c.urlParams_.Set("view", view) +// - 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 *ProjectsLocationsGameServerDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { + c := &ProjectsLocationsGameServerDeploymentsSetIamPolicyCall{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 *ProjectsLocationsRealmsGameServerClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersGetCall { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsGameServerClustersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersGetCall { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Header() http.Header { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-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/{+name}") + 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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.get" call. -// Exactly one of *GameServerCluster or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GameServerCluster.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi.CallOption) (*GameServerCluster, error) { +// Do executes the "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7890,7 +1938,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GameServerCluster{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7902,40 +1950,28 @@ func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets details of a single game server cluster.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.gameServerClusters.get", + // "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}/gameServerDeployments/{gameServerDeploymentsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "gameservices.projects.locations.gameServerDeployments.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the game server cluster to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`.", + // "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/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - // "enum": [ - // "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - // "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - // "Include basic information of a GameServerCluster resource as well as `cluster_state`." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GameServerCluster" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7944,150 +1980,96 @@ func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi. } -// method id "gameservices.projects.locations.realms.gameServerClusters.list": - -type ProjectsLocationsRealmsGameServerClustersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists game server clusters in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) List(parent string) *ProjectsLocationsRealmsGameServerClustersListCall { - c := &ProjectsLocationsRealmsGameServerClustersListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsRealmsGameServerClustersListCall) Filter(filter string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsRealmsGameServerClustersListCall) OrderBy(orderBy string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on response's next_page_token to determine if there -// are more GameServerClusters left to be queried. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) PageSize(pageSize int64) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "gameservices.projects.locations.gameServerDeployments.testIamPermissions": -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) PageToken(pageToken string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": View for the returned -// GameServerCluster objects. When `FULL` is specified, the -// `cluster_state` field is also returned in the GameServerCluster -// object, which includes the state of the referenced Kubernetes cluster -// such as versions and provider info. The default/unset value is -// `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which -// does not return the `cluster_state` field. +// 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. // -// Possible values: -// "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, -// Google Cloud Game Servers defaults to the `BASIC` view. -// "BASIC" - Includes basic information of a GameServerCluster -// resource and omits `cluster_state`. This is the default value (for -// methods ListGameServerClusters, GetGameServerCluster, and -// PreviewCreateGameServerCluster). -// "FULL" - Include basic information of a GameServerCluster resource -// as well as `cluster_state`. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) View(view string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("view", view) +// - 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 *ProjectsLocationsGameServerDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { + c := &ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall{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 *ProjectsLocationsRealmsGameServerClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersListCall { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersListCall { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) Header() http.Header { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-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.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/{+parent}/gameServerClusters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.list" call. -// Exactly one of *ListGameServerClustersResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListGameServerClustersResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsRealmsGameServerClustersListCall) Do(opts ...googleapi.CallOption) (*ListGameServerClustersResponse, error) { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8106,7 +2088,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListGameServerClustersResponse{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8118,61 +2100,28 @@ func (c *ProjectsLocationsRealmsGameServerClustersListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists game server clusters in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.gameServerClusters.list", + // "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}/gameServerDeployments/{gameServerDeploymentsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "gameservices.projects.locations.gameServerDeployments.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerClusters left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", + // "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/[^/]+/realms/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - // "enum": [ - // "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - // "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - // "Include basic information of a GameServerCluster resource as well as `cluster_state`." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/gameServerClusters", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "ListGameServerClustersResponse" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8181,67 +2130,40 @@ func (c *ProjectsLocationsRealmsGameServerClustersListCall) 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 *ProjectsLocationsRealmsGameServerClustersListCall) Pages(ctx context.Context, f func(*ListGameServerClustersResponse) 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 "gameservices.projects.locations.realms.gameServerClusters.patch": +// method id "gameservices.projects.locations.operations.cancel": -type ProjectsLocationsRealmsGameServerClustersPatchCall struct { - s *Service - name string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches a single game server cluster. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - name: The resource name of the game server cluster, in the -// following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}/gameServ -// erClusters/{gameServerClusterId}`. For example, -// `projects/my-project/locations/global/realms/zanzibar/gameServerClus -// ters/my-gke-cluster`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Patch(name string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersPatchCall { - c := &ProjectsLocationsRealmsGameServerClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gameservercluster = gameservercluster - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. At least one path must be -// supplied in this field. For more information, see the `FieldMask` -// definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsGameServerClustersPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.canceloperationrequest = canceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPatchCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8249,21 +2171,21 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) 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 *ProjectsLocationsRealmsGameServerClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPatchCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8271,16 +2193,16 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -8291,14 +2213,14 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.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 *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "gameservices.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8317,7 +2239,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8329,34 +2251,28 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleap } return ret, nil // { - // "description": "Patches a single game server cluster.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.gameServerClusters.patch", + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "gameservices.projects.locations.operations.cancel", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+name}:cancel", // "request": { - // "$ref": "GameServerCluster" + // "$ref": "CancelOperationRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8365,65 +2281,32 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleap } -// method id "gameservices.projects.locations.realms.gameServerClusters.previewCreate": - -type ProjectsLocationsRealmsGameServerClustersPreviewCreateCall struct { - s *Service - parent string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PreviewCreate: Previews creation of a new game server cluster in a -// given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) PreviewCreate(parent string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c := &ProjectsLocationsRealmsGameServerClustersPreviewCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameservercluster = gameservercluster - return c -} - -// GameServerClusterId sets the optional parameter -// "gameServerClusterId": Required. The ID of the game server cluster -// resource to create. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) GameServerClusterId(gameServerClusterId string) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c.urlParams_.Set("gameServerClusterId", gameServerClusterId) - return c -} +// method id "gameservices.projects.locations.operations.delete": -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c.urlParams_.Set("previewTime", previewTime) - return c +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": This field is deprecated. -// Preview will always return KubernetesClusterState. +// 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`. // -// Possible values: -// "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, -// Google Cloud Game Servers defaults to the `BASIC` view. -// "BASIC" - Includes basic information of a GameServerCluster -// resource and omits `cluster_state`. This is the default value (for -// methods ListGameServerClusters, GetGameServerCluster, and -// PreviewCreateGameServerCluster). -// "FULL" - Include basic information of a GameServerCluster resource -// as well as `cluster_state`. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) View(view string) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c.urlParams_.Set("view", view) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8431,21 +2314,21 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) 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 *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8453,35 +2336,29 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) - if err != nil { - return 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}/gameServerClusters:previewCreate") + 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 "gameservices.projects.locations.realms.gameServerClusters.previewCreate" call. -// Exactly one of *PreviewCreateGameServerClusterResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *PreviewCreateGameServerClusterResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ...googleapi.CallOption) (*PreviewCreateGameServerClusterResponse, error) { +// Do executes the "gameservices.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8500,7 +2377,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewCreateGameServerClusterResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8512,54 +2389,25 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ... } return ret, nil // { - // "description": "Previews creation of a new game server cluster in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters:previewCreate", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.realms.gameServerClusters.previewCreate", + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "gameservices.projects.locations.operations.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "gameServerClusterId": { - // "description": "Required. The ID of the game server cluster resource to create.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "view": { - // "description": "Optional. This field is deprecated. Preview will always return KubernetesClusterState.", - // "enum": [ - // "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - // "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - // "Include basic information of a GameServerCluster resource as well as `cluster_state`." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/gameServerClusters:previewCreate", - // "request": { - // "$ref": "GameServerCluster" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "PreviewCreateGameServerClusterResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8568,73 +2416,79 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ... } -// method id "gameservices.projects.locations.realms.gameServerClusters.previewDelete": +// method id "gameservices.projects.locations.operations.get": -type ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PreviewDelete: Previews deletion of a single game server cluster. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: The name of the game server cluster to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerClusters/{gameS -// erverClusterId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) PreviewDelete(name string) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { - c := &ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { - c.urlParams_.Set("previewTime", previewTime) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:previewDelete") + 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 } @@ -8645,15 +2499,14 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.previewDelete" call. -// Exactly one of *PreviewDeleteGameServerClusterResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *PreviewDeleteGameServerClusterResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ...googleapi.CallOption) (*PreviewDeleteGameServerClusterResponse, error) { +// Do executes the "gameservices.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8672,7 +2525,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewDeleteGameServerClusterResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8684,31 +2537,25 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ... } return ret, nil // { - // "description": "Previews deletion of a single game server cluster.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewDelete", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.realms.gameServerClusters.previewDelete", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}:previewDelete", + // "path": "v1/{+name}", // "response": { - // "$ref": "PreviewDeleteGameServerClusterResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8717,91 +2564,107 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ... } -// method id "gameservices.projects.locations.realms.gameServerClusters.previewUpdate": +// method id "gameservices.projects.locations.operations.list": -type ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall struct { - s *Service - name string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PreviewUpdate: Previews updating a GameServerCluster. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The resource name of the game server cluster, in the -// following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}/gameServ -// erClusters/{gameServerClusterId}`. For example, -// `projects/my-project/locations/global/realms/zanzibar/gameServerClus -// ters/my-gke-cluster`. -func (r *ProjectsLocationsRealmsGameServerClustersService) PreviewUpdate(name string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { - c := &ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gameservercluster = gameservercluster return c } -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { - c.urlParams_.Set("previewTime", previewTime) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. At least one path must be supplied in this -// field. For more information, see the `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { - c.urlParams_.Set("updateMask", updateMask) +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) - 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}:previewUpdate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -8812,15 +2675,14 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.previewUpdate" call. -// Exactly one of *PreviewUpdateGameServerClusterResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *PreviewUpdateGameServerClusterResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "gameservices.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ...googleapi.CallOption) (*PreviewUpdateGameServerClusterResponse, error) { +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8839,7 +2701,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewUpdateGameServerClusterResponse{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8851,40 +2713,41 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ... } return ret, nil // { - // "description": "Previews updating a GameServerCluster.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewUpdate", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.gameServerClusters.previewUpdate", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "updateMask": { - // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}:previewUpdate", - // "request": { - // "$ref": "GameServerCluster" - // }, + // "path": "v1/{+name}/operations", // "response": { - // "$ref": "PreviewUpdateGameServerClusterResponse" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8892,3 +2755,24 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ... // } } + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/gameservices/v1beta/gameservices-api.json b/gameservices/v1beta/gameservices-api.json index 171fe086458..31c00e8f58c 100644 --- a/gameservices/v1beta/gameservices-api.json +++ b/gameservices/v1beta/gameservices-api.json @@ -184,117 +184,6 @@ "resources": { "gameServerDeployments": { "methods": { - "create": { - "description": "Creates a new game server deployment in a given project and location.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - "httpMethod": "POST", - "id": "gameservices.projects.locations.gameServerDeployments.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "deploymentId": { - "description": "Required. The ID of the game server deployment resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/gameServerDeployments", - "request": { - "$ref": "GameServerDeployment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single game server deployment.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.gameServerDeployments.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "fetchDeploymentState": { - "description": "Retrieves information about the current state of the game server deployment. Gathers all the Agones fleets and Agones autoscalers, including fleets running an older version of the game server deployment.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:fetchDeploymentState", - "httpMethod": "POST", - "id": "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}:fetchDeploymentState", - "request": { - "$ref": "FetchDeploymentStateRequest" - }, - "response": { - "$ref": "FetchDeploymentStateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single game server deployment.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "GameServerDeployment" - }, - "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": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:getIamPolicy", @@ -326,151 +215,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getRollout": { - "description": "Gets details of a single game server deployment rollout.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.getRollout", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server deployment rollout to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}/rollout", - "response": { - "$ref": "GameServerDeploymentRollout" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists game server deployments in a given project and location.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more GameServerDeployments left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/gameServerDeployments", - "response": { - "$ref": "ListGameServerDeploymentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Patches a game server deployment.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.gameServerDeployments.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}", - "request": { - "$ref": "GameServerDeployment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewRollout": { - "description": "Previews the game server deployment rollout. This API does not mutate the rollout resource.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout:preview", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.gameServerDeployments.previewRollout", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview. Defaults to the immediately after the proposed rollout completes.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Optional. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}/rollout:preview", - "request": { - "$ref": "GameServerDeploymentRollout" - }, - "response": { - "$ref": "PreviewGameServerDeploymentRolloutResponse" - }, - "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": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:setIamPolicy", @@ -526,175 +270,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "updateRollout": { - "description": "Patches a single game server deployment rollout. The method will not return an error if the update does not affect any existing realms. For example, the following cases will not return an error: * The default_game_server_config is changed but all existing realms use the override. * A non-existing realm is explicitly called out in the game_server_config_overrides field.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.gameServerDeployments.updateRollout", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}/rollout", - "request": { - "$ref": "GameServerDeploymentRollout" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "configs": { - "methods": { - "create": { - "description": "Creates a new game server config in a given project, location, and game server deployment. Game server configs are immutable, and are not applied until referenced in the game server deployment rollout resource.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - "httpMethod": "POST", - "id": "gameservices.projects.locations.gameServerDeployments.configs.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "configId": { - "description": "Required. The ID of the game server config resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/configs", - "request": { - "$ref": "GameServerConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single game server config. The deletion fails if the game server config is referenced in a game server deployment rollout.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.gameServerDeployments.configs.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server config to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single game server config.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.configs.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server config to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "GameServerConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists game server configs in a given project, location, and game server deployment.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - "httpMethod": "GET", - "id": "gameservices.projects.locations.gameServerDeployments.configs.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerConfigs left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/configs", - "response": { - "$ref": "ListGameServerConfigsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } }, @@ -820,544 +395,13 @@ ] } } - }, - "realms": { - "methods": { - "create": { - "description": "Creates a new realm in a given project and location.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms", - "httpMethod": "POST", - "id": "gameservices.projects.locations.realms.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "realmId": { - "description": "Required. The ID of the realm resource to create.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+parent}/realms", - "request": { - "$ref": "Realm" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single realm.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.realms.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the realm to delete, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single realm.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the realm to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "Realm" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists realms in a given project and location.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more realms left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/realms", - "response": { - "$ref": "ListRealmsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Patches a single realm.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}", - "request": { - "$ref": "Realm" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewUpdate": { - "description": "Previews patches to a single realm.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}:previewUpdate", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.previewUpdate", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}:previewUpdate", - "request": { - "$ref": "Realm" - }, - "response": { - "$ref": "PreviewRealmUpdateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "gameServerClusters": { - "methods": { - "create": { - "description": "Creates a new game server cluster in a given project and location.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - "httpMethod": "POST", - "id": "gameservices.projects.locations.realms.gameServerClusters.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "gameServerClusterId": { - "description": "Required. The ID of the game server cluster resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/gameServerClusters", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single game server cluster.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.realms.gameServerClusters.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single game server cluster.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.gameServerClusters.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server cluster to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "view": { - "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - "enum": [ - "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - "Include basic information of a GameServerCluster resource as well as `cluster_state`." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "GameServerCluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists game server clusters in a given project and location.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - "httpMethod": "GET", - "id": "gameservices.projects.locations.realms.gameServerClusters.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerClusters left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "view": { - "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - "enum": [ - "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - "Include basic information of a GameServerCluster resource as well as `cluster_state`." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+parent}/gameServerClusters", - "response": { - "$ref": "ListGameServerClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Patches a single game server cluster.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.gameServerClusters.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewCreate": { - "description": "Previews creation of a new game server cluster in a given project and location.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters:previewCreate", - "httpMethod": "POST", - "id": "gameservices.projects.locations.realms.gameServerClusters.previewCreate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "gameServerClusterId": { - "description": "Required. The ID of the game server cluster resource to create.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "view": { - "description": "Optional. This field is deprecated. Preview will always return KubernetesClusterState.", - "enum": [ - "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "enumDescriptions": [ - "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - "Include basic information of a GameServerCluster resource as well as `cluster_state`." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+parent}/gameServerClusters:previewCreate", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "PreviewCreateGameServerClusterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewDelete": { - "description": "Previews deletion of a single game server cluster.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewDelete", - "httpMethod": "DELETE", - "id": "gameservices.projects.locations.realms.gameServerClusters.previewDelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}:previewDelete", - "response": { - "$ref": "PreviewDeleteGameServerClusterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "previewUpdate": { - "description": "Previews updating a GameServerCluster.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewUpdate", - "httpMethod": "PATCH", - "id": "gameservices.projects.locations.realms.gameServerClusters.previewUpdate", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", - "required": true, - "type": "string" - }, - "previewTime": { - "description": "Optional. The target timestamp to compute the preview.", - "format": "google-datetime", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Required. Mask of fields to update. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}:previewUpdate", - "request": { - "$ref": "GameServerCluster" - }, - "response": { - "$ref": "PreviewUpdateGameServerClusterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } } } } } } }, - "revision": "20220602", + "revision": "20220719", "rootUrl": "https://gameservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -1619,541 +663,39 @@ "LOG_FAIL_CLOSED" ], "enumDescriptions": [ - "Client is not required to write a partial Gin log immediately after the authorization check. If client chooses to write one and it fails, client may either fail open (allow the operation to continue) or fail closed (handle as a DENY outcome).", - "The application's operation in the context of which this authorization check is being made may only be performed if it is successfully logged to Gin. For instance, the authorization library may satisfy this obligation by emitting a partial log entry at authorization check time and only returning ALLOW to the application if it succeeds. If a matching Rule has this directive, but the client has not indicated that it will honor such requirements, then the IAM check will result in authorization failure by setting CheckPolicyResponse.success=false." - ], - "type": "string" - } - }, - "type": "object" - }, - "DeployedClusterState": { - "description": "The game server cluster changes made by the game server deployment.", - "id": "DeployedClusterState", - "properties": { - "cluster": { - "description": "The name of the cluster.", - "type": "string" - }, - "fleetDetails": { - "description": "The details about the Agones fleets and autoscalers created in the game server cluster.", - "items": { - "$ref": "DeployedFleetDetails" - }, - "type": "array" - } - }, - "type": "object" - }, - "DeployedFleet": { - "description": "Agones fleet specification and details.", - "id": "DeployedFleet", - "properties": { - "fleet": { - "description": "The name of the Agones fleet.", - "type": "string" - }, - "fleetSpec": { - "description": "The fleet spec retrieved from the Agones fleet.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "The source spec that is used to create the Agones fleet. The GameServerConfig resource may no longer exist in the system." - }, - "status": { - "$ref": "DeployedFleetStatus", - "description": "The current status of the Agones fleet. Includes count of game servers in various states." - } - }, - "type": "object" - }, - "DeployedFleetAutoscaler": { - "description": "Details about the Agones autoscaler.", - "id": "DeployedFleetAutoscaler", - "properties": { - "autoscaler": { - "description": "The name of the Agones autoscaler.", - "type": "string" - }, - "fleetAutoscalerSpec": { - "description": "The autoscaler spec retrieved from Agones.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "The source spec that is used to create the autoscaler. The GameServerConfig resource may no longer exist in the system." - } - }, - "type": "object" - }, - "DeployedFleetDetails": { - "description": "Details of the deployed Agones fleet.", - "id": "DeployedFleetDetails", - "properties": { - "deployedAutoscaler": { - "$ref": "DeployedFleetAutoscaler", - "description": "Information about the Agones autoscaler for that fleet." - }, - "deployedFleet": { - "$ref": "DeployedFleet", - "description": "Information about the Agones fleet." - } - }, - "type": "object" - }, - "DeployedFleetStatus": { - "description": "DeployedFleetStatus has details about the Agones fleets, such as how many are running, how many are allocated, and so on.", - "id": "DeployedFleetStatus", - "properties": { - "allocatedReplicas": { - "description": "The number of GameServer replicas in the ALLOCATED state in this fleet.", - "format": "int64", - "type": "string" - }, - "readyReplicas": { - "description": "The number of GameServer replicas in the READY state in this fleet.", - "format": "int64", - "type": "string" - }, - "replicas": { - "description": "The total number of current GameServer replicas in this fleet.", - "format": "int64", - "type": "string" - }, - "reservedReplicas": { - "description": "The number of GameServer replicas in the RESERVED state in this fleet. Reserved instances won't be deleted on scale down, but won't cause an autoscaler to scale up.", - "format": "int64", - "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", - "properties": {}, - "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", - "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", - "type": "string" - }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", - "type": "string" - } - }, - "type": "object" - }, - "FetchDeploymentStateRequest": { - "description": "Request message for GameServerDeploymentsService.FetchDeploymentState.", - "id": "FetchDeploymentStateRequest", - "properties": {}, - "type": "object" - }, - "FetchDeploymentStateResponse": { - "description": "Response message for GameServerDeploymentsService.FetchDeploymentState.", - "id": "FetchDeploymentStateResponse", - "properties": { - "clusterState": { - "description": "The state of the game server deployment in each game server cluster.", - "items": { - "$ref": "DeployedClusterState" - }, - "type": "array" - }, - "unavailable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FleetConfig": { - "description": "Fleet configs for Agones.", - "id": "FleetConfig", - "properties": { - "fleetSpec": { - "description": "Agones fleet spec (see [example spec](https://agones.dev/site/docs/reference/fleet/)).", - "type": "string" - }, - "name": { - "description": "The name of the FleetConfig.", - "type": "string" - } - }, - "type": "object" - }, - "GameServerCluster": { - "description": "A game server cluster resource.", - "id": "GameServerCluster", - "properties": { - "clusterState": { - "$ref": "KubernetesClusterState", - "description": "Output only. The state of the Kubernetes cluster in preview. This will be available if view is set to FULL in the relevant list/get/preview request.", - "readOnly": true - }, - "connectionInfo": { - "$ref": "GameServerClusterConnectionInfo", - "description": "The game server cluster connection information. This information is used to manage game server clusters." - }, - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Human readable description of the cluster.", - "type": "string" - }, - "etag": { - "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this game server cluster. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GameServerClusterConnectionInfo": { - "description": "The game server cluster connection information.", - "id": "GameServerClusterConnectionInfo", - "properties": { - "gkeClusterReference": { - "$ref": "GkeClusterReference", - "description": "Reference to the GKE cluster where the game servers are installed." - }, - "namespace": { - "description": "Namespace designated on the game server cluster where the Agones game server instances will be created. Existence of the namespace will be validated during creation.", - "type": "string" - } - }, - "type": "object" - }, - "GameServerConfig": { - "description": "A game server config resource.", - "id": "GameServerConfig", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "The description of the game server config.", - "type": "string" - }, - "fleetConfigs": { - "description": "FleetConfig contains a list of Agones fleet specs. Only one FleetConfig is allowed.", - "items": { - "$ref": "FleetConfig" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this game server config. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "The resource name of the game server config, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.", - "type": "string" - }, - "scalingConfigs": { - "description": "The autoscaling settings.", - "items": { - "$ref": "ScalingConfig" - }, - "type": "array" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GameServerConfigOverride": { - "description": "A game server config override.", - "id": "GameServerConfigOverride", - "properties": { - "configVersion": { - "description": "The game server config for this override.", - "type": "string" - }, - "realmsSelector": { - "$ref": "RealmSelector", - "description": "Selector for choosing applicable realms." - } - }, - "type": "object" - }, - "GameServerDeployment": { - "description": "A game server deployment resource.", - "id": "GameServerDeployment", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Human readable description of the game server deployment.", - "type": "string" - }, - "etag": { - "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this game server deployment. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "The resource name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GameServerDeploymentRollout": { - "description": "The game server deployment rollout which represents the desired rollout state.", - "id": "GameServerDeploymentRollout", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "defaultGameServerConfig": { - "description": "The default game server config is applied to all realms unless overridden in the rollout. For example, `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.", - "type": "string" - }, - "etag": { - "description": "ETag of the resource.", - "type": "string" - }, - "gameServerConfigOverrides": { - "description": "Contains the game server config rollout overrides. Overrides are processed in the order they are listed. Once a match is found for a realm, the rest of the list is not processed.", - "items": { - "$ref": "GameServerConfigOverride" - }, - "type": "array" - }, - "name": { - "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GkeClusterReference": { - "description": "A reference to a GKE cluster.", - "id": "GkeClusterReference", - "properties": { - "cluster": { - "description": "The full or partial name of a GKE cluster, using one of the following forms: * `projects/{project}/locations/{locationId}/clusters/{cluster}` * `locations/{locationId}/clusters/{cluster}` * `{cluster}` If project and location are not specified, the project and location of the GameServerCluster resource are used to generate the full name of the GKE cluster.", - "type": "string" - } - }, - "type": "object" - }, - "KubernetesClusterState": { - "description": "The state of the Kubernetes cluster.", - "id": "KubernetesClusterState", - "properties": { - "agonesVersionInstalled": { - "description": "Output only. The version of Agones currently installed in the registered Kubernetes cluster.", - "readOnly": true, - "type": "string" - }, - "agonesVersionTargeted": { - "description": "Output only. The version of Agones that is targeted to be installed in the cluster.", - "readOnly": true, - "type": "string" - }, - "installationState": { - "description": "Output only. The state for the installed versions of Agones/Kubernetes.", - "enum": [ - "INSTALLATION_STATE_UNSPECIFIED", - "AGONES_KUBERNETES_VERSION_SUPPORTED", - "AGONES_VERSION_UNSUPPORTED", - "AGONES_KUBERNETES_VERSION_UNSUPPORTED", - "AGONES_VERSION_UNRECOGNIZED", - "KUBERNETES_VERSION_UNRECOGNIZED", - "VERSION_VERIFICATION_FAILED", - "AGONES_NOT_INSTALLED" - ], - "enumDescriptions": [ - "The default installation state. This value is used if the state is omitted.", - "Both the Agones and Kubernetes versions are supported by Google Cloud Game Servers and Agones and Kubernetes versions are compatible.", - "The installed version of Agones is not supported by Google Cloud Game Servers.", - "The installed version of Agones is supported by Google Cloud Game Servers, but the installed version of Kubernetes is not recommended or supported by the version of Agones.", - "The installed version of Agones is not recognized because the Agones controller's image name does not have a version string reported as {major}.{minor}(.{patch}).", - "The server version of Kubernetes cluster is not recognized because the API server didn't return parsable version info on path/version.", - "Failed to read or verify the version of Agones or Kubernetes. See `version_installed_error_message` for details.", - "Agones is not installed." - ], - "readOnly": true, - "type": "string" - }, - "kubernetesVersionInstalled": { - "description": "Output only. The version of Kubernetes that is currently used in the registered Kubernetes cluster (as detected by the Cloud Game Servers service).", - "readOnly": true, - "type": "string" - }, - "provider": { - "description": "Output only. The cloud provider type reported by the first node's `providerID` in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the provider type will be empty.", - "readOnly": true, - "type": "string" - }, - "versionInstalledErrorMessage": { - "description": "Output only. The detailed error message for the installed versions of Agones/Kubernetes.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "LabelSelector": { - "description": "The label selector, used to group labels on the resources.", - "id": "LabelSelector", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource labels for this selector.", - "type": "object" - } - }, - "type": "object" - }, - "ListGameServerClustersResponse": { - "description": "Response message for GameServerClustersService.ListGameServerClusters.", - "id": "ListGameServerClustersResponse", - "properties": { - "gameServerClusters": { - "description": "The list of game server clusters.", - "items": { - "$ref": "GameServerCluster" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", - "type": "string" - }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGameServerConfigsResponse": { - "description": "Response message for GameServerConfigsService.ListGameServerConfigs.", - "id": "ListGameServerConfigsResponse", - "properties": { - "gameServerConfigs": { - "description": "The list of game server configs.", - "items": { - "$ref": "GameServerConfig" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "Client is not required to write a partial Gin log immediately after the authorization check. If client chooses to write one and it fails, client may either fail open (allow the operation to continue) or fail closed (handle as a DENY outcome).", + "The application's operation in the context of which this authorization check is being made may only be performed if it is successfully logged to Gin. For instance, the authorization library may satisfy this obligation by emitting a partial log entry at authorization check time and only returning ALLOW to the application if it succeeds. If a matching Rule has this directive, but the client has not indicated that it will honor such requirements, then the IAM check will result in authorization failure by setting CheckPolicyResponse.success=false." + ], "type": "string" - }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "ListGameServerDeploymentsResponse": { - "description": "Response message for GameServerDeploymentsService.ListGameServerDeployments.", - "id": "ListGameServerDeploymentsResponse", + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "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", "properties": { - "gameServerDeployments": { - "description": "The list of game server deployments.", - "items": { - "$ref": "GameServerDeployment" - }, - "type": "array" + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" }, - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", "type": "string" }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" } }, "type": "object" @@ -2194,31 +736,6 @@ }, "type": "object" }, - "ListRealmsResponse": { - "description": "Response message for RealmsService.ListRealms.", - "id": "ListRealmsResponse", - "properties": { - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", - "type": "string" - }, - "realms": { - "description": "The list of realms.", - "items": { - "$ref": "Realm" - }, - "type": "array" - }, - "unreachable": { - "description": "List of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -2307,97 +824,6 @@ }, "type": "object" }, - "OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "OperationMetadata", - "properties": { - "apiVersion": { - "description": "Output only. API version used to start the operation.", - "readOnly": true, - "type": "string" - }, - "createTime": { - "description": "Output only. The time the operation was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "endTime": { - "description": "Output only. The time the operation finished running.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "operationStatus": { - "additionalProperties": { - "$ref": "OperationStatus" - }, - "description": "Output only. Operation status for Game Services API operations. Operation status is in the form of key-value pairs where keys are resource IDs and the values show the status of the operation. In case of failures, the value includes an error code and error message.", - "readOnly": true, - "type": "object" - }, - "requestedCancellation": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "readOnly": true, - "type": "boolean" - }, - "statusMessage": { - "description": "Output only. Human-readable status of the operation, if any.", - "readOnly": true, - "type": "string" - }, - "target": { - "description": "Output only. Server-defined resource path for the target of the operation.", - "readOnly": true, - "type": "string" - }, - "unreachable": { - "description": "Output only. List of Locations that could not be reached.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "verb": { - "description": "Output only. Name of the verb executed by the operation.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "OperationStatus": { - "id": "OperationStatus", - "properties": { - "done": { - "description": "Output only. Whether the operation is done or still in progress.", - "readOnly": true, - "type": "boolean" - }, - "errorCode": { - "description": "The error code in case of failures.", - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "INTERNAL_ERROR", - "PERMISSION_DENIED", - "CLUSTER_CONNECTION" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "errorMessage": { - "description": "The human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -2436,149 +862,6 @@ }, "type": "object" }, - "PreviewCreateGameServerClusterResponse": { - "description": "Response message for GameServerClustersService.PreviewCreateGameServerCluster.", - "id": "PreviewCreateGameServerClusterResponse", - "properties": { - "clusterState": { - "$ref": "KubernetesClusterState", - "description": "Output only. The state of the Kubernetes cluster in preview. This will be available if view is set to FULL in the relevant list/get/preview request.", - "readOnly": true - }, - "etag": { - "description": "The ETag of the game server cluster.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "PreviewDeleteGameServerClusterResponse": { - "description": "Response message for GameServerClustersService.PreviewDeleteGameServerCluster.", - "id": "PreviewDeleteGameServerClusterResponse", - "properties": { - "etag": { - "description": "The ETag of the game server cluster.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "PreviewGameServerDeploymentRolloutResponse": { - "description": "Response message for PreviewGameServerDeploymentRollout. This has details about the Agones fleet and autoscaler to be actuated.", - "id": "PreviewGameServerDeploymentRolloutResponse", - "properties": { - "etag": { - "description": "ETag of the game server deployment.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - }, - "unavailable": { - "description": "Locations that could not be reached on this request.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "PreviewRealmUpdateResponse": { - "description": "Response message for RealmsService.PreviewRealmUpdate.", - "id": "PreviewRealmUpdateResponse", - "properties": { - "etag": { - "description": "ETag of the realm.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "PreviewUpdateGameServerClusterResponse": { - "description": "Response message for GameServerClustersService.PreviewUpdateGameServerCluster", - "id": "PreviewUpdateGameServerClusterResponse", - "properties": { - "etag": { - "description": "The ETag of the game server cluster.", - "type": "string" - }, - "targetState": { - "$ref": "TargetState", - "description": "The target state." - } - }, - "type": "object" - }, - "Realm": { - "description": "A realm resource.", - "id": "Realm", - "properties": { - "createTime": { - "description": "Output only. The creation time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Human readable description of the realm.", - "type": "string" - }, - "etag": { - "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels associated with this realm. Each label is a key-value pair.", - "type": "object" - }, - "name": { - "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - "type": "string" - }, - "timeZone": { - "description": "Required. Time zone where all policies targeting this realm are evaluated. The value of this field must be from the [IANA time zone database](https://www.iana.org/time-zones).", - "type": "string" - }, - "updateTime": { - "description": "Output only. The last-modified time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "RealmSelector": { - "description": "The realm selector, used to match realm resources.", - "id": "RealmSelector", - "properties": { - "realms": { - "description": "List of realms to match.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Rule": { "description": "A rule to be applied in a Policy.", "id": "Rule", @@ -2645,61 +928,6 @@ }, "type": "object" }, - "ScalingConfig": { - "description": "Autoscaling config for an Agones fleet.", - "id": "ScalingConfig", - "properties": { - "fleetAutoscalerSpec": { - "description": "Required. Agones fleet autoscaler spec (see [example spec](https://agones.dev/site/docs/reference/fleetautoscaler/)).", - "type": "string" - }, - "name": { - "description": "Required. The name of the scaling config.", - "type": "string" - }, - "schedules": { - "description": "The schedules to which this scaling config applies.", - "items": { - "$ref": "Schedule" - }, - "type": "array" - }, - "selectors": { - "description": "Labels used to identify the game server clusters to which this Agones scaling config applies. A game server cluster is subject to this Agones scaling config if its labels match any of the selector entries.", - "items": { - "$ref": "LabelSelector" - }, - "type": "array" - } - }, - "type": "object" - }, - "Schedule": { - "description": "The schedule of a recurring or one time event. The event's time span is specified by start_time and end_time. If the scheduled event's timespan is larger than cron_spec added with cron_job_duration, the event is recurring. If only cron_spec and cron_job_duration are specified, the event starts at the local time specified by cron_spec, and is recurring. ``` start_time|-------[cron job]-------[cron job]-------[cron job]---|end_time cron job: cron spec start time + duration ```", - "id": "Schedule", - "properties": { - "cronJobDuration": { - "description": "The duration for the cron job event. The duration of the event is effective after the cron job's start time.", - "format": "google-duration", - "type": "string" - }, - "cronSpec": { - "description": "The cron definition of the scheduled event. See https://en.wikipedia.org/wiki/Cron. The cron spec specifies the local time as defined by the realm.", - "type": "string" - }, - "endTime": { - "description": "The end time of the event.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "The start time of the event.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -2716,21 +944,6 @@ }, "type": "object" }, - "SpecSource": { - "description": "Encapsulates Agones fleet spec and Agones autoscaler spec sources.", - "id": "SpecSource", - "properties": { - "gameServerConfigName": { - "description": "The game server config resource. Uses the form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - "type": "string" - }, - "name": { - "description": "The name of the Agones fleet config or Agones scaling config used to derive the Agones fleet or Agones autoscaler spec.", - "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", @@ -2758,87 +971,6 @@ }, "type": "object" }, - "TargetDetails": { - "description": "Details about the Agones resources.", - "id": "TargetDetails", - "properties": { - "fleetDetails": { - "description": "Agones fleet details for game server clusters and game server deployments.", - "items": { - "$ref": "TargetFleetDetails" - }, - "type": "array" - }, - "gameServerClusterName": { - "description": "The game server cluster name. Uses the form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`.", - "type": "string" - }, - "gameServerDeploymentName": { - "description": "The game server deployment name. Uses the form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - "type": "string" - } - }, - "type": "object" - }, - "TargetFleet": { - "description": "Target Agones fleet specification.", - "id": "TargetFleet", - "properties": { - "name": { - "description": "The name of the Agones fleet.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "Encapsulates the source of the Agones fleet spec. The Agones fleet spec source." - } - }, - "type": "object" - }, - "TargetFleetAutoscaler": { - "description": "Target Agones autoscaler policy reference.", - "id": "TargetFleetAutoscaler", - "properties": { - "name": { - "description": "The name of the Agones autoscaler.", - "type": "string" - }, - "specSource": { - "$ref": "SpecSource", - "description": "Encapsulates the source of the Agones fleet spec. Details about the Agones autoscaler spec." - } - }, - "type": "object" - }, - "TargetFleetDetails": { - "description": "Details of the target Agones fleet.", - "id": "TargetFleetDetails", - "properties": { - "autoscaler": { - "$ref": "TargetFleetAutoscaler", - "description": "Reference to target Agones fleet autoscaling policy." - }, - "fleet": { - "$ref": "TargetFleet", - "description": "Reference to target Agones fleet." - } - }, - "type": "object" - }, - "TargetState": { - "description": "Encapsulates the Target state.", - "id": "TargetState", - "properties": { - "details": { - "description": "Details about Agones fleets.", - "items": { - "$ref": "TargetDetails" - }, - "type": "array" - } - }, - "type": "object" - }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", diff --git a/gameservices/v1beta/gameservices-gen.go b/gameservices/v1beta/gameservices-gen.go index 343f922498a..9e0c77816c2 100644 --- a/gameservices/v1beta/gameservices-gen.go +++ b/gameservices/v1beta/gameservices-gen.go @@ -153,7 +153,6 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.GameServerDeployments = NewProjectsLocationsGameServerDeploymentsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) - rs.Realms = NewProjectsLocationsRealmsService(s) return rs } @@ -163,29 +162,15 @@ type ProjectsLocationsService struct { GameServerDeployments *ProjectsLocationsGameServerDeploymentsService Operations *ProjectsLocationsOperationsService - - Realms *ProjectsLocationsRealmsService } func NewProjectsLocationsGameServerDeploymentsService(s *Service) *ProjectsLocationsGameServerDeploymentsService { rs := &ProjectsLocationsGameServerDeploymentsService{s: s} - rs.Configs = NewProjectsLocationsGameServerDeploymentsConfigsService(s) return rs } type ProjectsLocationsGameServerDeploymentsService struct { s *Service - - Configs *ProjectsLocationsGameServerDeploymentsConfigsService -} - -func NewProjectsLocationsGameServerDeploymentsConfigsService(s *Service) *ProjectsLocationsGameServerDeploymentsConfigsService { - rs := &ProjectsLocationsGameServerDeploymentsConfigsService{s: s} - return rs -} - -type ProjectsLocationsGameServerDeploymentsConfigsService struct { - s *Service } func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { @@ -197,27 +182,6 @@ type ProjectsLocationsOperationsService struct { s *Service } -func NewProjectsLocationsRealmsService(s *Service) *ProjectsLocationsRealmsService { - rs := &ProjectsLocationsRealmsService{s: s} - rs.GameServerClusters = NewProjectsLocationsRealmsGameServerClustersService(s) - return rs -} - -type ProjectsLocationsRealmsService struct { - s *Service - - GameServerClusters *ProjectsLocationsRealmsGameServerClustersService -} - -func NewProjectsLocationsRealmsGameServerClustersService(s *Service) *ProjectsLocationsRealmsGameServerClustersService { - rs := &ProjectsLocationsRealmsGameServerClustersService{s: s} - return rs -} - -type ProjectsLocationsRealmsGameServerClustersService struct { - s *Service -} - // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -704,191 +668,6 @@ func (s *DataAccessOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DeployedClusterState: The game server cluster changes made by the -// game server deployment. -type DeployedClusterState struct { - // Cluster: The name of the cluster. - Cluster string `json:"cluster,omitempty"` - - // FleetDetails: The details about the Agones fleets and autoscalers - // created in the game server cluster. - FleetDetails []*DeployedFleetDetails `json:"fleetDetails,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Cluster") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Cluster") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeployedClusterState) MarshalJSON() ([]byte, error) { - type NoMethod DeployedClusterState - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleet: Agones fleet specification and details. -type DeployedFleet struct { - // Fleet: The name of the Agones fleet. - Fleet string `json:"fleet,omitempty"` - - // FleetSpec: The fleet spec retrieved from the Agones fleet. - FleetSpec string `json:"fleetSpec,omitempty"` - - // SpecSource: The source spec that is used to create the Agones fleet. - // The GameServerConfig resource may no longer exist in the system. - SpecSource *SpecSource `json:"specSource,omitempty"` - - // Status: The current status of the Agones fleet. Includes count of - // game servers in various states. - Status *DeployedFleetStatus `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Fleet") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Fleet") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleet) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleetAutoscaler: Details about the Agones autoscaler. -type DeployedFleetAutoscaler struct { - // Autoscaler: The name of the Agones autoscaler. - Autoscaler string `json:"autoscaler,omitempty"` - - // FleetAutoscalerSpec: The autoscaler spec retrieved from Agones. - FleetAutoscalerSpec string `json:"fleetAutoscalerSpec,omitempty"` - - // SpecSource: The source spec that is used to create the autoscaler. - // The GameServerConfig resource may no longer exist in the system. - SpecSource *SpecSource `json:"specSource,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscaler") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscaler") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleetAutoscaler) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleetAutoscaler - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleetDetails: Details of the deployed Agones fleet. -type DeployedFleetDetails struct { - // DeployedAutoscaler: Information about the Agones autoscaler for that - // fleet. - DeployedAutoscaler *DeployedFleetAutoscaler `json:"deployedAutoscaler,omitempty"` - - // DeployedFleet: Information about the Agones fleet. - DeployedFleet *DeployedFleet `json:"deployedFleet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeployedAutoscaler") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeployedAutoscaler") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleetDetails) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleetDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DeployedFleetStatus: DeployedFleetStatus has details about the Agones -// fleets, such as how many are running, how many are allocated, and so -// on. -type DeployedFleetStatus struct { - // AllocatedReplicas: The number of GameServer replicas in the ALLOCATED - // state in this fleet. - AllocatedReplicas int64 `json:"allocatedReplicas,omitempty,string"` - - // ReadyReplicas: The number of GameServer replicas in the READY state - // in this fleet. - ReadyReplicas int64 `json:"readyReplicas,omitempty,string"` - - // Replicas: The total number of current GameServer replicas in this - // fleet. - Replicas int64 `json:"replicas,omitempty,string"` - - // ReservedReplicas: The number of GameServer replicas in the RESERVED - // state in this fleet. Reserved instances won't be deleted on scale - // down, but won't cause an autoscaler to scale up. - ReservedReplicas int64 `json:"reservedReplicas,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "AllocatedReplicas") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AllocatedReplicas") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *DeployedFleetStatus) MarshalJSON() ([]byte, error) { - type NoMethod DeployedFleetStatus - 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 @@ -960,26 +739,21 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FetchDeploymentStateRequest: Request message for -// GameServerDeploymentsService.FetchDeploymentState. -type FetchDeploymentStateRequest struct { -} - -// FetchDeploymentStateResponse: Response message for -// GameServerDeploymentsService.FetchDeploymentState. -type FetchDeploymentStateResponse struct { - // ClusterState: The state of the game server deployment in each game - // server cluster. - ClusterState []*DeployedClusterState `json:"clusterState,omitempty"` +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` - // Unavailable: List of locations that could not be reached. - Unavailable []string `json:"unavailable,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClusterState") 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 @@ -987,31 +761,36 @@ type FetchDeploymentStateResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterState") to include - // in API requests with the JSON null value. By default, fields with - // 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. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *FetchDeploymentStateResponse) MarshalJSON() ([]byte, error) { - type NoMethod FetchDeploymentStateResponse +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FleetConfig: Fleet configs for Agones. -type FleetConfig struct { - // FleetSpec: Agones fleet spec (see example spec - // (https://agones.dev/site/docs/reference/fleet/)). - FleetSpec string `json:"fleetSpec,omitempty"` +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` - // Name: The name of the FleetConfig. - Name string `json:"name,omitempty"` + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` - // ForceSendFields is a list of field names (e.g. "FleetSpec") to + // 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 @@ -1019,62 +798,49 @@ type FleetConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FleetSpec") to include in - // API requests with the JSON null value. By default, fields with 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. "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 *FleetConfig) MarshalJSON() ([]byte, error) { - type NoMethod FleetConfig +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerCluster: A game server cluster resource. -type GameServerCluster struct { - // ClusterState: Output only. The state of the Kubernetes cluster in - // preview. This will be available if view is set to FULL in the - // relevant list/get/preview request. - ClusterState *KubernetesClusterState `json:"clusterState,omitempty"` - - // ConnectionInfo: The game server cluster connection information. This - // information is used to manage game server clusters. - ConnectionInfo *GameServerClusterConnectionInfo `json:"connectionInfo,omitempty"` - - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` - // Description: Human readable description of the cluster. - Description string `json:"description,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` - // Etag: Used to perform consistent read-modify-write updates. If not - // set, a blind "overwrite" update happens. - Etag string `json:"etag,omitempty"` + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` - // Labels: The labels associated with this game server cluster. Each - // label is a key-value pair. - Labels map[string]string `json:"labels,omitempty"` + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. The resource name of the game server cluster, in the - // following form: - // `projects/{project}/locations/{locationId}/realms/{realmId}/gameServer - // Clusters/{gameServerClusterId}`. For example, - // `projects/my-project/locations/global/realms/zanzibar/gameServerCluste - // rs/my-gke-cluster`. + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" Name string `json:"name,omitempty"` - // UpdateTime: Output only. The last-modified time. - 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. "ClusterState") to + // 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 @@ -1082,7 +848,7 @@ type GameServerCluster struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterState") to include + // 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 @@ -1091,83 +857,24 @@ type GameServerCluster struct { NullFields []string `json:"-"` } -func (s *GameServerCluster) MarshalJSON() ([]byte, error) { - type NoMethod GameServerCluster - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GameServerClusterConnectionInfo: The game server cluster connection -// information. -type GameServerClusterConnectionInfo struct { - // GkeClusterReference: Reference to the GKE cluster where the game - // servers are installed. - GkeClusterReference *GkeClusterReference `json:"gkeClusterReference,omitempty"` - - // Namespace: Namespace designated on the game server cluster where the - // Agones game server instances will be created. Existence of the - // namespace will be validated during creation. - Namespace string `json:"namespace,omitempty"` - - // ForceSendFields is a list of field names (e.g. "GkeClusterReference") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GkeClusterReference") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GameServerClusterConnectionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GameServerClusterConnectionInfo +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerConfig: A game server config resource. -type GameServerConfig struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` - - // Description: The description of the game server config. - Description string `json:"description,omitempty"` - - // FleetConfigs: FleetConfig contains a list of Agones fleet specs. Only - // one FleetConfig is allowed. - FleetConfigs []*FleetConfig `json:"fleetConfigs,omitempty"` - - // Labels: The labels associated with this game server config. Each - // label is a key-value pair. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The resource name of the game server config, in the following - // form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}/configs/{configId}`. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-game/co - // nfigs/my-config`. - Name string `json:"name,omitempty"` - - // ScalingConfigs: The autoscaling settings. - ScalingConfigs []*ScalingConfig `json:"scalingConfigs,omitempty"` +// LogConfig: Specifies what kind of log the caller must write +type LogConfig struct { + // CloudAudit: Cloud audit options. + CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - // UpdateTime: Output only. The last-modified time. - UpdateTime string `json:"updateTime,omitempty"` + // Counter: Counter options. + Counter *CounterOptions `json:"counter,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // DataAccess: Data access options. + DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") 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 @@ -1175,7 +882,7 @@ type GameServerConfig struct { // 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 + // 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 @@ -1184,76 +891,172 @@ type GameServerConfig struct { NullFields []string `json:"-"` } -func (s *GameServerConfig) MarshalJSON() ([]byte, error) { - type NoMethod GameServerConfig +func (s *LogConfig) MarshalJSON() ([]byte, error) { + type NoMethod LogConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerConfigOverride: A game server config override. -type GameServerConfigOverride struct { - // ConfigVersion: The game server config for this override. - ConfigVersion string `json:"configVersion,omitempty"` +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` - // RealmsSelector: Selector for choosing applicable realms. - RealmsSelector *RealmSelector `json:"realmsSelector,omitempty"` + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfigVersion") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfigVersion") to include - // in API requests with the JSON null value. By default, fields with - // 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. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GameServerConfigOverride) MarshalJSON() ([]byte, error) { - type NoMethod GameServerConfigOverride +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerDeployment: A game server deployment resource. -type GameServerDeployment struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` +// 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"` - // Description: Human readable description of the game server - // deployment. - Description string `json:"description,omitempty"` + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Used to perform consistent read-modify-write updates. If not - // set, a blind "overwrite" update happens. + // 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"` - // Labels: The labels associated with this game server deployment. Each - // label is a key-value pair. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The resource name of the game server deployment, in the - // following form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}`. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-deploym - // ent`. - Name string `json:"name,omitempty"` + // Rules: If more than one rule is specified, the rules are applied in + // the following manner: - All matching LOG rules are always applied. - + // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging + // will be applied if one or more matching rule requires logging. - + // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is + // granted. Logging will be applied if one or more matching rule + // requires logging. - Otherwise, if no rule applies, permission is + // denied. + Rules []*Rule `json:"rules,omitempty"` - // UpdateTime: Output only. The last-modified time. - UpdateTime string `json:"updateTime,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. "CreateTime") to + // 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 @@ -1261,57 +1064,63 @@ type GameServerDeployment struct { // 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 + // 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 *GameServerDeployment) MarshalJSON() ([]byte, error) { - type NoMethod GameServerDeployment +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GameServerDeploymentRollout: The game server deployment rollout which -// represents the desired rollout state. -type GameServerDeploymentRollout struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` +// Rule: A rule to be applied in a Policy. +type Rule struct { + // Action: Required + // + // Possible values: + // "NO_ACTION" - Default no action. + // "ALLOW" - Matching 'Entries' grant access. + // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller + // promises to log the request per the returned log_configs. + // "DENY" - Matching 'Entries' deny access. + // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller + // promises to log the request per the returned log_configs. + // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. + Action string `json:"action,omitempty"` - // DefaultGameServerConfig: The default game server config is applied to - // all realms unless overridden in the rollout. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-game/co - // nfigs/my-config`. - DefaultGameServerConfig string `json:"defaultGameServerConfig,omitempty"` + // Conditions: Additional restrictions that must be met. All conditions + // must pass for the rule to match. + Conditions []*Condition `json:"conditions,omitempty"` - // Etag: ETag of the resource. - Etag string `json:"etag,omitempty"` + // Description: Human-readable description of the rule. + Description string `json:"description,omitempty"` - // GameServerConfigOverrides: Contains the game server config rollout - // overrides. Overrides are processed in the order they are listed. Once - // a match is found for a realm, the rest of the list is not processed. - GameServerConfigOverrides []*GameServerConfigOverride `json:"gameServerConfigOverrides,omitempty"` - - // Name: The resource name of the game server deployment rollout, in the - // following form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}/rollout`. For example, - // `projects/my-project/locations/global/gameServerDeployments/my-deploym - // ent/rollout`. - Name string `json:"name,omitempty"` + // In: If one or more 'in' clauses are specified, the rule matches if + // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + In []string `json:"in,omitempty"` - // UpdateTime: Output only. The last-modified time. - UpdateTime string `json:"updateTime,omitempty"` + // LogConfig: The config returned to callers of CheckPolicy for any + // entries that match the LOG action. + LogConfig []*LogConfig `json:"logConfig,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // NotIn: If one or more 'not_in' clauses are specified, the rule + // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the + // entries. The format for in and not_in entries can be found at in the + // Local IAM documentation (see go/local-iam#features). + NotIn []string `json:"notIn,omitempty"` + + // Permissions: A permission is a string of form '..' (e.g., + // 'storage.buckets.list'). A value of '*' matches all permissions, and + // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. + Permissions []string `json:"permissions,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // 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 @@ -1319,8 +1128,8 @@ type GameServerDeploymentRollout struct { // 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 + // 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. @@ -1328,24 +1137,27 @@ type GameServerDeploymentRollout struct { NullFields []string `json:"-"` } -func (s *GameServerDeploymentRollout) MarshalJSON() ([]byte, error) { - type NoMethod GameServerDeploymentRollout +func (s *Rule) MarshalJSON() ([]byte, error) { + type NoMethod Rule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GkeClusterReference: A reference to a GKE cluster. -type GkeClusterReference struct { - // Cluster: The full or partial name of a GKE cluster, using one of the - // following forms: * - // `projects/{project}/locations/{locationId}/clusters/{cluster}` * - // `locations/{locationId}/clusters/{cluster}` * `{cluster}` If project - // and location are not specified, the project and location of the - // GameServerCluster resource are used to generate the full name of the - // GKE cluster. - Cluster string `json:"cluster,omitempty"` +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cluster") to + // 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 @@ -1353,8 +1165,8 @@ type GkeClusterReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cluster") 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. @@ -1362,96 +1174,34 @@ type GkeClusterReference struct { NullFields []string `json:"-"` } -func (s *GkeClusterReference) MarshalJSON() ([]byte, error) { - type NoMethod GkeClusterReference +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// KubernetesClusterState: The state of the Kubernetes cluster. -type KubernetesClusterState struct { - // AgonesVersionInstalled: Output only. The version of Agones currently - // installed in the registered Kubernetes cluster. - AgonesVersionInstalled string `json:"agonesVersionInstalled,omitempty"` - - // AgonesVersionTargeted: Output only. The version of Agones that is - // targeted to be installed in the cluster. - AgonesVersionTargeted string `json:"agonesVersionTargeted,omitempty"` - - // InstallationState: Output only. The state for the installed versions - // of Agones/Kubernetes. - // - // Possible values: - // "INSTALLATION_STATE_UNSPECIFIED" - The default installation state. - // This value is used if the state is omitted. - // "AGONES_KUBERNETES_VERSION_SUPPORTED" - Both the Agones and - // Kubernetes versions are supported by Google Cloud Game Servers and - // Agones and Kubernetes versions are compatible. - // "AGONES_VERSION_UNSUPPORTED" - The installed version of Agones is - // not supported by Google Cloud Game Servers. - // "AGONES_KUBERNETES_VERSION_UNSUPPORTED" - The installed version of - // Agones is supported by Google Cloud Game Servers, but the installed - // version of Kubernetes is not recommended or supported by the version - // of Agones. - // "AGONES_VERSION_UNRECOGNIZED" - The installed version of Agones is - // not recognized because the Agones controller's image name does not - // have a version string reported as {major}.{minor}(.{patch}). - // "KUBERNETES_VERSION_UNRECOGNIZED" - The server version of - // Kubernetes cluster is not recognized because the API server didn't - // return parsable version info on path/version. - // "VERSION_VERIFICATION_FAILED" - Failed to read or verify the - // version of Agones or Kubernetes. See - // `version_installed_error_message` for details. - // "AGONES_NOT_INSTALLED" - Agones is not installed. - InstallationState string `json:"installationState,omitempty"` - - // KubernetesVersionInstalled: Output only. The version of Kubernetes - // that is currently used in the registered Kubernetes cluster (as - // detected by the Cloud Game Servers service). - KubernetesVersionInstalled string `json:"kubernetesVersionInstalled,omitempty"` - - // Provider: Output only. The cloud provider type reported by the first - // node's `providerID` in the list of nodes on the Kubernetes endpoint. - // On Kubernetes platforms that support zero-node clusters (like - // GKE-on-GCP), the provider type will be empty. - Provider string `json:"provider,omitempty"` - - // VersionInstalledErrorMessage: Output only. The detailed error message - // for the installed versions of Agones/Kubernetes. - VersionInstalledErrorMessage string `json:"versionInstalledErrorMessage,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "AgonesVersionInstalled") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AgonesVersionInstalled") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if 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: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` -func (s *KubernetesClusterState) MarshalJSON() ([]byte, error) { - type NoMethod KubernetesClusterState - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` -// LabelSelector: The label selector, used to group labels on the -// resources. -type LabelSelector struct { - // Labels: Resource labels for this selector. - Labels map[string]string `json:"labels,omitempty"` + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Labels") 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 @@ -1459,7 +1209,7 @@ type LabelSelector struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API + // 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 @@ -1468,5914 +1218,149 @@ type LabelSelector struct { NullFields []string `json:"-"` } -func (s *LabelSelector) MarshalJSON() ([]byte, error) { - type NoMethod LabelSelector +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListGameServerClustersResponse: Response message for -// GameServerClustersService.ListGameServerClusters. -type ListGameServerClustersResponse struct { - // GameServerClusters: The list of game server clusters. - GameServerClusters []*GameServerCluster `json:"gameServerClusters,omitempty"` - - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: List of locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "GameServerClusters") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerClusters") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListGameServerClustersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGameServerClustersResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListGameServerConfigsResponse: Response message for -// GameServerConfigsService.ListGameServerConfigs. -type ListGameServerConfigsResponse struct { - // GameServerConfigs: The list of game server configs. - GameServerConfigs []*GameServerConfig `json:"gameServerConfigs,omitempty"` - - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: List of 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. "GameServerConfigs") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerConfigs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListGameServerConfigsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGameServerConfigsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListGameServerDeploymentsResponse: Response message for -// GameServerDeploymentsService.ListGameServerDeployments. -type ListGameServerDeploymentsResponse struct { - // GameServerDeployments: The list of game server deployments. - GameServerDeployments []*GameServerDeployment `json:"gameServerDeployments,omitempty"` - - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: List of 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. - // "GameServerDeployments") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerDeployments") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListGameServerDeploymentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGameServerDeploymentsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` - - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Locations") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListRealmsResponse: Response message for RealmsService.ListRealms. -type ListRealmsResponse struct { - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Realms: The list of realms. - Realms []*Realm `json:"realms,omitempty"` - - // Unreachable: List of 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 *ListRealmsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListRealmsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Location: A resource that represents Google Cloud Platform location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: - // "us-east1". - LocationId string `json:"locationId,omitempty"` - - // Metadata: Service-specific metadata. For example the available - // capacity at the given location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: Resource name for the location, which may vary between - // implementations. For example: - // "projects/example-project/locations/us-east1" - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "DisplayName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Location) MarshalJSON() ([]byte, error) { - type NoMethod Location - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// LogConfig: Specifies what kind of log the caller must write -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *CounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - - // 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 - // sent to the server regardless of whether the field is empty or not. - // 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 - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type NoMethod LogConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Operation: This resource represents a long-running operation that is -// the result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *Status `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` - - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// OperationMetadata: Represents the metadata of the long-running -// operation. -type OperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - - // OperationStatus: Output only. Operation status for Game Services API - // operations. Operation status is in the form of key-value pairs where - // keys are resource IDs and the values show the status of the - // operation. In case of failures, the value includes an error code and - // error message. - OperationStatus map[string]OperationStatus `json:"operationStatus,omitempty"` - - // RequestedCancellation: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have - // successfully been cancelled have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` - - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` - - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` - - // Unreachable: Output only. List of Locations that could not be - // reached. - Unreachable []string `json:"unreachable,omitempty"` - - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ApiVersion") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type OperationStatus struct { - // Done: Output only. Whether the operation is done or still in - // progress. - Done bool `json:"done,omitempty"` - - // ErrorCode: The error code in case of failures. - // - // Possible values: - // "ERROR_CODE_UNSPECIFIED" - // "INTERNAL_ERROR" - // "PERMISSION_DENIED" - // "CLUSTER_CONNECTION" - ErrorCode string `json:"errorCode,omitempty"` - - // ErrorMessage: The human-readable error message. - ErrorMessage string `json:"errorMessage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *OperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod OperationStatus - 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: If more than one rule is specified, the rules are applied in - // the following manner: - All matching LOG rules are always applied. - - // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging - // will be applied if one or more matching rule requires logging. - - // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - // granted. Logging will be applied if one or more matching rule - // requires logging. - Otherwise, if no rule applies, permission is - // denied. - Rules []*Rule `json:"rules,omitempty"` - - // Version: 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) -} - -// PreviewCreateGameServerClusterResponse: Response message for -// GameServerClustersService.PreviewCreateGameServerCluster. -type PreviewCreateGameServerClusterResponse struct { - // ClusterState: Output only. The state of the Kubernetes cluster in - // preview. This will be available if view is set to FULL in the - // relevant list/get/preview request. - ClusterState *KubernetesClusterState `json:"clusterState,omitempty"` - - // Etag: The ETag of the game server cluster. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClusterState") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClusterState") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PreviewCreateGameServerClusterResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewCreateGameServerClusterResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewDeleteGameServerClusterResponse: Response message for -// GameServerClustersService.PreviewDeleteGameServerCluster. -type PreviewDeleteGameServerClusterResponse struct { - // Etag: The ETag of the game server cluster. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,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 *PreviewDeleteGameServerClusterResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewDeleteGameServerClusterResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewGameServerDeploymentRolloutResponse: Response message for -// PreviewGameServerDeploymentRollout. This has details about the Agones -// fleet and autoscaler to be actuated. -type PreviewGameServerDeploymentRolloutResponse struct { - // Etag: ETag of the game server deployment. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,omitempty"` - - // Unavailable: Locations that could not be reached on this request. - Unavailable []string `json:"unavailable,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 *PreviewGameServerDeploymentRolloutResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewGameServerDeploymentRolloutResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewRealmUpdateResponse: Response message for -// RealmsService.PreviewRealmUpdate. -type PreviewRealmUpdateResponse struct { - // Etag: ETag of the realm. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,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 *PreviewRealmUpdateResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewRealmUpdateResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PreviewUpdateGameServerClusterResponse: Response message for -// GameServerClustersService.PreviewUpdateGameServerCluster -type PreviewUpdateGameServerClusterResponse struct { - // Etag: The ETag of the game server cluster. - Etag string `json:"etag,omitempty"` - - // TargetState: The target state. - TargetState *TargetState `json:"targetState,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 *PreviewUpdateGameServerClusterResponse) MarshalJSON() ([]byte, error) { - type NoMethod PreviewUpdateGameServerClusterResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Realm: A realm resource. -type Realm struct { - // CreateTime: Output only. The creation time. - CreateTime string `json:"createTime,omitempty"` - - // Description: Human readable description of the realm. - Description string `json:"description,omitempty"` - - // Etag: Used to perform consistent read-modify-write updates. If not - // set, a blind "overwrite" update happens. - Etag string `json:"etag,omitempty"` - - // Labels: The labels associated with this realm. Each label is a - // key-value pair. - Labels map[string]string `json:"labels,omitempty"` - - // Name: The resource name of the realm, in the following form: - // `projects/{project}/locations/{locationId}/realms/{realmId}`. For - // example, `projects/my-project/locations/global/realms/my-realm`. - Name string `json:"name,omitempty"` - - // TimeZone: Required. Time zone where all policies targeting this realm - // are evaluated. The value of this field must be from the IANA time - // zone database (https://www.iana.org/time-zones). - TimeZone string `json:"timeZone,omitempty"` - - // UpdateTime: Output only. The last-modified time. - 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 *Realm) MarshalJSON() ([]byte, error) { - type NoMethod Realm - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RealmSelector: The realm selector, used to match realm resources. -type RealmSelector struct { - // Realms: List of realms to match. - Realms []string `json:"realms,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Realms") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Realms") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RealmSelector) MarshalJSON() ([]byte, error) { - type NoMethod RealmSelector - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - Default no action. - // "ALLOW" - Matching 'Entries' grant access. - // "ALLOW_WITH_LOG" - Matching 'Entries' grant access and the caller - // promises to log the request per the returned log_configs. - // "DENY" - Matching 'Entries' deny access. - // "DENY_WITH_LOG" - Matching 'Entries' deny access and the caller - // promises to log the request per the returned log_configs. - // "LOG" - Matching 'Entries' tell IAM.Check callers to generate logs. - Action string `json:"action,omitempty"` - - // Conditions: Additional restrictions that must be met. All conditions - // must pass for the rule to match. - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: If one or more 'in' clauses are specified, the rule matches if - // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of CheckPolicy for any - // entries that match the LOG action. - LogConfig []*LogConfig `json:"logConfig,omitempty"` - - // NotIn: If one or more 'not_in' clauses are specified, the rule - // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the - // entries. The format for in and not_in entries can be found at in the - // Local IAM documentation (see go/local-iam#features). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' (e.g., - // 'storage.buckets.list'). A value of '*' matches all permissions, and - // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Rule) MarshalJSON() ([]byte, error) { - type NoMethod Rule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ScalingConfig: Autoscaling config for an Agones fleet. -type ScalingConfig struct { - // FleetAutoscalerSpec: Required. Agones fleet autoscaler spec (see - // example spec - // (https://agones.dev/site/docs/reference/fleetautoscaler/)). - FleetAutoscalerSpec string `json:"fleetAutoscalerSpec,omitempty"` - - // Name: Required. The name of the scaling config. - Name string `json:"name,omitempty"` - - // Schedules: The schedules to which this scaling config applies. - Schedules []*Schedule `json:"schedules,omitempty"` - - // Selectors: Labels used to identify the game server clusters to which - // this Agones scaling config applies. A game server cluster is subject - // to this Agones scaling config if its labels match any of the selector - // entries. - Selectors []*LabelSelector `json:"selectors,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FleetAutoscalerSpec") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FleetAutoscalerSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ScalingConfig) MarshalJSON() ([]byte, error) { - type NoMethod ScalingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Schedule: The schedule of a recurring or one time event. The event's -// time span is specified by start_time and end_time. If the scheduled -// event's timespan is larger than cron_spec added with -// cron_job_duration, the event is recurring. If only cron_spec and -// cron_job_duration are specified, the event starts at the local time -// specified by cron_spec, and is recurring. ``` start_time|-------[cron -// job]-------[cron job]-------[cron job]---|end_time cron job: cron -// spec start time + duration ``` -type Schedule struct { - // CronJobDuration: The duration for the cron job event. The duration of - // the event is effective after the cron job's start time. - CronJobDuration string `json:"cronJobDuration,omitempty"` - - // CronSpec: The cron definition of the scheduled event. See - // https://en.wikipedia.org/wiki/Cron. The cron spec specifies the local - // time as defined by the realm. - CronSpec string `json:"cronSpec,omitempty"` - - // EndTime: The end time of the event. - EndTime string `json:"endTime,omitempty"` - - // StartTime: The start time of the event. - StartTime string `json:"startTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CronJobDuration") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CronJobDuration") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Schedule) MarshalJSON() ([]byte, error) { - type NoMethod Schedule - 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 - // `resource`. The size of the policy is limited to a few 10s of KB. An - // empty policy is a valid policy but certain Google Cloud services - // (such as Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only the fields in the mask will be modified. If no - // mask is provided, the following default mask is used: `paths: - // "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Policy") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// SpecSource: Encapsulates Agones fleet spec and Agones autoscaler spec -// sources. -type SpecSource struct { - // GameServerConfigName: The game server config resource. Uses the form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}/configs/{configId}`. - GameServerConfigName string `json:"gameServerConfigName,omitempty"` - - // Name: The name of the Agones fleet config or Agones scaling config - // used to derive the Agones fleet or Agones autoscaler spec. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "GameServerConfigName") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "GameServerConfigName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SpecSource) MarshalJSON() ([]byte, error) { - type NoMethod SpecSource - 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 -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetDetails: Details about the Agones resources. -type TargetDetails struct { - // FleetDetails: Agones fleet details for game server clusters and game - // server deployments. - FleetDetails []*TargetFleetDetails `json:"fleetDetails,omitempty"` - - // GameServerClusterName: The game server cluster name. Uses the form: - // `projects/{project}/locations/{locationId}/realms/{realmId}/gameServer - // Clusters/{gameServerClusterId}`. - GameServerClusterName string `json:"gameServerClusterName,omitempty"` - - // GameServerDeploymentName: The game server deployment name. Uses the - // form: - // `projects/{project}/locations/{locationId}/gameServerDeployments/{depl - // oymentId}`. - GameServerDeploymentName string `json:"gameServerDeploymentName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FleetDetails") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FleetDetails") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetDetails) MarshalJSON() ([]byte, error) { - type NoMethod TargetDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetFleet: Target Agones fleet specification. -type TargetFleet struct { - // Name: The name of the Agones fleet. - Name string `json:"name,omitempty"` - - // SpecSource: Encapsulates the source of the Agones fleet spec. The - // Agones fleet spec source. - SpecSource *SpecSource `json:"specSource,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 *TargetFleet) MarshalJSON() ([]byte, error) { - type NoMethod TargetFleet - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetFleetAutoscaler: Target Agones autoscaler policy reference. -type TargetFleetAutoscaler struct { - // Name: The name of the Agones autoscaler. - Name string `json:"name,omitempty"` - - // SpecSource: Encapsulates the source of the Agones fleet spec. Details - // about the Agones autoscaler spec. - SpecSource *SpecSource `json:"specSource,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 *TargetFleetAutoscaler) MarshalJSON() ([]byte, error) { - type NoMethod TargetFleetAutoscaler - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetFleetDetails: Details of the target Agones fleet. -type TargetFleetDetails struct { - // Autoscaler: Reference to target Agones fleet autoscaling policy. - Autoscaler *TargetFleetAutoscaler `json:"autoscaler,omitempty"` - - // Fleet: Reference to target Agones fleet. - Fleet *TargetFleet `json:"fleet,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Autoscaler") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Autoscaler") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TargetFleetDetails) MarshalJSON() ([]byte, error) { - type NoMethod TargetFleetDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TargetState: Encapsulates the Target state. -type TargetState struct { - // Details: Details about Agones fleets. - Details []*TargetDetails `json:"details,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 *TargetState) MarshalJSON() ([]byte, error) { - type NoMethod TargetState - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse 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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// method id "gameservices.projects.locations.get": - -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets information about a location. -// -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "gameservices.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) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Location{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets information about a location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Resource name for the location.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Location" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.list": - -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists information about the supported locations for this -// service. -// -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeUnrevealedLocations sets the optional parameter -// "includeUnrevealedLocations": If true, the returned list will include -// locations which are not yet revealed. -func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { - c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/locations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.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) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListLocationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1beta/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "gameservices.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" - // }, - // "includeUnrevealedLocations": { - // "description": "If true, the returned list will include locations which are not yet revealed.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", - // "location": "path", - // "pattern": "^projects/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}/locations", - // "response": { - // "$ref": "ListLocationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*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) - } -} - -// method id "gameservices.projects.locations.gameServerDeployments.create": - -type ProjectsLocationsGameServerDeploymentsCreateCall struct { - s *Service - parent string - gameserverdeployment *GameServerDeployment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new game server deployment in a given project and -// location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) Create(parent string, gameserverdeployment *GameServerDeployment) *ProjectsLocationsGameServerDeploymentsCreateCall { - c := &ProjectsLocationsGameServerDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameserverdeployment = gameserverdeployment - return c -} - -// DeploymentId sets the optional parameter "deploymentId": Required. -// The ID of the game server deployment resource to create. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) DeploymentId(deploymentId string) *ProjectsLocationsGameServerDeploymentsCreateCall { - c.urlParams_.Set("deploymentId", deploymentId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeployment) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/gameServerDeployments") - 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 "gameservices.projects.locations.gameServerDeployments.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new game server deployment in a given project and location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "deploymentId": { - // "description": "Required. The ID of the game server deployment resource to create.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/gameServerDeployments", - // "request": { - // "$ref": "GameServerDeployment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.delete": - -type ProjectsLocationsGameServerDeploymentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single game server deployment. -// -// - name: The name of the game server deployment to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) Delete(name string) *ProjectsLocationsGameServerDeploymentsDeleteCall { - c := &ProjectsLocationsGameServerDeploymentsDeleteCall{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 *ProjectsLocationsGameServerDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single game server deployment.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.gameServerDeployments.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState": - -type ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall struct { - s *Service - name string - fetchdeploymentstaterequest *FetchDeploymentStateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// FetchDeploymentState: Retrieves information about the current state -// of the game server deployment. Gathers all the Agones fleets and -// Agones autoscalers, including fleets running an older version of the -// game server deployment. -// -// - name: The name of the game server deployment, in the following -// form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) FetchDeploymentState(name string, fetchdeploymentstaterequest *FetchDeploymentStateRequest) *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall { - c := &ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.fetchdeploymentstaterequest = fetchdeploymentstaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.fetchdeploymentstaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:fetchDeploymentState") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState" call. -// Exactly one of *FetchDeploymentStateResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *FetchDeploymentStateResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsFetchDeploymentStateCall) Do(opts ...googleapi.CallOption) (*FetchDeploymentStateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &FetchDeploymentStateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Retrieves information about the current state of the game server deployment. Gathers all the Agones fleets and Agones autoscalers, including fleets running an older version of the game server deployment.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:fetchDeploymentState", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.fetchDeploymentState", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}:fetchDeploymentState", - // "request": { - // "$ref": "FetchDeploymentStateRequest" - // }, - // "response": { - // "$ref": "FetchDeploymentStateResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.get": - -type ProjectsLocationsGameServerDeploymentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single game server deployment. -// -// - name: The name of the game server deployment to retrieve, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) Get(name string) *ProjectsLocationsGameServerDeploymentsGetCall { - c := &ProjectsLocationsGameServerDeploymentsGetCall{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 *ProjectsLocationsGameServerDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.get" call. -// Exactly one of *GameServerDeployment or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GameServerDeployment.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*GameServerDeployment, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GameServerDeployment{ - ServerResponse: googleapi.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 game server deployment.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "GameServerDeployment" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.getIamPolicy": - -type ProjectsLocationsGameServerDeploymentsGetIamPolicyCall 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 *ProjectsLocationsGameServerDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c := &ProjectsLocationsGameServerDeploymentsGetIamPolicyCall{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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - 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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.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/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+resource}:getIamPolicy", - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.getRollout": - -type ProjectsLocationsGameServerDeploymentsGetRolloutCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRollout: Gets details of a single game server deployment rollout. -// -// - name: The name of the game server deployment rollout to retrieve, -// in the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/rollout`. -func (r *ProjectsLocationsGameServerDeploymentsService) GetRollout(name string) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c := &ProjectsLocationsGameServerDeploymentsGetRolloutCall{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 *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetRolloutCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+name}/rollout") - 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 "gameservices.projects.locations.gameServerDeployments.getRollout" call. -// Exactly one of *GameServerDeploymentRollout or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GameServerDeploymentRollout.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsGetRolloutCall) Do(opts ...googleapi.CallOption) (*GameServerDeploymentRollout, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GameServerDeploymentRollout{ - ServerResponse: googleapi.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 game server deployment rollout.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.getRollout", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server deployment rollout to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}/rollout", - // "response": { - // "$ref": "GameServerDeploymentRollout" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.list": - -type ProjectsLocationsGameServerDeploymentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists game server deployments in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsGameServerDeploymentsService) List(parent string) *ProjectsLocationsGameServerDeploymentsListCall { - c := &ProjectsLocationsGameServerDeploymentsListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsGameServerDeploymentsListCall) Filter(filter string) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsGameServerDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on the response's next_page_token to determine if -// there are more GameServerDeployments left to be queried. -func (c *ProjectsLocationsGameServerDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsGameServerDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsGameServerDeploymentsListCall { - 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 *ProjectsLocationsGameServerDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+parent}/gameServerDeployments") - 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 "gameservices.projects.locations.gameServerDeployments.list" call. -// Exactly one of *ListGameServerDeploymentsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListGameServerDeploymentsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsGameServerDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListGameServerDeploymentsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListGameServerDeploymentsResponse{ - ServerResponse: googleapi.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 game server deployments in a given project and location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more GameServerDeployments left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/gameServerDeployments", - // "response": { - // "$ref": "ListGameServerDeploymentsResponse" - // }, - // "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 *ProjectsLocationsGameServerDeploymentsListCall) Pages(ctx context.Context, f func(*ListGameServerDeploymentsResponse) 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 "gameservices.projects.locations.gameServerDeployments.patch": - -type ProjectsLocationsGameServerDeploymentsPatchCall struct { - s *Service - name string - gameserverdeployment *GameServerDeployment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches a game server deployment. -// -// - name: The resource name of the game server deployment, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}`. For example, -// `projects/my-project/locations/global/gameServerDeployments/my-deplo -// yment`. -func (r *ProjectsLocationsGameServerDeploymentsService) Patch(name string, gameserverdeployment *GameServerDeployment) *ProjectsLocationsGameServerDeploymentsPatchCall { - c := &ProjectsLocationsGameServerDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gameserverdeployment = gameserverdeployment - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. At least one path must be -// supplied in this field. For more information, see the `FieldMask` -// definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGameServerDeploymentsPatchCall { - 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 *ProjectsLocationsGameServerDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeployment) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches a game server deployment.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.gameServerDeployments.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the game server deployment, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GameServerDeployment" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.previewRollout": - -type ProjectsLocationsGameServerDeploymentsPreviewRolloutCall struct { - s *Service - name string - gameserverdeploymentrollout *GameServerDeploymentRollout - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PreviewRollout: Previews the game server deployment rollout. This API -// does not mutate the rollout resource. -// -// - name: The resource name of the game server deployment rollout, in -// the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/rollout`. For example, -// `projects/my-project/locations/global/gameServerDeployments/my-deplo -// yment/rollout`. -func (r *ProjectsLocationsGameServerDeploymentsService) PreviewRollout(name string, gameserverdeploymentrollout *GameServerDeploymentRollout) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c := &ProjectsLocationsGameServerDeploymentsPreviewRolloutCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gameserverdeploymentrollout = gameserverdeploymentrollout - return c -} - -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. Defaults to the immediately after -// the proposed rollout completes. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) PreviewTime(previewTime string) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c.urlParams_.Set("previewTime", previewTime) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The update mask -// to apply to the resource. At least one path must be supplied in this -// field. For more information, see the `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) UpdateMask(updateMask string) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - 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 *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeploymentrollout) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/rollout:preview") - 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 "gameservices.projects.locations.gameServerDeployments.previewRollout" call. -// Exactly one of *PreviewGameServerDeploymentRolloutResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *PreviewGameServerDeploymentRolloutResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsGameServerDeploymentsPreviewRolloutCall) Do(opts ...googleapi.CallOption) (*PreviewGameServerDeploymentRolloutResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &PreviewGameServerDeploymentRolloutResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Previews the game server deployment rollout. This API does not mutate the rollout resource.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout:preview", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.gameServerDeployments.previewRollout", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview. Defaults to the immediately after the proposed rollout completes.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Optional. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}/rollout:preview", - // "request": { - // "$ref": "GameServerDeploymentRollout" - // }, - // "response": { - // "$ref": "PreviewGameServerDeploymentRolloutResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.setIamPolicy": - -type ProjectsLocationsGameServerDeploymentsSetIamPolicyCall 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 *ProjectsLocationsGameServerDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { - c := &ProjectsLocationsGameServerDeploymentsSetIamPolicyCall{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 *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.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/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.testIamPermissions": - -type ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall 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 *ProjectsLocationsGameServerDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { - c := &ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall{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 *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) 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, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, 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": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.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/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.updateRollout": - -type ProjectsLocationsGameServerDeploymentsUpdateRolloutCall struct { - s *Service - name string - gameserverdeploymentrollout *GameServerDeploymentRollout - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateRollout: Patches a single game server deployment rollout. The -// method will not return an error if the update does not affect any -// existing realms. For example, the following cases will not return an -// error: * The default_game_server_config is changed but all existing -// realms use the override. * A non-existing realm is explicitly called -// out in the game_server_config_overrides field. -// -// - name: The resource name of the game server deployment rollout, in -// the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/rollout`. For example, -// `projects/my-project/locations/global/gameServerDeployments/my-deplo -// yment/rollout`. -func (r *ProjectsLocationsGameServerDeploymentsService) UpdateRollout(name string, gameserverdeploymentrollout *GameServerDeploymentRollout) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - c := &ProjectsLocationsGameServerDeploymentsUpdateRolloutCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gameserverdeploymentrollout = gameserverdeploymentrollout - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. At least one path must be -// supplied in this field. For more information, see the `FieldMask` -// definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) UpdateMask(updateMask string) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - 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 *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverdeploymentrollout) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/rollout") - 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 "gameservices.projects.locations.gameServerDeployments.updateRollout" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsUpdateRolloutCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches a single game server deployment rollout. The method will not return an error if the update does not affect any existing realms. For example, the following cases will not return an error: * The default_game_server_config is changed but all existing realms use the override. * A non-existing realm is explicitly called out in the game_server_config_overrides field.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.gameServerDeployments.updateRollout", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the game server deployment rollout, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/rollout`. For example, `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}/rollout", - // "request": { - // "$ref": "GameServerDeploymentRollout" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.create": - -type ProjectsLocationsGameServerDeploymentsConfigsCreateCall struct { - s *Service - parent string - gameserverconfig *GameServerConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new game server config in a given project, -// location, and game server deployment. Game server configs are -// immutable, and are not applied until referenced in the game server -// deployment rollout resource. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) Create(parent string, gameserverconfig *GameServerConfig) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameserverconfig = gameserverconfig - return c -} - -// ConfigId sets the optional parameter "configId": Required. The ID of -// the game server config resource to create. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) ConfigId(configId string) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c.urlParams_.Set("configId", configId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.gameserverconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/configs") - 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 "gameservices.projects.locations.gameServerDeployments.configs.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new game server config in a given project, location, and game server deployment. Game server configs are immutable, and are not applied until referenced in the game server deployment rollout resource.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "configId": { - // "description": "Required. The ID of the game server config resource to create.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/configs", - // "request": { - // "$ref": "GameServerConfig" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.delete": - -type ProjectsLocationsGameServerDeploymentsConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single game server config. The deletion fails if -// the game server config is referenced in a game server deployment -// rollout. -// -// - name: The name of the game server config to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/configs/{configId}`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) Delete(name string) *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsDeleteCall{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 *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.configs.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 *ProjectsLocationsGameServerDeploymentsConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single game server config. The deletion fails if the game server config is referenced in a game server deployment rollout.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server config to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.get": - -type ProjectsLocationsGameServerDeploymentsConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single game server config. -// -// - name: The name of the game server config to retrieve, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/configs/{configId}`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) Get(name string) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsGetCall{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 *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.gameServerDeployments.configs.get" call. -// Exactly one of *GameServerConfig or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GameServerConfig.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsConfigsGetCall) Do(opts ...googleapi.CallOption) (*GameServerConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &GameServerConfig{ - ServerResponse: googleapi.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 game server config.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the game server config to retrieve, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/{configId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+/configs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "GameServerConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.gameServerDeployments.configs.list": - -type ProjectsLocationsGameServerDeploymentsConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists game server configs in a given project, location, and -// game server deployment. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/gameServerDeployments/{de -// ploymentId}/configs/*`. -func (r *ProjectsLocationsGameServerDeploymentsConfigsService) List(parent string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c := &ProjectsLocationsGameServerDeploymentsConfigsListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Filter(filter string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on response's next_page_token to determine if there -// are more GameServerConfigs left to be queried. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) PageToken(pageToken string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - 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 *ProjectsLocationsGameServerDeploymentsConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsConfigsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+parent}/configs") - 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 "gameservices.projects.locations.gameServerDeployments.configs.list" call. -// Exactly one of *ListGameServerConfigsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListGameServerConfigsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGameServerDeploymentsConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGameServerConfigsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListGameServerConfigsResponse{ - ServerResponse: googleapi.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 game server configs in a given project, location, and game server deployment.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/configs", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.gameServerDeployments.configs.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerConfigs left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/gameServerDeployments/{deploymentId}/configs/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/configs", - // "response": { - // "$ref": "ListGameServerConfigsResponse" - // }, - // "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 *ProjectsLocationsGameServerDeploymentsConfigsListCall) Pages(ctx context.Context, f func(*ListGameServerConfigsResponse) 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 "gameservices.projects.locations.operations.cancel": - -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.operations.cancel", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.operations.delete": - -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. -// -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "gameservices.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.operations.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource to be deleted.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.operations.get": - -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "gameservices.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.operations.list": - -type ProjectsLocationsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. -// -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "gameservices.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}/operations", - // "response": { - // "$ref": "ListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "gameservices.projects.locations.realms.create": - -type ProjectsLocationsRealmsCreateCall struct { - s *Service - parent string - realm *Realm - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new realm in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsRealmsService) Create(parent string, realm *Realm) *ProjectsLocationsRealmsCreateCall { - c := &ProjectsLocationsRealmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.realm = realm - return c -} - -// RealmId sets the optional parameter "realmId": Required. The ID of -// the realm resource to create. -func (c *ProjectsLocationsRealmsCreateCall) RealmId(realmId string) *ProjectsLocationsRealmsCreateCall { - c.urlParams_.Set("realmId", realmId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRealmsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsCreateCall) Context(ctx context.Context) *ProjectsLocationsRealmsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.realm) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/realms") - 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 "gameservices.projects.locations.realms.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new realm in a given project and location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.realms.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "realmId": { - // "description": "Required. The ID of the realm resource to create.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/realms", - // "request": { - // "$ref": "Realm" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.realms.delete": - -type ProjectsLocationsRealmsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single realm. -// -// - name: The name of the realm to delete, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsService) Delete(name string) *ProjectsLocationsRealmsDeleteCall { - c := &ProjectsLocationsRealmsDeleteCall{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 *ProjectsLocationsRealmsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRealmsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.realms.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 *ProjectsLocationsRealmsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single realm.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.realms.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the realm to delete, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.realms.get": - -type ProjectsLocationsRealmsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single realm. -// -// - name: The name of the realm to retrieve, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsService) Get(name string) *ProjectsLocationsRealmsGetCall { - c := &ProjectsLocationsRealmsGetCall{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 *ProjectsLocationsRealmsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsGetCall) Context(ctx context.Context) *ProjectsLocationsRealmsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+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 "gameservices.projects.locations.realms.get" call. -// Exactly one of *Realm or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Realm.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsRealmsGetCall) Do(opts ...googleapi.CallOption) (*Realm, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Realm{ - ServerResponse: googleapi.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 realm.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The name of the realm to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "response": { - // "$ref": "Realm" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "gameservices.projects.locations.realms.list": - -type ProjectsLocationsRealmsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists realms in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}`. -func (r *ProjectsLocationsRealmsService) List(parent string) *ProjectsLocationsRealmsListCall { - c := &ProjectsLocationsRealmsListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsRealmsListCall) Filter(filter string) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsRealmsListCall) OrderBy(orderBy string) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on the response's next_page_token to determine if -// there are more realms left to be queried. -func (c *ProjectsLocationsRealmsListCall) PageSize(pageSize int64) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsRealmsListCall) PageToken(pageToken string) *ProjectsLocationsRealmsListCall { - 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 *ProjectsLocationsRealmsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsListCall) Context(ctx context.Context) *ProjectsLocationsRealmsListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRealmsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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, "v1beta/{+parent}/realms") - 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 "gameservices.projects.locations.realms.list" call. -// Exactly one of *ListRealmsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListRealmsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsListCall) Do(opts ...googleapi.CallOption) (*ListRealmsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &ListRealmsResponse{ - ServerResponse: googleapi.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 realms in a given project and location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on the response's next_page_token to determine if there are more realms left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/realms", - // "response": { - // "$ref": "ListRealmsResponse" - // }, - // "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 *ProjectsLocationsRealmsListCall) Pages(ctx context.Context, f func(*ListRealmsResponse) 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 "gameservices.projects.locations.realms.patch": - -type ProjectsLocationsRealmsPatchCall struct { - s *Service - name string - realm *Realm - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} + // 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:"-"` -// Patch: Patches a single realm. -// -// - name: The resource name of the realm, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. For -// example, `projects/my-project/locations/global/realms/my-realm`. -func (r *ProjectsLocationsRealmsService) Patch(name string, realm *Realm) *ProjectsLocationsRealmsPatchCall { - c := &ProjectsLocationsRealmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.realm = realm - return c + // 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:"-"` } -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. For more information, see the -// `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRealmsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRealmsPatchCall) Context(ctx context.Context) *ProjectsLocationsRealmsPatchCall { - c.ctx_ = ctx - return c -} + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRealmsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} + // 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:"-"` -func (c *ProjectsLocationsRealmsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-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.realm) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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) + // 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:"-"` } -// Do executes the "gameservices.projects.locations.realms.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 *ProjectsLocationsRealmsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Patches a single realm.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta/{+name}", - // "request": { - // "$ref": "Realm" - // }, - // "response": { - // "$ref": "Operation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "gameservices.projects.locations.realms.previewUpdate": +// method id "gameservices.projects.locations.get": -type ProjectsLocationsRealmsPreviewUpdateCall struct { - s *Service - name string - realm *Realm - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PreviewUpdate: Previews patches to a single realm. +// Get: Gets information about a location. // -// - name: The resource name of the realm, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. For -// example, `projects/my-project/locations/global/realms/my-realm`. -func (r *ProjectsLocationsRealmsService) PreviewUpdate(name string, realm *Realm) *ProjectsLocationsRealmsPreviewUpdateCall { - c := &ProjectsLocationsRealmsPreviewUpdateCall{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 - c.realm = realm - return c -} - -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsPreviewUpdateCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsPreviewUpdateCall { - c.urlParams_.Set("previewTime", previewTime) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. For more information, see the -// `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsPreviewUpdateCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsPreviewUpdateCall { - 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 *ProjectsLocationsRealmsPreviewUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsPreviewUpdateCall { +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 *ProjectsLocationsRealmsPreviewUpdateCall) Context(ctx context.Context) *ProjectsLocationsRealmsPreviewUpdateCall { +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 *ProjectsLocationsRealmsPreviewUpdateCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsPreviewUpdateCall) 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()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.realm) - 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, "v1beta/{+name}:previewUpdate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -7386,14 +1371,14 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.previewUpdate" call. -// Exactly one of *PreviewRealmUpdateResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *PreviewRealmUpdateResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOption) (*PreviewRealmUpdateResponse, error) { +// Do executes the "gameservices.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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7412,7 +1397,7 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewRealmUpdateResponse{ + ret := &Location{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7424,40 +1409,25 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Previews patches to a single realm.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}:previewUpdate", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.previewUpdate", + // "description": "Gets information about a location.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The resource name of the realm, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`. For example, `projects/my-project/locations/global/realms/my-realm`.", + // "description": "Resource name for the location.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}:previewUpdate", - // "request": { - // "$ref": "Realm" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "PreviewRealmUpdateResponse" + // "$ref": "Location" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7466,98 +1436,129 @@ func (c *ProjectsLocationsRealmsPreviewUpdateCall) Do(opts ...googleapi.CallOpti } -// method id "gameservices.projects.locations.realms.gameServerClusters.create": +// method id "gameservices.projects.locations.list": -type ProjectsLocationsRealmsGameServerClustersCreateCall struct { - s *Service - parent string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new game server cluster in a given project and -// location. +// List: Lists information about the supported locations for this +// service. // -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Create(parent string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersCreateCall { - c := &ProjectsLocationsRealmsGameServerClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameservercluster = gameservercluster +// - 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 +} + +// IncludeUnrevealedLocations sets the optional parameter +// "includeUnrevealedLocations": If true, the returned list will include +// locations which are not yet revealed. +func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { + c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) return c } -// GameServerClusterId sets the optional parameter -// "gameServerClusterId": Required. The ID of the game server cluster -// resource to create. -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) GameServerClusterId(gameServerClusterId string) *ProjectsLocationsRealmsGameServerClustersCreateCall { - c.urlParams_.Set("gameServerClusterId", gameServerClusterId) +// 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 *ProjectsLocationsRealmsGameServerClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersCreateCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersCreateCall { +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 *ProjectsLocationsRealmsGameServerClustersCreateCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) 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_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) - 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, "v1beta/{+parent}/gameServerClusters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/locations") 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 "gameservices.projects.locations.realms.gameServerClusters.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "gameservices.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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7576,7 +1577,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &ListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7588,33 +1589,46 @@ func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Creates a new game server cluster in a given project and location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.realms.gameServerClusters.create", + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1beta/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "gameServerClusterId": { - // "description": "Required. The ID of the game server cluster resource to create.", + // "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" // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", + // "includeUnrevealedLocations": { + // "description": "If true, the returned list will include locations which are not yet revealed.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", + // "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": "v1beta/{+parent}/gameServerClusters", - // "request": { - // "$ref": "GameServerCluster" - // }, + // "path": "v1beta/{+name}/locations", // "response": { - // "$ref": "Operation" + // "$ref": "ListLocationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7623,84 +1637,139 @@ func (c *ProjectsLocationsRealmsGameServerClustersCreateCall) Do(opts ...googlea } -// method id "gameservices.projects.locations.realms.gameServerClusters.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 *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) + } +} + +// method id "gameservices.projects.locations.gameServerDeployments.getIamPolicy": -type ProjectsLocationsRealmsGameServerClustersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGameServerDeploymentsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single game server cluster. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: The name of the game server cluster to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerClusters/{gameS -// erverClusterId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Delete(name string) *ProjectsLocationsRealmsGameServerClustersDeleteCall { - c := &ProjectsLocationsRealmsGameServerClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsGameServerDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { + c := &ProjectsLocationsGameServerDeploymentsGetIamPolicyCall{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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { + 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 *ProjectsLocationsRealmsGameServerClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersDeleteCall { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersDeleteCall { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-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, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.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 *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7719,7 +1788,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7731,25 +1800,31 @@ func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googlea } return ret, nil // { - // "description": "Deletes a single game server cluster.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.realms.gameServerClusters.delete", + // "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": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.gameServerDeployments.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", + // "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/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+resource}:getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7758,120 +1833,93 @@ func (c *ProjectsLocationsRealmsGameServerClustersDeleteCall) Do(opts ...googlea } -// method id "gameservices.projects.locations.realms.gameServerClusters.get": - -type ProjectsLocationsRealmsGameServerClustersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} +// method id "gameservices.projects.locations.gameServerDeployments.setIamPolicy": -// Get: Gets details of a single game server cluster. -// -// - name: The name of the game server cluster to retrieve, in the -// following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}/gameServ -// erClusters/{gameServerClusterId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Get(name string) *ProjectsLocationsRealmsGameServerClustersGetCall { - c := &ProjectsLocationsRealmsGameServerClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsGameServerDeploymentsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": View for the returned -// GameServerCluster objects. When `FULL` is specified, the -// `cluster_state` field is also returned in the GameServerCluster -// object, which includes the state of the referenced Kubernetes cluster -// such as versions and provider info. The default/unset value is -// `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which -// does not return the `cluster_state` field. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// Possible values: -// "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, -// Google Cloud Game Servers defaults to the `BASIC` view. -// "BASIC" - Includes basic information of a GameServerCluster -// resource and omits `cluster_state`. This is the default value (for -// methods ListGameServerClusters, GetGameServerCluster, and -// PreviewCreateGameServerCluster). -// "FULL" - Include basic information of a GameServerCluster resource -// as well as `cluster_state`. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) View(view string) *ProjectsLocationsRealmsGameServerClustersGetCall { - c.urlParams_.Set("view", view) +// - 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 *ProjectsLocationsGameServerDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { + c := &ProjectsLocationsGameServerDeploymentsSetIamPolicyCall{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 *ProjectsLocationsRealmsGameServerClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersGetCall { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsGameServerClustersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersGetCall { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Header() http.Header { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-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, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.get" call. -// Exactly one of *GameServerCluster or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GameServerCluster.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi.CallOption) (*GameServerCluster, error) { +// Do executes the "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsGameServerDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7890,7 +1938,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GameServerCluster{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7902,40 +1950,28 @@ func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets details of a single game server cluster.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.gameServerClusters.get", + // "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": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "gameservices.projects.locations.gameServerDeployments.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the game server cluster to retrieve, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`.", + // "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/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - // "enum": [ - // "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - // "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - // "Include basic information of a GameServerCluster resource as well as `cluster_state`." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GameServerCluster" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7944,150 +1980,96 @@ func (c *ProjectsLocationsRealmsGameServerClustersGetCall) Do(opts ...googleapi. } -// method id "gameservices.projects.locations.realms.gameServerClusters.list": - -type ProjectsLocationsRealmsGameServerClustersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists game server clusters in a given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) List(parent string) *ProjectsLocationsRealmsGameServerClustersListCall { - c := &ProjectsLocationsRealmsGameServerClustersListCall{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 (see Filtering (https://google.aip.dev/160)). -func (c *ProjectsLocationsRealmsGameServerClustersListCall) Filter(filter string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results following Cloud API syntax -// (https://cloud.google.com/apis/design/design_patterns#sorting_order). -func (c *ProjectsLocationsRealmsGameServerClustersListCall) OrderBy(orderBy string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If unspecified, the server picks an appropriate -// default. The server may return fewer items than requested. A caller -// should only rely on response's next_page_token to determine if there -// are more GameServerClusters left to be queried. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) PageSize(pageSize int64) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "gameservices.projects.locations.gameServerDeployments.testIamPermissions": -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous list request, if any. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) PageToken(pageToken string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": View for the returned -// GameServerCluster objects. When `FULL` is specified, the -// `cluster_state` field is also returned in the GameServerCluster -// object, which includes the state of the referenced Kubernetes cluster -// such as versions and provider info. The default/unset value is -// `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which -// does not return the `cluster_state` field. +// 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. // -// Possible values: -// "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, -// Google Cloud Game Servers defaults to the `BASIC` view. -// "BASIC" - Includes basic information of a GameServerCluster -// resource and omits `cluster_state`. This is the default value (for -// methods ListGameServerClusters, GetGameServerCluster, and -// PreviewCreateGameServerCluster). -// "FULL" - Include basic information of a GameServerCluster resource -// as well as `cluster_state`. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) View(view string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.urlParams_.Set("view", view) +// - 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 *ProjectsLocationsGameServerDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { + c := &ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall{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 *ProjectsLocationsRealmsGameServerClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersListCall { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRealmsGameServerClustersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersListCall { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersListCall) Header() http.Header { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-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.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, "v1beta/{+parent}/gameServerClusters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.list" call. -// Exactly one of *ListGameServerClustersResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListGameServerClustersResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "gameservices.projects.locations.gameServerDeployments.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 *ProjectsLocationsRealmsGameServerClustersListCall) Do(opts ...googleapi.CallOption) (*ListGameServerClustersResponse, error) { +func (c *ProjectsLocationsGameServerDeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8106,7 +2088,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListGameServerClustersResponse{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8118,61 +2100,28 @@ func (c *ProjectsLocationsRealmsGameServerClustersListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists game server clusters in a given project and location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters", - // "httpMethod": "GET", - // "id": "gameservices.projects.locations.realms.gameServerClusters.list", + // "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": "v1beta/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "gameservices.projects.locations.gameServerDeployments.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "Optional. The filter to apply to list results (see [Filtering](https://google.aip.dev/160)).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results following [Cloud API syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order).", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If unspecified, the server picks an appropriate default. The server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more GameServerClusters left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous list request, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", + // "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/[^/]+/realms/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gameServerDeployments/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is `GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED`, the same as `BASIC`, which does not return the `cluster_state` field.", - // "enum": [ - // "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - // "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - // "Include basic information of a GameServerCluster resource as well as `cluster_state`." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+parent}/gameServerClusters", + // "path": "v1beta/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "ListGameServerClustersResponse" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8181,67 +2130,40 @@ func (c *ProjectsLocationsRealmsGameServerClustersListCall) 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 *ProjectsLocationsRealmsGameServerClustersListCall) Pages(ctx context.Context, f func(*ListGameServerClustersResponse) 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 "gameservices.projects.locations.realms.gameServerClusters.patch": +// method id "gameservices.projects.locations.operations.cancel": -type ProjectsLocationsRealmsGameServerClustersPatchCall struct { - s *Service - name string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches a single game server cluster. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - name: The resource name of the game server cluster, in the -// following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}/gameServ -// erClusters/{gameServerClusterId}`. For example, -// `projects/my-project/locations/global/realms/zanzibar/gameServerClus -// ters/my-gke-cluster`. -func (r *ProjectsLocationsRealmsGameServerClustersService) Patch(name string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersPatchCall { - c := &ProjectsLocationsRealmsGameServerClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gameservercluster = gameservercluster - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The -// update mask to apply to the resource. At least one path must be -// supplied in this field. For more information, see the `FieldMask` -// definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsGameServerClustersPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.canceloperationrequest = canceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPatchCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8249,21 +2171,21 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) 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 *ProjectsLocationsRealmsGameServerClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPatchCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8271,16 +2193,16 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -8291,14 +2213,14 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.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 *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "gameservices.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8317,7 +2239,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8329,34 +2251,28 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleap } return ret, nil // { - // "description": "Patches a single game server cluster.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.gameServerClusters.patch", + // "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": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "gameservices.projects.locations.operations.cancel", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Required. The update mask to apply to the resource. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}:cancel", // "request": { - // "$ref": "GameServerCluster" + // "$ref": "CancelOperationRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8365,65 +2281,32 @@ func (c *ProjectsLocationsRealmsGameServerClustersPatchCall) Do(opts ...googleap } -// method id "gameservices.projects.locations.realms.gameServerClusters.previewCreate": - -type ProjectsLocationsRealmsGameServerClustersPreviewCreateCall struct { - s *Service - parent string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PreviewCreate: Previews creation of a new game server cluster in a -// given project and location. -// -// - parent: The parent resource name, in the following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) PreviewCreate(parent string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c := &ProjectsLocationsRealmsGameServerClustersPreviewCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gameservercluster = gameservercluster - return c -} - -// GameServerClusterId sets the optional parameter -// "gameServerClusterId": Required. The ID of the game server cluster -// resource to create. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) GameServerClusterId(gameServerClusterId string) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c.urlParams_.Set("gameServerClusterId", gameServerClusterId) - return c -} +// method id "gameservices.projects.locations.operations.delete": -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c.urlParams_.Set("previewTime", previewTime) - return c +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": This field is deprecated. -// Preview will always return KubernetesClusterState. +// 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`. // -// Possible values: -// "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED" - If the value is not set, -// Google Cloud Game Servers defaults to the `BASIC` view. -// "BASIC" - Includes basic information of a GameServerCluster -// resource and omits `cluster_state`. This is the default value (for -// methods ListGameServerClusters, GetGameServerCluster, and -// PreviewCreateGameServerCluster). -// "FULL" - Include basic information of a GameServerCluster resource -// as well as `cluster_state`. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) View(view string) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { - c.urlParams_.Set("view", view) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8431,21 +2314,21 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) 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 *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8453,35 +2336,29 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/gameServerClusters:previewCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "gameservices.projects.locations.realms.gameServerClusters.previewCreate" call. -// Exactly one of *PreviewCreateGameServerClusterResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *PreviewCreateGameServerClusterResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ...googleapi.CallOption) (*PreviewCreateGameServerClusterResponse, error) { +// Do executes the "gameservices.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8500,7 +2377,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewCreateGameServerClusterResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8512,54 +2389,25 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ... } return ret, nil // { - // "description": "Previews creation of a new game server cluster in a given project and location.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters:previewCreate", - // "httpMethod": "POST", - // "id": "gameservices.projects.locations.realms.gameServerClusters.previewCreate", + // "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": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "gameservices.projects.locations.operations.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "gameServerClusterId": { - // "description": "Required. The ID of the game server cluster resource to create.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}`.", + // "name": { + // "description": "The name of the operation resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "view": { - // "description": "Optional. This field is deprecated. Preview will always return KubernetesClusterState.", - // "enum": [ - // "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "If the value is not set, Google Cloud Game Servers defaults to the `BASIC` view.", - // "Includes basic information of a GameServerCluster resource and omits `cluster_state`. This is the default value (for methods ListGameServerClusters, GetGameServerCluster, and PreviewCreateGameServerCluster).", - // "Include basic information of a GameServerCluster resource as well as `cluster_state`." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+parent}/gameServerClusters:previewCreate", - // "request": { - // "$ref": "GameServerCluster" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "PreviewCreateGameServerClusterResponse" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8568,73 +2416,79 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewCreateCall) Do(opts ... } -// method id "gameservices.projects.locations.realms.gameServerClusters.previewDelete": +// method id "gameservices.projects.locations.operations.get": -type ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PreviewDelete: Previews deletion of a single game server cluster. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: The name of the game server cluster to delete, in the -// following form: -// `projects/{project}/locations/{locationId}/gameServerClusters/{gameS -// erverClusterId}`. -func (r *ProjectsLocationsRealmsGameServerClustersService) PreviewDelete(name string) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { - c := &ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { - c.urlParams_.Set("previewTime", previewTime) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:previewDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -8645,15 +2499,14 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.previewDelete" call. -// Exactly one of *PreviewDeleteGameServerClusterResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *PreviewDeleteGameServerClusterResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ...googleapi.CallOption) (*PreviewDeleteGameServerClusterResponse, error) { +// Do executes the "gameservices.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8672,7 +2525,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewDeleteGameServerClusterResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8684,31 +2537,25 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ... } return ret, nil // { - // "description": "Previews deletion of a single game server cluster.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewDelete", - // "httpMethod": "DELETE", - // "id": "gameservices.projects.locations.realms.gameServerClusters.previewDelete", + // "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": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the game server cluster to delete, in the following form: `projects/{project}/locations/{locationId}/gameServerClusters/{gameServerClusterId}`.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}:previewDelete", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "PreviewDeleteGameServerClusterResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8717,91 +2564,107 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewDeleteCall) Do(opts ... } -// method id "gameservices.projects.locations.realms.gameServerClusters.previewUpdate": +// method id "gameservices.projects.locations.operations.list": -type ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall struct { - s *Service - name string - gameservercluster *GameServerCluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PreviewUpdate: Previews updating a GameServerCluster. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. // -// - name: The resource name of the game server cluster, in the -// following form: -// `projects/{project}/locations/{locationId}/realms/{realmId}/gameServ -// erClusters/{gameServerClusterId}`. For example, -// `projects/my-project/locations/global/realms/zanzibar/gameServerClus -// ters/my-gke-cluster`. -func (r *ProjectsLocationsRealmsGameServerClustersService) PreviewUpdate(name string, gameservercluster *GameServerCluster) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { - c := &ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gameservercluster = gameservercluster return c } -// PreviewTime sets the optional parameter "previewTime": The target -// timestamp to compute the preview. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) PreviewTime(previewTime string) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { - c.urlParams_.Set("previewTime", previewTime) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. At least one path must be supplied in this -// field. For more information, see the `FieldMask` definition -// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) UpdateMask(updateMask string) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { - c.urlParams_.Set("updateMask", updateMask) +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Context(ctx context.Context) *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gameservercluster) - 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, "v1beta/{+name}:previewUpdate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -8812,15 +2675,14 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "gameservices.projects.locations.realms.gameServerClusters.previewUpdate" call. -// Exactly one of *PreviewUpdateGameServerClusterResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *PreviewUpdateGameServerClusterResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "gameservices.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ...googleapi.CallOption) (*PreviewUpdateGameServerClusterResponse, error) { +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8839,7 +2701,7 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &PreviewUpdateGameServerClusterResponse{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8851,40 +2713,41 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ... } return ret, nil // { - // "description": "Previews updating a GameServerCluster.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewUpdate", - // "httpMethod": "PATCH", - // "id": "gameservices.projects.locations.realms.gameServerClusters.previewUpdate", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "gameservices.projects.locations.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The resource name of the game server cluster, in the following form: `projects/{project}/locations/{locationId}/realms/{realmId}/gameServerClusters/{gameServerClusterId}`. For example, `projects/my-project/locations/global/realms/zanzibar/gameServerClusters/my-gke-cluster`.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/realms/[^/]+/gameServerClusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, - // "previewTime": { - // "description": "Optional. The target timestamp to compute the preview.", - // "format": "google-datetime", + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "updateMask": { - // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. For more information, see the [`FieldMask` definition](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask).", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } // }, - // "path": "v1beta/{+name}:previewUpdate", - // "request": { - // "$ref": "GameServerCluster" - // }, + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "PreviewUpdateGameServerClusterResponse" + // "$ref": "ListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8892,3 +2755,24 @@ func (c *ProjectsLocationsRealmsGameServerClustersPreviewUpdateCall) Do(opts ... // } } + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/tpu/v1/tpu-api.json b/tpu/v1/tpu-api.json index 16b700e9ef6..3dab07c96aa 100644 --- a/tpu/v1/tpu-api.json +++ b/tpu/v1/tpu-api.json @@ -659,7 +659,7 @@ } } }, - "revision": "20220714", + "revision": "20220725", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorType": { @@ -861,7 +861,7 @@ "V2_ALPHA1" ], "enumDescriptions": [ - "LINT.IfChange API version is unknown.", + "API version is unknown.", "TPU API V1Alpha1 version.", "TPU API V1 version.", "TPU API V2Alpha1 version." @@ -969,7 +969,7 @@ "UNHIDING" ], "enumDescriptions": [ - "LINT.IfChange TPU node state is not known/set.", + "TPU node state is not known/set.", "TPU node is being created.", "TPU node has been created.", "TPU node is restarting.", @@ -983,7 +983,7 @@ "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", "TPU node is currently hiding.", "TPU node has been hidden.", - "TPU node is currently unhiding. LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tpu/api/gce_tpu.proto)" + "TPU node is currently unhiding." ], "readOnly": true, "type": "string" diff --git a/tpu/v1/tpu-gen.go b/tpu/v1/tpu-gen.go index 8e852e4966d..9aba5ded5b3 100644 --- a/tpu/v1/tpu-gen.go +++ b/tpu/v1/tpu-gen.go @@ -533,7 +533,7 @@ type Node struct { // ApiVersion: Output only. The API version that created this Node. // // Possible values: - // "API_VERSION_UNSPECIFIED" - LINT.IfChange API version is unknown. + // "API_VERSION_UNSPECIFIED" - API version is unknown. // "V1_ALPHA1" - TPU API V1Alpha1 version. // "V1" - TPU API V1 version. // "V2_ALPHA1" - TPU API V2Alpha1 version. @@ -612,8 +612,7 @@ type Node struct { // State: Output only. The current state for the TPU Node. // // Possible values: - // "STATE_UNSPECIFIED" - LINT.IfChange TPU node state is not - // known/set. + // "STATE_UNSPECIFIED" - TPU node state is not known/set. // "CREATING" - TPU node is being created. // "READY" - TPU node has been created. // "RESTARTING" - TPU node is restarting. @@ -631,8 +630,6 @@ type Node struct { // "HIDING" - TPU node is currently hiding. // "HIDDEN" - TPU node has been hidden. // "UNHIDING" - TPU node is currently unhiding. - // LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tp - // u/api/gce_tpu.proto) State string `json:"state,omitempty"` // Symptoms: Output only. The Symptoms that have occurred to the TPU diff --git a/tpu/v1alpha1/tpu-api.json b/tpu/v1alpha1/tpu-api.json index 2439f9b90cf..12c8b52036e 100644 --- a/tpu/v1alpha1/tpu-api.json +++ b/tpu/v1alpha1/tpu-api.json @@ -669,7 +669,7 @@ } } }, - "revision": "20220714", + "revision": "20220725", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorType": { @@ -871,7 +871,7 @@ "V2_ALPHA1" ], "enumDescriptions": [ - "LINT.IfChange API version is unknown.", + "API version is unknown.", "TPU API V1Alpha1 version.", "TPU API V1 version.", "TPU API V2Alpha1 version." @@ -979,7 +979,7 @@ "UNHIDING" ], "enumDescriptions": [ - "LINT.IfChange TPU node state is not known/set.", + "TPU node state is not known/set.", "TPU node is being created.", "TPU node has been created.", "TPU node is restarting.", @@ -993,7 +993,7 @@ "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", "TPU node is currently hiding.", "TPU node has been hidden.", - "TPU node is currently unhiding. LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tpu/api/gce_tpu.proto)" + "TPU node is currently unhiding." ], "readOnly": true, "type": "string" diff --git a/tpu/v1alpha1/tpu-gen.go b/tpu/v1alpha1/tpu-gen.go index 25437abf6d1..3c8181db5f5 100644 --- a/tpu/v1alpha1/tpu-gen.go +++ b/tpu/v1alpha1/tpu-gen.go @@ -533,7 +533,7 @@ type Node struct { // ApiVersion: Output only. The API version that created this Node. // // Possible values: - // "API_VERSION_UNSPECIFIED" - LINT.IfChange API version is unknown. + // "API_VERSION_UNSPECIFIED" - API version is unknown. // "V1_ALPHA1" - TPU API V1Alpha1 version. // "V1" - TPU API V1 version. // "V2_ALPHA1" - TPU API V2Alpha1 version. @@ -612,8 +612,7 @@ type Node struct { // State: Output only. The current state for the TPU Node. // // Possible values: - // "STATE_UNSPECIFIED" - LINT.IfChange TPU node state is not - // known/set. + // "STATE_UNSPECIFIED" - TPU node state is not known/set. // "CREATING" - TPU node is being created. // "READY" - TPU node has been created. // "RESTARTING" - TPU node is restarting. @@ -631,8 +630,6 @@ type Node struct { // "HIDING" - TPU node is currently hiding. // "HIDDEN" - TPU node has been hidden. // "UNHIDING" - TPU node is currently unhiding. - // LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tp - // u/api/gce_tpu.proto) State string `json:"state,omitempty"` // Symptoms: Output only. The Symptoms that have occurred to the TPU diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index b42f5f98eb5..0f18e6b1b2f 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -759,7 +759,7 @@ } } }, - "revision": "20220714", + "revision": "20220725", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorType": { @@ -1122,7 +1122,7 @@ "V2_ALPHA1" ], "enumDescriptions": [ - "LINT.IfChange API version is unknown.", + "API version is unknown.", "TPU API V1Alpha1 version.", "TPU API V1 version.", "TPU API V2Alpha1 version." @@ -1243,7 +1243,7 @@ "UNHIDING" ], "enumDescriptions": [ - "LINT.IfChange TPU node state is not known/set.", + "TPU node state is not known/set.", "TPU node is being created.", "TPU node has been created.", "TPU node is restarting.", @@ -1257,7 +1257,7 @@ "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", "TPU node is currently hiding.", "TPU node has been hidden.", - "TPU node is currently unhiding. LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tpu/api/gce_tpu.proto)" + "TPU node is currently unhiding." ], "readOnly": true, "type": "string" diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index ab1b356f2ed..96694af1837 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -847,7 +847,7 @@ type Node struct { // ApiVersion: Output only. The API version that created this Node. // // Possible values: - // "API_VERSION_UNSPECIFIED" - LINT.IfChange API version is unknown. + // "API_VERSION_UNSPECIFIED" - API version is unknown. // "V1_ALPHA1" - TPU API V1Alpha1 version. // "V1" - TPU API V1 version. // "V2_ALPHA1" - TPU API V2Alpha1 version. @@ -924,8 +924,7 @@ type Node struct { // State: Output only. The current state for the TPU Node. // // Possible values: - // "STATE_UNSPECIFIED" - LINT.IfChange TPU node state is not - // known/set. + // "STATE_UNSPECIFIED" - TPU node state is not known/set. // "CREATING" - TPU node is being created. // "READY" - TPU node has been created. // "RESTARTING" - TPU node is restarting. @@ -943,8 +942,6 @@ type Node struct { // "HIDING" - TPU node is currently hiding. // "HIDDEN" - TPU node has been hidden. // "UNHIDING" - TPU node is currently unhiding. - // LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tp - // u/api/gce_tpu.proto) State string `json:"state,omitempty"` // Symptoms: Output only. The Symptoms that have occurred to the TPU