From 75d45d767bc0c0ad8c03c4855cd43f896b67c91d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 27 Aug 2024 01:35:30 +0000 Subject: [PATCH] fix(gkehub): update the API #### gkehub:v1alpha The following keys were changed: - schemas.CommonFeatureSpec.description - schemas.CommonFeatureState.description - schemas.CommonFeatureState.properties.state.description - schemas.ConfigManagementMembershipSpec.properties.hierarchyController.description - schemas.Feature.description - schemas.Feature.properties.spec.description - schemas.Feature.properties.state.description - schemas.FeatureResourceState.description - schemas.FeatureResourceState.properties.state.enumDescriptions - schemas.MembershipFeatureSpec.description - schemas.ServiceMeshCondition.properties.code.enum - schemas.ServiceMeshCondition.properties.code.enumDescriptions #### gkehub:v1beta The following keys were changed: - schemas.CommonFeatureSpec.description - schemas.CommonFeatureState.description - schemas.CommonFeatureState.properties.state.description - schemas.ConfigManagementMembershipSpec.properties.hierarchyController.description - schemas.Feature.description - schemas.Feature.properties.spec.description - schemas.Feature.properties.state.description - schemas.FeatureResourceState.description - schemas.FeatureResourceState.properties.state.enumDescriptions - schemas.MembershipFeatureSpec.description - schemas.ServiceMeshCondition.properties.code.enum - schemas.ServiceMeshCondition.properties.code.enumDescriptions #### gkehub:v1 The following keys were changed: - schemas.CommonFeatureSpec.description - schemas.CommonFeatureState.description - schemas.CommonFeatureState.properties.state.description - schemas.ConfigManagementMembershipSpec.properties.hierarchyController.description - schemas.Feature.description - schemas.Feature.properties.spec.description - schemas.Feature.properties.state.description - schemas.FeatureResourceState.description - schemas.FeatureResourceState.properties.state.enumDescriptions - schemas.MembershipFeatureSpec.description - schemas.ServiceMeshCondition.properties.code.enum - schemas.ServiceMeshCondition.properties.code.enumDescriptions --- discovery/gkehub-v1.json | 28 +- discovery/gkehub-v1alpha.json | 28 +- discovery/gkehub-v1beta.json | 28 +- discovery/gkehub-v2.json | 435 +++++++++++++++++++ src/apis/gkehub/index.ts | 8 + src/apis/gkehub/v1.ts | 18 +- src/apis/gkehub/v1alpha.ts | 18 +- src/apis/gkehub/v1beta.ts | 18 +- src/apis/gkehub/v2.ts | 762 ++++++++++++++++++++++++++++++++++ 9 files changed, 1277 insertions(+), 66 deletions(-) create mode 100644 discovery/gkehub-v2.json create mode 100644 src/apis/gkehub/v2.ts diff --git a/discovery/gkehub-v1.json b/discovery/gkehub-v1.json index 4cd6f6774a..e59ed147d8 100644 --- a/discovery/gkehub-v1.json +++ b/discovery/gkehub-v1.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240809", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2520,7 +2520,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "appdevexperience": { @@ -2547,7 +2547,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2564,7 +2564,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -3230,7 +3230,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3649,7 +3649,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -3717,11 +3717,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -3742,7 +3742,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -3757,9 +3757,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -5007,7 +5007,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "configmanagement": { @@ -6074,6 +6074,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6103,6 +6104,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/discovery/gkehub-v1alpha.json b/discovery/gkehub-v1alpha.json index 6629ba47bd..1142318010 100644 --- a/discovery/gkehub-v1alpha.json +++ b/discovery/gkehub-v1alpha.json @@ -2185,7 +2185,7 @@ } } }, - "revision": "20240809", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2720,7 +2720,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "anthosobservability": { @@ -2763,7 +2763,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2788,7 +2788,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -3510,7 +3510,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3933,7 +3933,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -4001,11 +4001,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -4026,7 +4026,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -4041,9 +4041,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -5345,7 +5345,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "anthosobservability": { @@ -6598,6 +6598,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6627,6 +6628,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/discovery/gkehub-v1beta.json b/discovery/gkehub-v1beta.json index ded84a3356..9019ea5751 100644 --- a/discovery/gkehub-v1beta.json +++ b/discovery/gkehub-v1beta.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240809", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2550,7 +2550,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "anthosobservability": { @@ -2581,7 +2581,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2598,7 +2598,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -3320,7 +3320,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3743,7 +3743,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -3811,11 +3811,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -3836,7 +3836,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -3851,9 +3851,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -5101,7 +5101,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "anthosobservability": { @@ -6237,6 +6237,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6266,6 +6267,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/discovery/gkehub-v2.json b/discovery/gkehub-v2.json new file mode 100644 index 0000000000..993a11c62b --- /dev/null +++ b/discovery/gkehub-v2.json @@ -0,0 +1,435 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "gkehub:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "gkehub.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "gkehub.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": "v2/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "gkehub.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": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.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": "v2/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20240809", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/src/apis/gkehub/index.ts b/src/apis/gkehub/index.ts index 81dce29bee..fe43c7fc9f 100644 --- a/src/apis/gkehub/index.ts +++ b/src/apis/gkehub/index.ts @@ -19,6 +19,7 @@ import {gkehub_v1alpha} from './v1alpha'; import {gkehub_v1alpha2} from './v1alpha2'; import {gkehub_v1beta} from './v1beta'; import {gkehub_v1beta1} from './v1beta1'; +import {gkehub_v2} from './v2'; import {gkehub_v2alpha} from './v2alpha'; import {gkehub_v2beta} from './v2beta'; @@ -28,6 +29,7 @@ export const VERSIONS = { v1alpha2: gkehub_v1alpha2.Gkehub, v1beta: gkehub_v1beta.Gkehub, v1beta1: gkehub_v1beta1.Gkehub, + v2: gkehub_v2.Gkehub, v2alpha: gkehub_v2alpha.Gkehub, v2beta: gkehub_v2beta.Gkehub, }; @@ -44,6 +46,8 @@ export function gkehub(version: 'v1beta'): gkehub_v1beta.Gkehub; export function gkehub(options: gkehub_v1beta.Options): gkehub_v1beta.Gkehub; export function gkehub(version: 'v1beta1'): gkehub_v1beta1.Gkehub; export function gkehub(options: gkehub_v1beta1.Options): gkehub_v1beta1.Gkehub; +export function gkehub(version: 'v2'): gkehub_v2.Gkehub; +export function gkehub(options: gkehub_v2.Options): gkehub_v2.Gkehub; export function gkehub(version: 'v2alpha'): gkehub_v2alpha.Gkehub; export function gkehub(options: gkehub_v2alpha.Options): gkehub_v2alpha.Gkehub; export function gkehub(version: 'v2beta'): gkehub_v2beta.Gkehub; @@ -55,6 +59,7 @@ export function gkehub< | gkehub_v1alpha2.Gkehub | gkehub_v1beta.Gkehub | gkehub_v1beta1.Gkehub + | gkehub_v2.Gkehub | gkehub_v2alpha.Gkehub | gkehub_v2beta.Gkehub, >( @@ -70,6 +75,8 @@ export function gkehub< | gkehub_v1beta.Options | 'v1beta1' | gkehub_v1beta1.Options + | 'v2' + | gkehub_v2.Options | 'v2alpha' | gkehub_v2alpha.Options | 'v2beta' @@ -85,6 +92,7 @@ export {gkehub_v1alpha}; export {gkehub_v1alpha2}; export {gkehub_v1beta}; export {gkehub_v1beta1}; +export {gkehub_v2}; export {gkehub_v2alpha}; export {gkehub_v2beta}; export { diff --git a/src/apis/gkehub/v1.ts b/src/apis/gkehub/v1.ts index 9cff3f824c..eb7472d537 100644 --- a/src/apis/gkehub/v1.ts +++ b/src/apis/gkehub/v1.ts @@ -406,7 +406,7 @@ export namespace gkehub_v1 { updateTime?: string | null; } /** - * CommonFeatureSpec contains Hub-wide configuration information + * CommonFeatureSpec contains Fleet-wide configuration information */ export interface Schema$CommonFeatureSpec { /** @@ -431,7 +431,7 @@ export namespace gkehub_v1 { multiclusteringress?: Schema$MultiClusterIngressFeatureSpec; } /** - * CommonFeatureState contains Hub-wide Feature status information. + * CommonFeatureState contains Fleet-wide Feature status information. */ export interface Schema$CommonFeatureState { /** @@ -447,7 +447,7 @@ export namespace gkehub_v1 { */ fleetobservability?: Schema$FleetObservabilityFeatureState; /** - * Output only. The "running state" of the Feature in this Hub. + * Output only. The "running state" of the Feature in this Fleet. */ state?: Schema$FeatureState; } @@ -818,7 +818,7 @@ export namespace gkehub_v1 { */ configSync?: Schema$ConfigManagementConfigSync; /** - * Hierarchy Controller configuration for the cluster. + * Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead. */ hierarchyController?: Schema$ConfigManagementHierarchyControllerConfig; /** @@ -1118,7 +1118,7 @@ export namespace gkehub_v1 { title?: string | null; } /** - * Feature represents the settings and status of any Hub Feature. + * Feature represents the settings and status of any Fleet Feature. */ export interface Schema$Feature { /** @@ -1162,11 +1162,11 @@ export namespace gkehub_v1 { */ scopeStates?: {[key: string]: Schema$ScopeFeatureState} | null; /** - * Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. + * Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused. */ spec?: Schema$CommonFeatureSpec; /** - * Output only. The Hub-wide Feature state. + * Output only. The Fleet-wide Feature state. */ state?: Schema$CommonFeatureState; /** @@ -1179,7 +1179,7 @@ export namespace gkehub_v1 { updateTime?: string | null; } /** - * FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the "running state" of the Feature in the Hub and across Memberships. + * FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the "running state" of the Feature in the Fleet and across Memberships. */ export interface Schema$FeatureResourceState { /** @@ -2108,7 +2108,7 @@ export namespace gkehub_v1 { onPremCluster?: Schema$OnPremCluster; } /** - * MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name. + * MembershipFeatureSpec contains configuration information for a single Membership. */ export interface Schema$MembershipFeatureSpec { /** diff --git a/src/apis/gkehub/v1alpha.ts b/src/apis/gkehub/v1alpha.ts index 4343f7ba67..9bc04acd7e 100644 --- a/src/apis/gkehub/v1alpha.ts +++ b/src/apis/gkehub/v1alpha.ts @@ -492,7 +492,7 @@ export namespace gkehub_v1alpha { updateTime?: string | null; } /** - * CommonFeatureSpec contains Hub-wide configuration information + * CommonFeatureSpec contains Fleet-wide configuration information */ export interface Schema$CommonFeatureSpec { /** @@ -533,7 +533,7 @@ export namespace gkehub_v1alpha { workloadcertificate?: Schema$FeatureSpec; } /** - * CommonFeatureState contains Hub-wide Feature status information. + * CommonFeatureState contains Fleet-wide Feature status information. */ export interface Schema$CommonFeatureState { /** @@ -557,7 +557,7 @@ export namespace gkehub_v1alpha { */ servicemesh?: Schema$ServiceMeshFeatureState; /** - * Output only. The "running state" of the Feature in this Hub. + * Output only. The "running state" of the Feature in this Fleet. */ state?: Schema$FeatureState; } @@ -963,7 +963,7 @@ export namespace gkehub_v1alpha { */ configSync?: Schema$ConfigManagementConfigSync; /** - * Hierarchy Controller configuration for the cluster. + * Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead. */ hierarchyController?: Schema$ConfigManagementHierarchyControllerConfig; /** @@ -1267,7 +1267,7 @@ export namespace gkehub_v1alpha { title?: string | null; } /** - * Feature represents the settings and status of any Hub Feature. + * Feature represents the settings and status of any Fleet Feature. */ export interface Schema$Feature { /** @@ -1311,11 +1311,11 @@ export namespace gkehub_v1alpha { */ scopeStates?: {[key: string]: Schema$ScopeFeatureState} | null; /** - * Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. + * Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused. */ spec?: Schema$CommonFeatureSpec; /** - * Output only. The Hub-wide Feature state. + * Output only. The Fleet-wide Feature state. */ state?: Schema$CommonFeatureState; /** @@ -1328,7 +1328,7 @@ export namespace gkehub_v1alpha { updateTime?: string | null; } /** - * FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the "running state" of the Feature in the Hub and across Memberships. + * FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the "running state" of the Feature in the Fleet and across Memberships. */ export interface Schema$FeatureResourceState { /** @@ -2287,7 +2287,7 @@ export namespace gkehub_v1alpha { onPremCluster?: Schema$OnPremCluster; } /** - * MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name. + * MembershipFeatureSpec contains configuration information for a single Membership. */ export interface Schema$MembershipFeatureSpec { /** diff --git a/src/apis/gkehub/v1beta.ts b/src/apis/gkehub/v1beta.ts index dbc98528d2..55dd92faea 100644 --- a/src/apis/gkehub/v1beta.ts +++ b/src/apis/gkehub/v1beta.ts @@ -432,7 +432,7 @@ export namespace gkehub_v1beta { updateTime?: string | null; } /** - * CommonFeatureSpec contains Hub-wide configuration information + * CommonFeatureSpec contains Fleet-wide configuration information */ export interface Schema$CommonFeatureSpec { /** @@ -461,7 +461,7 @@ export namespace gkehub_v1beta { multiclusteringress?: Schema$MultiClusterIngressFeatureSpec; } /** - * CommonFeatureState contains Hub-wide Feature status information. + * CommonFeatureState contains Fleet-wide Feature status information. */ export interface Schema$CommonFeatureState { /** @@ -477,7 +477,7 @@ export namespace gkehub_v1beta { */ fleetobservability?: Schema$FleetObservabilityFeatureState; /** - * Output only. The "running state" of the Feature in this Hub. + * Output only. The "running state" of the Feature in this Fleet. */ state?: Schema$FeatureState; } @@ -883,7 +883,7 @@ export namespace gkehub_v1beta { */ configSync?: Schema$ConfigManagementConfigSync; /** - * Hierarchy Controller configuration for the cluster. + * Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead. */ hierarchyController?: Schema$ConfigManagementHierarchyControllerConfig; /** @@ -1187,7 +1187,7 @@ export namespace gkehub_v1beta { title?: string | null; } /** - * Feature represents the settings and status of any Hub Feature. + * Feature represents the settings and status of any Fleet Feature. */ export interface Schema$Feature { /** @@ -1231,11 +1231,11 @@ export namespace gkehub_v1beta { */ scopeStates?: {[key: string]: Schema$ScopeFeatureState} | null; /** - * Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. + * Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused. */ spec?: Schema$CommonFeatureSpec; /** - * Output only. The Hub-wide Feature state. + * Output only. The Fleet-wide Feature state. */ state?: Schema$CommonFeatureState; /** @@ -1248,7 +1248,7 @@ export namespace gkehub_v1beta { updateTime?: string | null; } /** - * FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the "running state" of the Feature in the Hub and across Memberships. + * FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the "running state" of the Feature in the Fleet and across Memberships. */ export interface Schema$FeatureResourceState { /** @@ -2177,7 +2177,7 @@ export namespace gkehub_v1beta { onPremCluster?: Schema$OnPremCluster; } /** - * MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name. + * MembershipFeatureSpec contains configuration information for a single Membership. */ export interface Schema$MembershipFeatureSpec { /** diff --git a/src/apis/gkehub/v2.ts b/src/apis/gkehub/v2.ts new file mode 100644 index 0000000000..1fe16bca02 --- /dev/null +++ b/src/apis/gkehub/v2.ts @@ -0,0 +1,762 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace gkehub_v2 { + export interface Options extends GlobalOptions { + version: 'v2'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * GKE Hub API + * + * + * + * @example + * ```js + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v2'); + * ``` + */ + export class Gkehub { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * 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); \} + */ + export interface Schema$Empty {} + /** + * 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). + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents a Google Cloud location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal, successful response of the operation. 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?: {[key: string]: any} | null; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Gets information about a location. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists information about the supported locations for this service. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * 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). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service selects a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List + extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +}